OpenGL Questions

I have been using jme for a while now, but am just starting to dig deeper into the mechanics of open gl because I like to understand how all the pieces fit together and hope to be able to write some fancy new shaders  ;).  I come from some DirectX background and HLSL and have found OpenGL very different in almost every way.  I've started by working through the opengl red book tutorials.  I have some questions that I hope some of you opengl gurus can help me with: 

  1. What's the difference between a VertexProgram + Fragment Program and a GLSL program using vertex and pixel sharders?  Are the VertexProgram and FragmentProgram simply outdated since OpenGL 2.0 and replaced by GLSL programs if you don't mind writing your shaders in GLSL?  Other than compatibility is there any reason to write the old ones?

  2. What are the D3D surface/render target equivalents in open gl?
  3. Is there a way to test for Anti-aliasing sample level support for a graphics card like in DirectX or are we forced to just see if sampling supported at all and then just try to create the display at that level and simply conclude not supported if the display creation fails?
  4. Is there a way to test for maximum support depth buffer,stencil buffer bits?  Do the depth buffer and stencil buffer share the same "buffer" like they do in DirectX?

Hello Anubis,

Although I'm new to jME it's been some time "working" with openGL… but as I am not an expert I can answer only your first question  :wink:

Yes, vertex and fragment programs are "outdated" version of GLSL. It was an extension in openGL 1.3, updated in 1.4 and I am not sure, but I think it was added to the specification of 1.5. You had to check for ARB_fragment_program and ARB_vertex_program in order to use them. I advice you that if you don't care about people using graphic cards being 5 years old, there's no reason to learn it, but up to you.