OK, so I have some C++ flavored OpenGL code to draw a line to a renderbuffer in
XCode 3.2.2. I then use glReadPixels to get the pixels to pass into
REALBuildPictureFromBuffer.  Here's where things get odd;

<a bunch of openGL code goes here, and I can post it all if need be, but bear
with me…>

//Allocating my buffer.
unsigned char myBuf[imageWidth * imageHeight * 3];

//Populating my buffer.
glReadPixels( 0, 0, imageWidth, imageHeight, GL_RGB,
GL_UNSIGNED_BYTE, &myBuf);

//Cleaning up after myself.
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
glDeleteRenderbuffersEXT(1, &renderbuffer);

//Maximum strangeness happens here;
return REALBuildPictureFromBuffer(imageWidth, imageHeight,
kRBPixelRGB24, myBuf, imageWidth * 3);

Here's the issue.  When imageWidth = imageHeight, it works perfectly.  When
imageWidth <> imageHeight, my test app which calls my plugin method crashes
almost instantly.  Now it's quite possible that I'm overlooking something
fundamental, as I've only just begun my XCode odyssey and there's a TON I don't
know.  Still, this has me scratching my head.  Why would it work as expected in
just one, limited case?


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to