PDA

View Full Version : glProgramEnvParameter4dARB() ?



alexandra
11-08-2006, 04:35 AM
I would like to know what`s this Extension for?
I know this function needs 6 arguments
glProgramEnvParameter4dARB(GL_FRAGMENT_PROGRAM_ARB , a, b,c,d,e );
But what does this function do? and what variables are a,b,c,d,e ?
I try to understand this method. textSize = Size of texture and squareletSize is the size of on cube side because this method is used to map a texture on a cube and then on an object. However maybe some knews glProgramEnvParameter4dARB()

void ParameterizeShader(int textSizeX, int textSizeY, int squareletSize) {
double
d0x = 1.0 / textSizeX ,
d0y = 1.0 / textSizeY ,
d1x = 255.0 * squareletSize / textSizeX ,
d1y = 255.0 * squareletSize / textSizeY ,
d2x = 1.0 * squareletSize / textSizeX ,
d2y = 1.0 * squareletSize / textSizeY ;
glProgramEnvParameter4dARB( GL_FRAGMENT_PROGRAM_ARB, 0, d0x,d0y,0,0 );
glProgramEnvParameter4dARB( GL_FRAGMENT_PROGRAM_ARB, 1, d1x,d1y,0,0 );
glProgramEnvParameter4dARB( GL_FRAGMENT_PROGRAM_ARB, 2, d2x,d2y,1,0 );
glProgramEnvParameter4dARB( GL_FRAGMENT_PROGRAM_ARB, 3, d2x,d2y,1,1 );
};


Thanks a lot.
Sincerely
Alexandra

Relic
11-08-2006, 04:48 AM
The function is documented here:
http://www.opengl.org/registry/specs/ARB/fragment_program.txt