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 - Catch_0x16

Pages: [1]
1
General / Re: Drawing without SFML window
« on: October 27, 2019, 11:00:23 pm »
Ah! that sounds like a solution, thanks!

2
General / Drawing without SFML window
« on: October 27, 2019, 04:50:07 pm »
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

Pages: [1]
anything