What would everyone think about an SDL device for Irrlicht? This would allow Irrlicht to run on all platforms supported by SDL, while still supporting hardware OpenGL where available. SDL currently runs on a wide range of hardware and OSes, including Linux, Windows, BeOS, MacOS, MacOS X, FreeBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. I know one of the goals of Irrlicht is to get rid of dependencies, but this could increase portability of the engine with very little work. Besides, it could be made into an optional extension.
I'm just curious, what do you all think about the idea?
SDL Device
SDL is sort of like the equivalent of DirectX for Windows. The difference is that it works across all platforms. Irrlicht wouldn't work on OS X because it would need to be adjusted to use it's native GUI. ( Okay, you MIGHT be able to use the OS X X server, but that would be ugly ). With SDL it would just work.
SDL is not a 3D API, if that's what you're thinking.
SDL is not a 3D API, if that's what you're thinking.
-Shane
True, it's not a 3D API.... only. It's a Simple DirectMedia Layer and it is uses an abstraction on OpenGL for the 3D.
http://www.libsdl.org/index.php
This means that it's a layer(SDL) on a layer(OpenGL) on the 3d hardware. But tossing Irrlicht on top of it, you get a layer(Irrlicht) on a layer(SDL) on a layer(OpenGL) on the 3d hardware.
Irrlicht is the same thing as SDL, but not as complete yet, nor does it do anything but 3D graphics. It uses OpenGL (or DX or Software) to render 3d, just like SDL.
Irrlicht also handles the GUI setup for each environment similiar to SDL, just the framework for that GUI hasn't been setup up (as far as I know) for anything other than Linux and Windows.
So... to draw this again, this is how it looks now.
SDL -> OpenGL -> 3D hardware
Irrlicht -> OpenGL -> 3D hardware
or Irrlicht -> Direct3D -> 3D hardware
What your proposing is:
Irrlicht -> SDL -> OpenGL -> 3D hardware
http://www.libsdl.org/index.php
This means that it's a layer(SDL) on a layer(OpenGL) on the 3d hardware. But tossing Irrlicht on top of it, you get a layer(Irrlicht) on a layer(SDL) on a layer(OpenGL) on the 3d hardware.
Irrlicht is the same thing as SDL, but not as complete yet, nor does it do anything but 3D graphics. It uses OpenGL (or DX or Software) to render 3d, just like SDL.
Irrlicht also handles the GUI setup for each environment similiar to SDL, just the framework for that GUI hasn't been setup up (as far as I know) for anything other than Linux and Windows.
So... to draw this again, this is how it looks now.
SDL -> OpenGL -> 3D hardware
Irrlicht -> OpenGL -> 3D hardware
or Irrlicht -> Direct3D -> 3D hardware
What your proposing is:
Irrlicht -> SDL -> OpenGL -> 3D hardware
Crud, how do I do this again?
I wouldn't consider Irrlicht to be the same as SDL. I think it's more high level than that. The point of SDL is to provide a cross platform interface to the graphics hardware and input/sound, etc. - that's all. Irrlicht does a bit more. It provides scene graph/node support, animation, loading of meshes, loading of textures, etc. This is all something that SDL does not provide on it's own.Irrlicht is the same thing as SDL, but not as complete yet, nor does it do anything but 3D graphics. It uses OpenGL (or DX or Software) to render 3d, just like SDL.
Rather than compare SDL to Irrlicht directly, I think it's better to compare SDL to something like DirectX. It's true that SDL is in fact a wrapper around DirectX, but as far as the developer needs to be concerned they are equivalent.
Not exactly... If you use SDL, you need to set OpenGL rendering up through SDL, but after that it's exactly as if you set OpenGL up through X11, Or Win32, it's all the same. There is no need to go through SDL for the most part, you can just access OpenGL calls directly. So the OpenGL renderer in Irrlicht can stay the same.What your proposing is:
Irrlicht -> SDL -> OpenGL -> 3D hardware
So, for 99% of the code, it's still:
Irrlicht -> OpenGL -> 3D hardware
If you're using the software renderer then it's different, in which case it would look like this:
Irrlicht -> SDL -> DirectX -> Display
In that case it does add an extra layer of abstraction, but that is what you get for the extra portability.
The idea is to just let SDL, an already well established portable library, handle the OS dependent stuff. I think this is more productive and will instantly allow Irrlicht to run on a wide array of devices that would otherwise have taken a much larger amount of work porting to.
Let me know if i'm just wrong here. I've been wrong before and i'll be wrong again.
-Shane
-
Xample
well, to me it seams that you would just have to implement the following
classes:
class CSDLVideo : public CVideoNULL;
class CSDLTexture : public ITexture;
class CIrrDeviceSDL : public CIrrDeviceStub, video::ISurfacePresenter
(probably you could just use the opengl video implementation with CIrrDeviceSDL, so video and texture support needn't be reimplemented. and there already exist 2 examples for those classes wouldn't be too hard at all)
would be great because then irrlicht would run on OSX
and we could use a lot of SDL stuff if we wanted to.
classes:
class CSDLVideo : public CVideoNULL;
class CSDLTexture : public ITexture;
class CIrrDeviceSDL : public CIrrDeviceStub, video::ISurfacePresenter
(probably you could just use the opengl video implementation with CIrrDeviceSDL, so video and texture support needn't be reimplemented. and there already exist 2 examples for those classes wouldn't be too hard at all)
would be great because then irrlicht would run on OSX
and we could use a lot of SDL stuff if we wanted to.
-
mudfly
I realize this is an old thread, but I have a few comments and I am wondering if SDL is now supported in Irrlicht. I read this thread and SDL does add a layer but you also gain quite a few plugins that would need to be reimplemented. Here are a few that I think stand out.
SDL_net - Small cross platform network library
SDL_mixer - Multi-channel audio mixer library
SDL_image - image file loading library
SDL_ttf - library which allows you to use TrueType fonts
SDL_sound - decodes any format under the sun
The last interesting one could help in even more rapid game development
Pygame why not use irrlicht as _THE_ renderer in python 3d games?
Cheers
SDL_net - Small cross platform network library
SDL_mixer - Multi-channel audio mixer library
SDL_image - image file loading library
SDL_ttf - library which allows you to use TrueType fonts
SDL_sound - decodes any format under the sun
The last interesting one could help in even more rapid game development
Pygame why not use irrlicht as _THE_ renderer in python 3d games?
Cheers