Rendering With Only GLSL

Started by
2 comments, last by V-man 16 years, 11 months ago
Just a question, is it possible to write a renderer with just GLSL and not using fixed pipe programming.
Advertisement
My renderer uses strictly GLSL. I tried to disable the GPU program to draw some unlit lines with Fixed Function PL but couldn't get it to work so I just used my "FlatShader" to draw them.

GLSL makes it way to easy to add new features, I suggest you go for it.

edit: When getting started I asked what shaders I should start with. Here are the shaders I use to give you an idea.

Ready for GLSL
Program Log: c:\media\shaders\shadow.shader <-depth only
Program Log: c:\media\shaders\flat.shader <-no lighting
Program Log: c:\media\shaders\brightfilter.shader <-bright pass filter
Program Log: c:\media\shaders\finalmix.shader <-final scene mixer
Program Log: c:\media\shaders\horizontalblur.shader <-blur filter
Program Log: c:\media\shaders\verticalblur.shader <-blur filter
Program Log: c:\media\shaders\pervertex.shader <-simple lighting
Program Log: c:\media\shaders\simple.shader <-not so simple lighting/shadowing
Program Log: c:\media\shaders\sky.shader <-sky renderer

All but the last 3 are loaded by the renderer for scene independent use. The last 3 are loaded as needed by loading models into the renderer.
Yes. The FFP is likely to be deprecated soon so there's no real alternative!

Previously "Krohm"

It won't be deprecated soon. GL 2.1 is likely to be the last version.
Then comes GL lean and mean, which won't have FFP at all. It will be a thinner API and will be different.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement