Fix error reporting for lost contexts

Trac #19246 Issue=262 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@906 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 7f4dee14
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 905 #define BUILD_REVISION 906
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -2707,10 +2707,7 @@ GLenum __stdcall glGetError(void) ...@@ -2707,10 +2707,7 @@ GLenum __stdcall glGetError(void)
if (context) if (context)
{ {
if (context->isContextLost()) return context->getError();
return GL_OUT_OF_MEMORY;
else
return context->getError();
} }
return GL_NO_ERROR; return GL_NO_ERROR;
......
...@@ -98,9 +98,18 @@ Context *getNonLostContext() ...@@ -98,9 +98,18 @@ Context *getNonLostContext()
{ {
Context *context = getContext(); Context *context = getContext();
if (context && !context->isContextLost()) if (context)
return context; {
if (context->isContextLost())
{
error(GL_OUT_OF_MEMORY);
return NULL;
}
else
{
return context;
}
}
return NULL; return NULL;
} }
......
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