Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

SDL2 Draw scene to texture. SDL2 RenderTexture like SFML

$
0
0
I've been developing a 2D Engine using SFML + ImGui. Here you can see an image The editor is rendered using ImGui and the scene window is a sf::RenderTexture where I draw the GameObjects and then is converted to ImGui::Image to render it in the editor. Now I need to create a 3D Engine during this year in my Bachelor Degree but using SDL2 + ImGui and I want to recreate what I did with the 2D Engine. I've managed to render the editor like I did in the 2D Engine using this example that comes with ImGui. 3D Editor preview But I don't know how to create an equivalent of sf::RenderTexture in SDL2, so I can draw the 3D scene there and convert it to ImGui::Image to show it in the editor. If you can provide code will be better. And if you want me to provide any specific code tell me. Thanks!

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>