PDA

View Full Version : OpenGL 2.0


mummey
02-20-2005, 04:10 PM
OpenGL 2.0

What's your experience with it? Like it/Hate it? How does it compare with: HLSL, Cg, ARB, Renderman, etc...?

I look forward to the responses.

rakmaya
02-20-2005, 11:52 PM
It is my first post here. My co-workers told me to come down here as it might prove useful.



Anyway, to get to the point. You are trying to compare a Graphics API with a Shader Programming language.

Question would have been more appropriate if it were like "what is the difference between DirectX and OpenGL".

Cg -> Shading language developed by NVIDIA that can be used by both DirectX and OpenGL. Unfortunately only good in PC, XBOX does not support this (obvious I guess).
HLSL -> Shading language developed by Microsoft. Used mostly in the industry by many game/engines due to furture portability ease (in case they want to port their engine to XBOX)
ARB - OpenGL "extention system" You could say these things are going to go out in future. Mostly will be replaced by the former two.

There is no difference between Cg and HLSL (except for some syntaxes). But clearly very useful, once you start to do things with shaders.

hope it helps.:)

mummey
02-21-2005, 02:41 AM
It is my first post here. My co-workers told me to come down here as it might prove useful.



Anyway, to get to the point. You are trying to compare a Graphics API with a Shader Programming language.

Question would have been more appropriate if it were like "what is the difference between DirectX and OpenGL".

Cg -> Shading language developed by NVIDIA that can be used by both DirectX and OpenGL. Unfortunately only good in PC, XBOX does not support this (obvious I guess).
HLSL -> Shading language developed by Microsoft. Used mostly in the industry by many game/engines due to furture portability ease (in case they want to port their engine to XBOX)
ARB - OpenGL "extention system" You could say these things are going to go out in future. Mostly will be replaced by the former two.

There is no difference between Cg and HLSL (except for some syntaxes). But clearly very useful, once you start to do things with shaders.

hope it helps.:)

I believe you misunderstand about what OpenGL 2.0 is. OpenGL 2.0 is the OpenGL Shading Language aka GLSL.

I would suggest all who are curious about what OpenGL 2.0 is read here (http://www.opengl.org/documentation/opengl_current_version.html).

rakmaya
02-21-2005, 04:34 AM
GLSL?.... I see... misunderstood there.

Now that is more sense, We have done couple of testing on that. But never took it seriously yet. This is mainly beause most of the stuff is either for PS2 or XBOX and any OpenGL derivative is not that usefull.

If you are looking into intergrating a high level shading language to your system, I would suggest you go with Cg as that is most proven and optimized compiler (HLSL is also at the same par) and platform independant. Anyone sticking only in OpenGL can also choose GLSL.

There is also a Unified shader system (more like a syntax/compiler system like the C++ compilers) on the way. I am not sure of all the details, but it will defenitly be out around XBOX2 comes out.

playmesumch00ns
02-21-2005, 08:58 AM
Only had a little play with it so far, but I like it a lot. Can't comment on the limitations of the system as compared to Cg, the interface is much nicer and feels much more comfortable to work with than Cg.

rakmaya
02-21-2005, 02:13 PM
All Shading languages has editors that are very good available. The best editor and most used one even in the industry is RenderMonkey from ATI (HLSL shaders).

There are other editors available as well. To learning the shading language and providing support for the shading language is totally different thing. Just beacuase something has nice editor, it shouldn't be used.

It depends on where you are looking at. If you want to stick with PC or Console or something else and what your API is. Some one who learns HLSL can easily create/convert the same shader to Cg or GLSL (and viceversa) in a matter of minutes. Wordpad is the only tool you require.

We are even going to ditch the Rendermonkey soon as 3D Studio Max and Maya is coming up with better support for Hardware shaders now. So Artist can actually work in the Modeling tool all the way from modeling to shading. No need to export the model into X file or any other thing to waste time. So you should be more concentrating on your use and future issues that might come up.

Most shaders are actually taken a little further. We usually, output the assembly instruction and tweak it further for many other needs (Setting / Changing constant registers etc...) for systems where FX File support does not exist.

chromiumjade
02-23-2005, 06:51 AM
I've been having fun (hah!) converting my renderman shaders into RT shaders but I've hit a snag. Does anyone know of a debugger for the pixel/vertex shaders? There's no way (as far as I can tell) to throw errors once those shaders are loaded - can't print anything out, darn it - and I thought I remembered I had a link for a debugger. But I can't find it. Can someone help me out here? Or was this just wistful thinking? How do you handle error catching?

vn0x
02-23-2005, 07:22 PM
I believe you misunderstand about what OpenGL 2.0 is. OpenGL 2.0 is the OpenGL Shading Language aka GLSL.

I would suggest all who are curious about what OpenGL 2.0 is read here (http://www.opengl.org/documentation/opengl_current_version.html).



OpenGL 2.0 isnt quite just the addition of the OpenGL Shading Language though a majority of the updates in this version are to do with GLSL. So far GLSL is only supported via extensions on many of the major graphics cards out today. HLSL on the other hand is a bit more optimized to run on today's current hardware. In terms of the language, I like GLSL quite a bit more than the HLSL or even Cg. However, due to a lack of full OpenGL 2.0 Spec support I'm still using DirectX 9.

rakmaya
02-25-2005, 03:03 PM
The DirectX 9 comes with a Shader debugger (if I am not mistaken, it is installed as a debugger feature with Visual Studio .NET) Not sure of its complete functionality. I never had to use the debugger for shader. The Shaders to me is very simple enough to solve problems. There were certain moments when we were developing the Engine, I wished we had a debugger. LOL, I never used it even though it was there!:scream:

CGTalk Moderation
02-25-2006, 04:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.