Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDL2 and 3D Rendering

Tags:

opengl

sdl

3d

sdl-2

Does SDL2 have the capability to render things in 3D (i.e. make cubes, spheres, etc.) without the use of OpenGL, or does it only have 2D capabilities?

like image 846
Shoaib Ahmed Avatar asked Oct 30 '25 04:10

Shoaib Ahmed


1 Answers

Your question would be better off on GameDev Stackexchange but to simply answer your question: SDL2 itself has no capabilities to render 3D objects. This is also stated in SDLs about page:

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D

SDL provides some functions to help you ease the use of OpenGL, but you'll have to learn and use OpenGL to allow rendering 2D and 3D vector graphics.

A good tutorial that I'd recommend on the basics of SDL is this site. It only has some chapters related to the use of OpenGL, but if you haven't used SDL much, this is a great start.

like image 184
pr0f3ss Avatar answered Nov 02 '25 22:11

pr0f3ss



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!