Hello,
I'm writing a plugin for a flight simulator, that is written in OpenGL. The simulator creates and manages the OpenGL context/window etc. and all I do is make draw calls (in immediate mode... please don't hate me) as and when it's my plugins turn to draw.
So far, I have been using the sf::Image class to save me from writing my own implementation of loading in .png/.jpeg files etc. Once I've loaded an image, I glGenTextures and glTexImage2D to push to pixel data from the sf::Image class across to my GPU. At this point I pretty much no longer use the sf::Image class at all, and handle drawing by myself.
Now I need to do the same with sf::Text, but can't work out how to get the pixel data. I want to use the SFML classes again, to save me from having to re implement FreeType.
I suppose I have two questions:
- How do I get the pixel data from sf::Text?
- Is there a better way of drawing these elements, without having an SFML window class?
Thanks
Catch_0x16