• Advertisement
Sign in to follow this  

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

This topic is 4346 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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);
			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
Advertisement
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
Sign in to follow this  

  • Advertisement