Page 1 of 1
Ogre3d vs SDL
Posted: Sat Sep 07, 2019 8:50 am
I have a couple of long-running game/multimedia projects which I'm modernizing. I want a cross-platform, open-source 3D engine with a C++ interface and support for modern GPU hardware and APIs. I've narrowed the choices down to Ogre3d 2.1 and SDL, both long-running, actively developed projects that meet my technical requirements. I want to go with the one that's more pleasant to work with.
In the past I used Ogre3d 1.x and while it had a lot of guides and documentation, much of that documentation was outdated or incomplete. This seems to have gotten worse with the release of Ogre3d version 2. Meanwhile, SDL is an unknown for me, but one with a good-looking resume.
Can someone with experience in both weigh in?
Re: Ogre3d vs SDL
Posted: Sun Sep 08, 2019 1:54 am
If I am not mistaken, If you plan on doing 3D in SDL, you'll have to write everything 3D related from scratch. SDL is not a 3D engine.
Ogre3D is just a 3D Engine. If you use Ogre3D, you'll have to write everything not-3D related from scratch (or use various libraries).
As such, if you were wise, you'd just use Ogre3D as your renderer, and SDL for everything not-3D.
Re: Ogre3d vs SDL
Posted: Mon Sep 09, 2019 2:42 am
Yes, Ogre 1.9 has a lot of good documentation and top-grade tutorial. I miss those old good days.
Practically, SDL by itself can't render efficiently. You have to plug it with some rendering API, such as OpenGL.
SDL is so small. It takes little time to setup. The real work is how you set up
and use OpenGL.
I recently migrate a part of my projects from Ogre3D 2.1 to Opengl-SDL.
Here is what I experienced between Ogre3D and OpenGL.
Comparative Advantage of OpenGL
- OpenGL has various tutorial and example in the internet (see learnopengl.com) - more than Ogre3D 2.1.
- OpenGL has more solid documentation. It is mostly very hard to read though.
- In Ogre, there are a lot of nook and cranny e.g. I can't change mesh easily.
OpenGL has less of such things, perhaps just because it is known by more people.
- Far more flexible and more explicit - with additional effort, of course.
- IMHO, OpenGL is easier to debug.
- In my case, I get better performance, because I can cut feature that I don't need in Ogre, and avoid copy-data to Ogre.
I also have power manipulate storage address of game-play and Rendering. Thus, I avoid more cache miss.
- Feel more independent. Nevertheless, it still depends on OpenGL & SDL.
- In Ogre, if I want to use special feature, I need to code Glsl partially manually (even in HLMS) - same with pure OpenGL.
- Take more time to make it work. Take even more time to make it right (e.g. instance rendering and Forward3D).
- I have to control rendering manually - VAO, VBO, FBO, Mesh loader, Light, Shadow (didn't try) and Order Sorting.
However, that is a fun part.
- There are more (but smaller) pitfalls that are hard to debug e.g. access per-instance attribute in fragment shader = all zero.
They are usually known by people in the area, but not by new comers.
- I miss those Ogre HLMS magic e.g. @property, and AZDO. I will have to create it myself, if I need.
- If I want to use other APIs e.g. directX or Vulkan, I have to learn it again.
- Miss the days that I waited for dark_sylinc for a new gorgeous patch, and/or begged him to debug my garbage code.
Haha, like EricB said, I am probably not so wise.
Disclaimer : I am just a beginner in Both Ogre3D and SDL.