Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: ui/gl/gl_context.cc

Issue 139013008: Implement support for rendering to 32-bit float textures on ES3 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make TexSubImage validation agree with TexImage validation Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index dc3a3e8c21e0323b0c68061c6b4a592f63eb3fd3..cd9a28c387dcfabd66c18b7ccf7bbd3b88c3ff44 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -66,6 +66,13 @@ std::string GLContext::GetGLVersion() {
return std::string(version ? version : "");
}
+std::string GLContext::GetGLRenderer() {
+ DCHECK(IsCurrent(NULL));
+ const char *renderer =
+ reinterpret_cast<const char*>(glGetString(GL_RENDERER));
+ return std::string(renderer ? renderer : "");
+}
+
bool GLContext::HasExtension(const char* name) {
std::string extensions = GetExtensions();
extensions += " ";
@@ -79,8 +86,9 @@ bool GLContext::HasExtension(const char* name) {
const GLVersionInfo* GLContext::GetVersionInfo() {
if(!version_info_) {
std::string version = GetGLVersion();
+ std::string renderer = GetGLRenderer();
version_info_ = scoped_ptr<GLVersionInfo>(
- new GLVersionInfo(version.c_str()));
+ new GLVersionInfo(version.c_str(), renderer.c_str()));
}
return version_info_.get();
}

Powered by Google App Engine
This is Rietveld 408576698