Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SGIS_generate_mipmap and pbuffers?



hiya,

...I finally was able to get my pbuffer stuff sorted out, but it seems that there is a problem that the particular ported code has brought to light: it uses auto-mipmap generation via the SGIS_generate_mipmap extension, and the generated textures don't seem correct...

...basically, I create a pbuffer (and have tried with and without levels of mipmaps) that gets drawn to and is then textured with glCopyTexSubImage2d(): I use the following to set up the texture:

glGenTextures(1,&glow_tex);
glBindTexture(GL_TEXTURE_2D,glow_tex);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_GENERATE_MIPMAP_SGIS,GL_TRUE);
cglReportError( CGLTexImagePBuffer( data->old_context, data->pbuffer, GL_FRONT) );

...and then texture with:

glBindTexture(GL_TEXTURE_2D,glow_tex);
glCopyTexSubImage2D(GL_TEXTURE_2D,0,0,0,0,0,pbuffer->width,pbuffer->height);

...has anyone else noticed any issues with this?

jamie
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.