Am 23.11.12 11:53, schrieb CoGe - Tamas Nagy:
I think you just need to delete your texture after unbindTexture… Not sure, but
sounds logical.
Thanks, but no luck - still getting the same error, but got this line up
now:
...
// done! scaledTexture now has the scaled contents using bilinear
scaling in hardware
// make sure to delete fbos and texture when done.
GLvoid* pixelData = malloc(width * height *3);
glReadPixels(0,0,width, height, GL_RGB, GL_UNSIGNED_INT_8_8_8_8,
&pixelData);
free(pixelData);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, previousFBO);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, previousReadFBO);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, previousDrawFBO);
glPopAttrib();
[imageToUse unbindTextureRepresentationFromCGLContext:cgl_ctx
textureUnit:GL_TEXTURE0];
// FAILS with
// Quartz Composer[7526:303] *** OpenGL error 0x0502 (invalid
operation) in function "-[QCPlugInInputImage
unbindTextureRepresentationFromCGLContext:textureUnit:]"
[imageToUse unlockTextureRepresentation];
glDeleteBuffers(1, &myFBO);
glDeleteTextures(1, &scaledTexture);
--
Christophe Leske
multimedial.de
----------------------------------------
www.multimedial.de - [email protected]
Hohler Strasse 17 - 51645 Gummersbach
+49(0)2261-99824540 // +49(0)177-2497031
----------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]