Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using glReadPixels



Hi,
I've just tried to use glReadPixels and all I get are hard crashes... I'm on
linux but I'm pretty sure my problem comes from OpenGL, so there should be no
problem to help me...

here's the code:
GLbyte *thePixels;
glReadBuffer(GL_FRONT_LEFT); // Is this necessary since I read from the default
buffer?
glReadPixels(10,10, 10,10, GL_RGBA, GL_BYTE, &thePixels);
cout << (int)thePixels[0] << endl;

This is included in an actual working program, I'm trying to capture the
image... And it crashes really hard; gives a segmentation fault when used
without acceleration and "fxmesa: Received a not handled signal 11" when using
acceleration...

Any ideas? Hints? Tips? Tricks?

Thanks,
Simon

--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : email@hidden | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.