Rainer Deyke
03-27-2005, 07:21 PM
Not sure if this is the right place to post this...
I've got a program that crashes on glCompileShaderARB. The problem seems to be related to the use of gl_TexCoord in a GLSL fragment shader. I've reduced it to the following minimal example:
#include "SDL.h"
#include "GL/glew.h"
char const *shader_source =
"uniform sampler2D texture;\n"
"void main()\n"
"{\n"
" gl_FragColor = texture2D(texture, gl_TexCoord[0].st);\n"
"}\n";
int main(int, char *[])
{
SDL_Init(SDL_INIT_VIDEO);
SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);
glewInit();
GLhandleARB shader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
glShaderSourceARB(shader, 1, &shader_source, 0);
glCompileShaderARB(shader);
SDL_Quit();
return 0;
}This crashes on my Mac Mini. It does not crash on any other computer I've tried, but I've only tried one other computer. The Mac Mini has OS X 10.3.8 installed, and identifies its video card as ATY,RV280, vendor ATI. This looks like a driver bug to me, although I don't want to rule out other possibilities.
Questions: Can anybody confirm this bug? How widespread is it? Are there any known workarounds?
I've got a program that crashes on glCompileShaderARB. The problem seems to be related to the use of gl_TexCoord in a GLSL fragment shader. I've reduced it to the following minimal example:
#include "SDL.h"
#include "GL/glew.h"
char const *shader_source =
"uniform sampler2D texture;\n"
"void main()\n"
"{\n"
" gl_FragColor = texture2D(texture, gl_TexCoord[0].st);\n"
"}\n";
int main(int, char *[])
{
SDL_Init(SDL_INIT_VIDEO);
SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);
glewInit();
GLhandleARB shader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
glShaderSourceARB(shader, 1, &shader_source, 0);
glCompileShaderARB(shader);
SDL_Quit();
return 0;
}This crashes on my Mac Mini. It does not crash on any other computer I've tried, but I've only tried one other computer. The Mac Mini has OS X 10.3.8 installed, and identifies its video card as ATY,RV280, vendor ATI. This looks like a driver bug to me, although I don't want to rule out other possibilities.
Questions: Can anybody confirm this bug? How widespread is it? Are there any known workarounds?