PDA

View Full Version : Opengl Shaders



EvilE
05-06-2004, 08:05 AM
I just started getting into Opengl Pixel/Vertex shaders (I've been doing Direct3D shaders for over a year), and it's hard to find much documentation and samples out there. Can someone point to me to some of the better OpenGL shader resoures out there. Also I want to know how to find out what pixel/version is supported (1.0,1.1, ect.. ) on hardware. I'm assuming the versions are identical to what you get in Direct3D. Also when using glProgramStringARB, I want to be able to find out if the shader has compiled succefully and if not, what were the errors. The shader operations seem to be similiar to Direct3D shaders but I really would like an easy to use documentation like what you get with direct3d.

Corrail
05-06-2004, 09:28 AM
Hello!

First there is no possibility to ask OpenGL which shader version is really supported.

Here are some links on GLSL examples and tutorials:
http://www.clockworkcoders.com/oglsl/
http://www.3dlabs.com/support/developer/ogl2/index.htm
http://www.ati.com/developer/indexsc.html
http://www.ampoff.org/modules.php?name=Forums&file=viewforum&f=1
http://esprit.campus.luth.se/~humus/3D/index.php?page=OpenGL

nrg
05-06-2004, 11:16 AM
You can use ARB_fragment_program (pixel shaders), or ARB_vertex_program (vertex shaders). These are lowlevel shaders.

ARB_fp is something like ps2.0, and ARB_vp is something like vs1.3?

Or then you can use GLSL, which is highlevel. GLSL extensions are ARB_fragment_shader, ARB_vertex_shader and ARB_shading_language_100.

You can check the extension spesifications from:
http://oss.sgi.com/projects/ogl-sample/registry/

And you can use GLEW (http://glew.sf.net) to load and use the extensions.

You can also find a lot of examples by browsing and searching these forums..

Also check website of Humus: http://esprit.campus.luth.se/~humus/3D/index.php

Hope that helps.