A incredible problem about core image generated from the opengl texture.
A incredible problem about core image generated from the opengl texture.
- Subject: A incredible problem about core image generated from the opengl texture.
- From: Steve Walter <email@hidden>
- Date: Sat, 7 Apr 2007 00:32:06 +0000
Hi list.
I am studying the core image technique right now, and I am doing
experiment with the CIImage object method :
initWithTexture:(unsigned long)name size:(CGSize)size flipped:(BOOL)
flag colorSpace:(CGColorSpaceRef)cs
However, when I used this method in the sample program:
"QuartzComposerTexture", nightmare fell.
In the source file:"PBufferRenderer.m", you will find the following
code:
glGenTextures(1, &_textureName);
//Configure the texture - For extra safety, we save and restore the
currently bound texture
glGetIntegerv((_textureTarget == GL_TEXTURE_RECTANGLE_EXT ?
GL_TEXTURE_BINDING_RECTANGLE_EXT : GL_TEXTURE_BINDING_2D),
&saveTextureName);
glBindTexture(_textureTarget, _textureName);
CIImage *newImage = [CIImage initWithTexture:_textureName
size:myCGSize flipped:YES colorSpace:myColorSpace];
glTexParameteri(_textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(_textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
if(_textureTarget == GL_TEXTURE_RECTANGLE_EXT) {
glTexParameteri(_textureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(_textureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
else {
glTexParameteri(_textureTarget, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(_textureTarget, GL_TEXTURE_WRAP_T, GL_REPEAT);
}
glBindTexture(_textureTarget, saveTextureName);
What I have done is to insert the red code to the position, compile
the application and go, the program crashed at the exact position as
the red code specified.
Really don't know how and why this can happen. If anyone knows the
reason for this weird problem and the solution, would you please
notify me?
Thank you in advanced. Any help and guide is appreciated.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden