Commit e42753b2 by Geoff Lang

Implement GL_VENDOR and GL_RENDERER strings for RendererGL.

Change-Id: Ib83faa605fd1b992e19ddc2b72c7917d82245d32 Reviewed-on: https://chromium-review.googlesource.com/264664Tested-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 50931459
...@@ -188,14 +188,28 @@ VendorID RendererGL::getVendorId() const ...@@ -188,14 +188,28 @@ VendorID RendererGL::getVendorId() const
std::string RendererGL::getVendorString() const std::string RendererGL::getVendorString() const
{ {
UNIMPLEMENTED(); return std::string(reinterpret_cast<const char*>(mFunctions->getString(GL_VENDOR)));
return std::string();
} }
std::string RendererGL::getRendererDescription() const std::string RendererGL::getRendererDescription() const
{ {
//UNIMPLEMENTED(); std::string nativeVendorString(reinterpret_cast<const char*>(mFunctions->getString(GL_VENDOR)));
return std::string(); std::string nativeRendererString(reinterpret_cast<const char*>(mFunctions->getString(GL_RENDERER)));
GLuint major;
GLuint minor;
bool isES;
nativegl::GetGLVersion(mFunctions->getString, &major, &minor, &isES);
std::ostringstream rendererString;
rendererString << nativeVendorString << " " << nativeRendererString << " OpenGL";
if (isES)
{
rendererString << " ES";
}
rendererString << " " << major << "." << minor;
return rendererString.str();
} }
void RendererGL::generateCaps(gl::Caps *outCaps, gl::TextureCapsMap* outTextureCaps, gl::Extensions *outExtensions) const void RendererGL::generateCaps(gl::Caps *outCaps, gl::TextureCapsMap* outTextureCaps, gl::Extensions *outExtensions) const
......
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