rjs
rjs

Reputation: 437

SFML OpenGL Drawing Text

I'm using SFML 2.0 as my windowing library with OpenGL. If I draw text using the RenderWindow.Draw method it doesn't display my OpenGL graphics, but when I take the Draw call out it does display the Graphics. Can anyone tell me why this is happening?

Upvotes: 0

Views: 1262

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 473407

This is probably because RenderWindow.Draw changes some OpenGL state that you're not changing back after the call. Remember: OpenGL has a lot of global state. If you're lucky, SFML will have some documentation about what OpenGL state it sets so that you can reset it.

In general, either you should always use SFML drawing functions to draw your stuff, or you should never use them. You shouldn't go back and forth.

Upvotes: 2

Related Questions