I have a Direct3D 9.0 engine and I want to add an OpenGL renderer.
The engine uses deferred lighting with Shader model 3.0 and unfortunately isn't written in abstraction level in mind. I mean, it uses DirectX types, objects and D3DX calls all over the code.
My questions are :
1. What OpenGL version I should implement ? OpenGL 2.x , 3.x, 4.0 ? I need a smooth transition and easy port, that matches Direct3D 9.0 functionality well.
2. Should I use glew, glut, SDL , other stuff like that ? I will most probably want to port it to other platforms like Linux, Mac ? I don't want to mess with extensions so probably glew will be of help.
3. Should I use nVidia CG shader language in order to use my existing HLSL shader code directly, without rewriting them to GLSL ?
4. Is there a good sample source code, tutorials, articles that show basic deferred rendering with a modern OpenGL way ( version 3 ++) ?
5. I'm using D3DX library for common math stuff etc, is there a library for OpenGL that is to it, like D3DX is to Direct3D ?
I have a limited OpenGL experience from the past.
More questions to come.
opengl 2.1 matches dx9 functionality.
yes you should use glew and sdl (or sfml, if you prefer c++-ish solutions), but these are not mandatory, you can write your own.
well cg is another language right? so you would have to port to cg then... the question is, do you want to learn glsl or not?
but there are tons of others. google is your friend.
well for mesh loading and stuff related to that, you have assimp
for texture loading, you can do this with sdl / sfml. Just load in an image using sdl / sfml, acquire the pointer to the raw data, and fill a texture using that data.
I have also developed a math library: https://github.com/Yours3lf/libmymath
if you need anythin else, just go to the topics (http://www.gamedev.net/forum/25-opengl/) look at the right side of the page -->
and there you have it, tons of links.