Hi there,
I am writing a program using shaders but with the code listed below it works only on my ati no other machines. I am sure this piece of code is where the problem is. If anyone can point me in the right direction it would be appreciated
glActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,MainTex);
for k := NUMLAYERS-1 downto 0 do
for j := 0 to Y-1 do
for i := 0 to X-1 do
begin
if MyTile[k,i,j].Active then
begin
glUseProgramObjectARBProgramObject);
glActiveTextureARB(GL_TEXTURE1_ARB);
PGS := 'normalMap'+#0;
loc2 := glGetUniformLocationARB(ProgramObject,PGLCHARARB(PGS));
glUniform1iARB(loc2,1);
glActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,MyTile[k,i,j].pic);
glUniform4fARB(loc3,Light0Pos[0],Light0Pos[1],Light0Pos[2],Light0Pos[3]);
glBegin(GL_QUADS);
glEnd;
glUseProgramObjectARB(0);
glBegin(GL_QUADS);
glEnd;
glDisable(GL_TEXTURE_2D);
end;
end;
end;