How to make text on up 3d scenes?


#1

(SDL2, C++)
Hello, I want to make the counter FPS, I got it and how to disable the background, that is, I have a 3D scene and background on top … How to implement?


#2

SDL2 doesn’t actually implement 3D, only 2D accelerated simple shapes and image blitting. If you want text in your 3D app, you’ll have to implement it yourself if you want it in the 3D world. Or if you want a HUD or something similar, you can always draw your 3D world, and then write over top of it the HUD using a texture you created with SDL2.

If you’re feeling fancy, icculus has a method to turn a TTF font into simple polygons to use in your game: Here is the link.


#3

Yes, I need to create a HUD that is, so that there is text on top of the scene so that you can even make a game menu