Hi there,
I would like to scale a texture image in the GPU to a new format - I got
this in place already for my patch - how do I scale the texture and get
the pixel data from it?
Can anyone point me into the right direction, please?
// open gl
CGLContextObj cgl_ctx = [context CGLContextObj];
GLenum error;
if (![imageToUse lockTextureRepresentationWithColorSpace:colorSpace
forBounds:[imageToUse imageBounds]])
{
NSLog(@"Locking of texture failed.");
return NO;
}
[imageToUse bindTextureRepresentationToCGLContext:cgl_ctx
textureUnit:GL_TEXTURE0 normalizeCoordinates:YES];
// scaling in opengl comes here...
// uuuuuuuuuh....
[imageToUse unbindTextureRepresentationFromCGLContext:cgl_ctx
textureUnit:GL_TEXTURE0];
[imageToUse unlockTextureRepresentation];
--
Christophe Leske
multimedial.de
----------------------------------------
www.multimedial.de - i...@multimedial.de
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 (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com