-
Bind GL_TEXTURE_RECTANGLE_NV texture!
Can I bind a float GL_TEXTURE_RECTANGLE_NV texture to a fragment program using
cgGLSetTextureParameter( paraFpTexture, fptexture ) ?
I used following code to test it, but the result it all black.
Any idea?
---------------------------------------------
cgGLBindProgram(vProgram);
cgGLEnableProfile(vProfile);
cgGLBindProgram(fProgram);
cgGLEnableProfile(fProfile);
cgGLSetStateMatrixParameter( paraVpModelViewProj,
CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY ) ;
cgGLSetTextureParameter( paraFpTexture, fptexture ) ;
cgGLEnableTextureParameter( paraFpTexture ) ;
glTranslatef(-0.5, -0.5,-0.9);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex2f(0.0, 0.0);
glTexCoord2f(width, 0.0); glVertex2f(1.0, 0.0);
glTexCoord2f(width, height); glVertex2f(1.0, 1.0);
glTexCoord2f(0.0, height); glVertex2f(0.0, 1.0);
glEnd();
cgGLDisableTextureParameter( paraFpTexture ) ;
cgGLDisableProfile(vProfile);
cgGLDisableProfile(fProfile);
--------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules