View Full Version : Opengl mode problem

07-17-2014, 09:32 AM
I found a problem,
In the OpenGL mode when the sprite image size more than a certain size, it will throw exception in some machines.
E.g. I have a 9600*300 PNG images for sprite , on some the computer with integrated graphics will cause GL_INVALID_VALUE errors when flip.
when i changed png size to 4800 * 600 , Although not all computer, but most of them can work properly.

07-17-2014, 05:17 PM
Sprite it too large.

4096x4096 is probably safe to use these days. I would not use any larger for width or height.

You can use GL_MAX_TEXTURE_SIZE​ to determine the maximum texture size

clan::GLint max = 0;
clan::glGetIntegerv(clan::GL_MAX_TEXTURE_SIZE​ , &max);