This is a patch that uses GLSL for vertex shaders instead of CG in the OpenGL plugin. It doesn't work yet, it's just a bunch of black screen. I am probably going to need help fixing it. I included debugging code that prints to stderr. There are some errors sometimes, I haven't narrowed down exactly where they are coming from.
I have my graphics settings set to disable Dest Alpha Pass, lighting, and fog. These settings still show a nice picture with the OpenGL/CG plugin, and this way I don't have to convert as much code and will minimize the possible sources for errors.
I'm not sure that I mapped all of the varying variables correctly, and I'm not sure that the fragment shader is getting them all. That's next on my list to test.
After this patch is applied, you can still build the OpenGL/CG shader by commenting out #define GLSL 1 in GLUtil.h.
I have my graphics settings set to disable Dest Alpha Pass, lighting, and fog. These settings still show a nice picture with the OpenGL/CG plugin, and this way I don't have to convert as much code and will minimize the possible sources for errors.
I'm not sure that I mapped all of the varying variables correctly, and I'm not sure that the fragment shader is getting them all. That's next on my list to test.
After this patch is applied, you can still build the OpenGL/CG shader by commenting out #define GLSL 1 in GLUtil.h.