site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com I'm creating a plugin for Motion using the FXPLUG API. I previously implemented the algorithm as a software-mode render. Now I am making it a hardware-accelerated plugin, in preparation for evolving the algorithm to use OpenGL 3D manipulations. In my algorithm, I need to be able to sample colors from the input image. I am attempting to do so using the API's 'createData' method on the input texture to copy the texture bitmap to CPU memory. I am not getting the desired results; the bitmap data reads as all 0's. I have also tried manually binding the texture prior to calling createData using [inTex bind]. I have also utilized glGetTexImage in place of using createData (with the same result). No glErrors are indicated. The input texture is fine; I am able to draw it to output. Am I missing something obvious, here? ---- inTex is the input image passed to renderOutput: GLubyte* NewMemBuffer = [inTex createData: GL_RGBA withType: GL_UNSIGNED_BYTE] ; UInt32 x,y,index; GLubyte *point, cv0, cv1, cv2, cv3; for ( y = 0; y < [inTex height]; y=y+100 ) { for ( x = 0; x < [inTex width]; x=x+100) { index = ((y * [inTex width]) + x) * 4 ; point = NewMemBuffer+index ; cv0 = *point++ ; cv1 = *point++ ; cv2 = *point++ ; cv3 = *point ; if(logErrors) NSLog( @"color values %u %u %u %u", cv0, cv1, cv2, cv3 ) ; } } ===> 2006-01-21 13:58:48.354 Motion[718] NewMemBuffer pointer fc05000 2006-01-21 13:58:48.354 Motion[718] color values 0 0 0 0 2006-01-21 13:58:48.354 Motion[718] color values 0 0 0 0 2006-01-21 13:58:48.354 Motion[718] color values 0 0 0 0 etc. _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... This email sent to site_archiver@lists.apple.com