Beginning OpenGLSL

i have the version 04.3

Do you have the Framework .NET 1.1 installed?
By the way, I think that the best forum for Shader Designer is it: http://www.typhoonlabs.com/opengl/?q=forum/7
If you have any question or problem with the SD, please post there instead of here

Ok i use glee (glew does not work glewinit() fails :frowning: . By the way what is the main difference between glew and glee?)
Now i did the stuff to let the shader work but i have one problem :
My shader is used but after a few seconds i cannot see anythink. My vertexshader does nothing
(void main(void){gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex}" :wink:
What is wrong with this code?
The only thing which i can see is a triangle for one second(the triangle flickers) and then nothing. What is wrong?

Ok i have a solution: i wrote a fragmentshader and everything worked. But do i realy need a fragmentshader if i want to program a vertexshader?

No. But if you don’t, you have to use the standard varying values provided by the vertex shader language spec.

I do not understand.
My program will not work if i do not program a fragmentshader too. And if i apply a vertexshader, does the whole “normal” rendering which is performed by Opengl(lighting…) is not performed anymore? I have a simple vertex shader(it does nothing(gl_Position = gl_Vertex) but now i can only see a triangle without the ligthingeffects which are normaly applied by OpenGL. What is wrong?

Originally posted by Songoku:
And if i apply a vertexshader, does the whole “normal” rendering which is performed by Opengl(lighting…) is not performed anymore?
Read the spec:

A vertex shader replaces the transformation, texture coordinate generation and lighting parts of OpenGL
If you want any of that, you’ll have to implement it yourself.

– Tom

(Edit: UBB code)

That is hard but thanks.

Does anyone know how to get the color set by glColorxy() in a fragmentshader?(it is not gl_Color)

You can access the colors of a vertex in a FS through the varyings gl_FrontColor and gl_BackColor, but don’t forget to set them in your VS.

Originally posted by Songoku:
[QB]Ok i use glee (glew does not work glewinit() fails :frowning: . By the way what is the main difference between glew and glee?)
To be perfectly honest, (as the developer of GLee), not a great deal. They both support all the GL, GLX and WGL extensions of note, and have very similar interfaces. GLEW does currently have better cross-platform support if you need platforms other than Windows and Linux.

I have a couple of ideas for new features to add over the next couple of months, but don’t expect anything major. After all, there are only so many features you need in an extension library, and I’d prefer to keep it slim and uncluttered than overflowing with redundant features.

Ok. Can anyone explain the difference between a uniform qualifier and a attribute?

Originally posted by Songoku:
Ok. Can anyone explain the difference between a uniform qualifier and a attribute?
You have read the spec, haven’t you?

Yes i have but i do not understand realy the difference. You can change uniforms with your c++app and you can change attributes with your c++apps. Where is the difference?

Uniforms are constant values that you set from your application. Attributes are per-vertex values such as texture coordinates and colours. You can specify attributes using standard texture coordinates and colours etc, or you can use the attribute keyword to specify named uniforms. There’s a limit of 16 attributes per vertex, whichever approach you take.

Does somebody know a good site to learn more about shaders? Examples or tutorials but with explanation.If there is a site out there for Openglsl tutorials it would be helpful, but other shader tutorials will work too(but please tutorials with explanations of the shader code). Thanks

Originally posted by Songoku:
Does somebody know a good site to learn more about shaders? Examples or tutorials but with explanation.If there is a site out there for Openglsl tutorials it would be helpful, but other shader tutorials will work too(but please tutorials with explanations of the shader code). Thanks
Several new GLSL demos with source code at:
http://www.3dlabs.com/support/developer/ogl2/downloads/index.htm

The recent “OpenGL Shading Language” book:
http://3dshaders.com/

the openGL Shader Designer (already mentioned by Ffelagund) will ship with a complete set of tutorials for glsl. The first one starting with an introduction to the IDE, and the rest on shaders written in glsl. All the way from the basics to texturing, lighting, bumpmapping, color keying, grayscale, evnmapping, displacement mapping, refraction and more is covered). The editor is currently in heavy development and new features gets added every day.

It’s freeware:)

Stay put for more information.

  • Eirik Hoem
    mail ‘at’ eirikhoem dot net

I have downloaded the shader Designer but there are not any tutorials :frowning: Where to find them?

they are not completed yet, and will be released with the first official release version of the shader designer. we are currently working very hard to improve the SD and maing the UI as easy to use as possible.

ETA : a week or two