Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Robbis_1

Pages: [1]
1
Graphics / Re: OpenGL application lag
« on: January 10, 2014, 01:54:17 pm »
I've never noticed this on anything else and I'm usually running games in windowed no border mode.

2
Graphics / Re: OpenGL application lag
« on: January 10, 2014, 12:42:54 pm »
I have the same issue and moving the view with integers made it slightly better, but it's still there. I'm moving my view by using sf::Keyboard::isKeyPressed every game loop.

Running it in fullscreen caused extreme screen tearing, so I switched the frame limit to vsync instead. There seems to be no sign of "screen lag" in fullscreen with vsync, even if you move the view with floats.

3
Graphics / Re: Drawing points in vertex array is offset?
« on: January 10, 2014, 12:31:58 pm »
Right, sorry. I assumed it was obvious that my pictures are taken from running the example code.  :)
So the top left in my images is at 0, 0.

4
Graphics / Re: Drawing points in vertex array is offset?
« on: January 10, 2014, 12:07:54 pm »
But isn't the top left pixel of the screen always 0, 0?

Your code produces the same result as the first image.

5
Graphics / Re: Drawing points in vertex array is offset?
« on: January 10, 2014, 10:58:35 am »
I'm not sure what you mean that I didn't put in perspective. The two images are taken directly from the window running the code I posted.

6
Graphics / Re: Drawing points in vertex array is offset?
« on: January 09, 2014, 06:59:24 pm »
Considering that is the only code it should be whole numbers and no zoom.

EDIT: To clarify, the zoom is by taking a picture of the application that is running the code above and then scaling it in a separate program.

7
Graphics / Drawing points in vertex array is offset?
« on: January 09, 2014, 06:49:19 pm »
Hello, I'm running SFML 2.1 with revision (https://github.com/SFML/SFML/tree/56c2eb8cea5253e079bbf10aad80503512b87dd9) which is only 3 months old.

Take a look at this code:
int main()
{
        sf::RenderWindow window(sf::VideoMode(80, 60), "SFML window");
        window.setFramerateLimit(30);

        sf::VertexArray points;
        points.setPrimitiveType(sf::Points);
        points.append(sf::Vertex(sf::Vector2f(0, 0), sf::Color(255, 0, 0, 255)));
        points.append(sf::Vertex(sf::Vector2f(1, 1), sf::Color(255, 0, 0, 255)));
        points.append(sf::Vertex(sf::Vector2f(2, 2), sf::Color(255, 0, 0, 255)));

        sf::VertexArray lines;
        lines.setPrimitiveType(sf::Lines);
        lines.append(sf::Vertex(sf::Vector2f(0, 0), sf::Color(0, 255, 0, 127)));
        lines.append(sf::Vertex(sf::Vector2f(5, 5), sf::Color(0, 255, 0, 127)));

        while (window.isOpen())
        {
                window.clear();
                window.draw(points);
                window.draw(lines);
                window.display();
        }

        return 0;
}

This is currently producing this as a result (zoomed in):


Shouldn't it be something more like this?

8
Graphics / Drawing circle with texture?
« on: August 27, 2011, 02:07:36 pm »
Ah, thanks. I guess I'll have to wait then.

Yes, I'm creating really big spheres, so I'm only creating the part of the sphere that's inside the screen. This allows me to make it in a higher resolution and only draw the points that's inside the screen.

9
Graphics / Drawing circle with texture?
« on: August 27, 2011, 01:03:31 pm »
Hey, I'm currently using SFML 2.0 and I'm drawing a circle using sf::Shape and the AddPoint function. This is all working good, but I'd like to apply a texture to the circle.

I just want to apply it in a simple way, so it would look like you took a quad, rendered it with a texture and then put a circle in the middle of it and sampled only those parts inside the circle. In other words, I'd like to apply an UV map to my circle somehow.

Is there any way of doing this in SFML? Or would I have to do it with OpenGL? If it's the latter, then I could use some help with it.  :wink:

Pages: [1]
anything