Implement more detailed GetString(GL_RENDERER)

Trac #17815 Issue=161 Signed-off-by: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@733 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 57f7ce00
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 731 #define BUILD_REVISION 733
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -308,6 +308,7 @@ void Context::makeCurrent(egl::Display *display, egl::Surface *surface) ...@@ -308,6 +308,7 @@ void Context::makeCurrent(egl::Display *display, egl::Surface *surface)
} }
initExtensionString(); initExtensionString();
initRendererString();
mState.viewportX = 0; mState.viewportX = 0;
mState.viewportY = 0; mState.viewportY = 0;
...@@ -3423,6 +3424,21 @@ const char *Context::getExtensionString() const ...@@ -3423,6 +3424,21 @@ const char *Context::getExtensionString() const
return mExtensionString.c_str(); return mExtensionString.c_str();
} }
void Context::initRendererString()
{
egl::Display *display = getDisplay();
D3DADAPTER_IDENTIFIER9 *identifier = display->getAdapterIdentifier();
mRendererString = "ANGLE (";
mRendererString += identifier->Description;
mRendererString += ")";
}
const char *Context::getRendererString() const
{
return mRendererString.c_str();
}
void Context::blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, void Context::blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask) GLbitfield mask)
......
...@@ -436,6 +436,7 @@ class Context ...@@ -436,6 +436,7 @@ class Context
GLsizei getMaxSupportedSamples() const; GLsizei getMaxSupportedSamples() const;
int getNearestSupportedSamples(D3DFORMAT format, int requested) const; int getNearestSupportedSamples(D3DFORMAT format, int requested) const;
const char *getExtensionString() const; const char *getExtensionString() const;
const char *getRendererString() const;
bool supportsEventQueries() const; bool supportsEventQueries() const;
bool supportsDXT1Textures() const; bool supportsDXT1Textures() const;
bool supportsDXT3Textures() const; bool supportsDXT3Textures() const;
...@@ -480,6 +481,9 @@ class Context ...@@ -480,6 +481,9 @@ class Context
bool cullSkipsDraw(GLenum drawMode); bool cullSkipsDraw(GLenum drawMode);
bool isTriangleMode(GLenum drawMode); bool isTriangleMode(GLenum drawMode);
void initExtensionString();
void initRendererString();
const egl::Config *const mConfig; const egl::Config *const mConfig;
State mState; State mState;
...@@ -495,8 +499,8 @@ class Context ...@@ -495,8 +499,8 @@ class Context
FenceMap mFenceMap; FenceMap mFenceMap;
HandleAllocator mFenceHandleAllocator; HandleAllocator mFenceHandleAllocator;
void initExtensionString();
std::string mExtensionString; std::string mExtensionString;
std::string mRendererString;
VertexDataManager *mVertexDataManager; VertexDataManager *mVertexDataManager;
IndexDataManager *mIndexDataManager; IndexDataManager *mIndexDataManager;
......
...@@ -3222,7 +3222,7 @@ const GLubyte* __stdcall glGetString(GLenum name) ...@@ -3222,7 +3222,7 @@ const GLubyte* __stdcall glGetString(GLenum name)
case GL_VENDOR: case GL_VENDOR:
return (GLubyte*)"Google Inc."; return (GLubyte*)"Google Inc.";
case GL_RENDERER: case GL_RENDERER:
return (GLubyte*)"ANGLE"; return (GLubyte*)((context != NULL) ? context->getRendererString() : "ANGLE");
case GL_VERSION: case GL_VERSION:
return (GLubyte*)"OpenGL ES 2.0 (ANGLE "VERSION_STRING")"; return (GLubyte*)"OpenGL ES 2.0 (ANGLE "VERSION_STRING")";
case GL_SHADING_LANGUAGE_VERSION: case GL_SHADING_LANGUAGE_VERSION:
......
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