[squeak-dev] Re: Still pounding head against wall over glReadPixels => external buffer

Lawson English lenglish5 at cox.net
Thu Feb 11 19:41:25 UTC 2010


Andreas Raab wrote:
> Lawson English wrote:
>> ogl                     "read pixels into my buffer"
>>    glReadPixels: 0
>>    with:  -100
>>    with: 100
>>    with: 100
>>    with: ogl imagePixelFormat32
>>    with: ogl imagePixelType32
>>    with: xData.
>
> Reading from -100? That would be offscreen. Try replacing the -100 
> with 0 and you'll get a lot further.
>
> Cheers,
>   - Andreas
>
>>
>>>
>>>     with: ogl extent y - rect bottom
>>>

Somehow I was thinking that ogl extent y - rect bottom = -100.

I'm pretty sure my original test used 0, but no matter. Once I 
substitute mycode with your code it worked.

Not only that but when I reserved shared memory, it worked as well.

so,, the acid test: I fired up a second image in a second instance of 
cobalt, connected the buffer to that image and

in cobalt.image: anAddress byteAt: 1000  => 128
in cobalt.image copy: anAddress byteAt: 1000  => 128


So,  I can now draw using squeak opengl calls and they are now 
accessible in another process.

Closer.

Thanks very much.


Lawson





More information about the Squeak-dev mailing list