opengl - glReadPixels: Stack around variable was corrupted after read pixels -
Here's the code I'm trying to use glReadPixels () to read the window of 5 * 5 pixels.
Infected unsigned int WINDOW_SIZE = 5; Const unsigned int NB_COMPONENTS = 3; GLubyte array [NB_COMPONENTS * WINDOW_SIZE * WINDOW_SIZE]; GlReadPixels (0, 0, WINDOW_SIZE, WINDOW_SIZE, GL_RGB, GL_UNSIGNED_BYTE, array);
So far the code causes the following error in the visual studio: "The pile got corrupted around the variable array"
If I fix it 4. does anybody know?
Make sure that you are using GL_RGB
Comments
Post a Comment