Checks level on relevant gl calls against implementation maximum.

TRAC #18905 Issue=243 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@885 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 059fc15f
#define MAJOR_VERSION 0
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 884
#define BUILD_REVISION 885
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -1100,6 +1100,11 @@ void __stdcall glCopyTexImage2D(GLenum target, GLint level, GLenum internalforma
if (context)
{
if (level > context->getMaximumTextureLevel())
{
return error(GL_INVALID_VALUE);
}
switch (target)
{
case GL_TEXTURE_2D:
......@@ -4765,6 +4770,11 @@ void __stdcall glTexImage2D(GLenum target, GLint level, GLint internalformat, GL
if (context)
{
if (level > context->getMaximumTextureLevel())
{
return error(GL_INVALID_VALUE);
}
switch (target)
{
case GL_TEXTURE_2D:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment