Sign in to follow this  
arbuckle911

simple code will run on nVidia 7800 but not radeaon 9800pro

Recommended Posts

I've been trying to debug this shader application for a while now and I got it running fine but it wont run on a radeon 9800pro. All the extentions are supported on the radeon as well as on my nvidia 7800. Here is the app code:
//Render....
{
	glEnableClientState(GL_VERTEX_ARRAY);
	glEnableClientState(GL_TEXTURE_COORD_ARRAY);
	shader->use();
	glActiveTexture(GL_TEXTURE0);
	glBindTexture(GL_TEXTURE_2D, decal);
	shader->sendUniform(TerrainLOD::decalLoc, 0);
.........
some culling code
.........
		{
			glBindBuffer(GL_ARRAY_BUFFER, vertBuffers[i]);
			glVertexPointer(3, GL_FLOAT, 0, (void*)0);
			glTexCoordPointer(2, GL_FLOAT, 0, BUFFER_OFFSET(chunkSize*chunkSize*4*3*sizeof(float)));
			glDrawArrays(GL_QUADS, 0, chunkSize*chunkSize*4);
		}
}


Here is the very simple shader code. Vertex Shader:
void main()
{
	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_Position = ftransform();
}

Fragment Shader:
uniform sampler2D tex;

void main()
{
	gl_FragColor = texture2D(tex, gl_TexCoord[0].st);
        gl_FragColor.g = 0;
}

Basically this turns the texture into a light pink(at least the texture I'm using) on my vidia 7800, but on a radeon 9800pro the orginal colours are displayed. Is there another way to write the same thing to make it compatable on a radeon9800?

Share this post


Link to post
Share on other sites
your frag shader, change gl_FragColor.g = 0; -> gl_FragColor.g = 0.0; ....it should run fine than.

i like the ATI drivers, they keep you more honest when using GLSL than NVidia does ....you might want to use 3Dlabs GLSL validator too, that is a handy tool.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this