Sign in to follow this  

SDL -3D?

This topic is 3502 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does SDL have 3D capabilities? If it does, can it only handle some indie-level 3D games or can it compare with serious 3D engines? That is, would it be worthwhile to learn it for its 3D (considering I plan to feed it some complex models, ~5000 polys per human model) or should I stick with other free 3D engine (please give names...)? So more to the point: Is SDL built for 3D or "you can use 3D but better not do it"? Thanks.

Share this post


Link to post
Share on other sites
SDL can be used with OpenGL, which is one of two industry standard 3D API's (the other being DirectX). The SDL homepage has some easy tutorials on how to setup an OpenGL window.

In short: it has as good 3D capabilities as any wrapper library.

Share this post


Link to post
Share on other sites
SDL can interface with OpenGL, which is quite capable of doing 3D (without going into the usual D3D vs OpenGL discussion). It should be enough for whatever you might imagine doing.
SDL itself is only a thin library built to be bare minimum for what a 'media' application might have (meaning that it won't give you fancy functions for doing all kinds of things that your game might require, those you'll have to program yourself).
Bear in mind that I'm no extensive user of SDL so I might very well be incorrect here and there.

Share this post


Link to post
Share on other sites
The reason I'm asking is because I know at least one 3D engine that uses SDL that, when required to load models more than a few hundred polys, crashes. So I deduce it's a limit of SDL's (my computer CAN handle it).

Share this post


Link to post
Share on other sites
The engine you mention probably uses C or C++ too; it is no more logical to deduce that what you see is a limitation of C or C++ than SDL.

SDL (and OpenGL) has nothing to do with loading models. That is done some other way, either by a third party model loading library or a custom solution. A model is just a collection of coordinates, so loading a model and rendering it are two relatively unrelated problems.

The problems in the engine you mention are due to shoddy programming, not SDL. I myself am using it right now to test collision detection between models with about 46000 polygons, without issues.

Share this post


Link to post
Share on other sites
To clarify, SDL itself does not have any sort of 3D functionality. It does, however, interface well with OpenGL. When used with OpenGL, however, it is said that OpenGL does the rendering, not SDL. SDL in this case is used for creating the window, input, sound, etc.

Share this post


Link to post
Share on other sites

This topic is 3502 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this