MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / checkMesaBug

Method checkMesaBug

src/opengl_depth_packet_processor.cpp:133–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 }
132
133 void checkMesaBug()
134 {
135 if (is_mesa_checked)
136 return;
137 is_mesa_checked = true;
138 std::string ren((const char*)glGetString(GL_RENDERER));
139 std::string ver((const char*)glGetString(GL_VERSION));
140 if (ren.find("Mesa DRI Intel") == 0)
141 {
142 size_t mesa_pos = ver.rfind("Mesa ");
143 if (mesa_pos != std::string::npos)
144 {
145 double mesa_ver = atof(ver.substr(mesa_pos + 5).c_str());
146 if (mesa_ver < 10.3)
147 {
148 defines += "#define MESA_BUGGY_BOOL_CMP\n";
149 LOG_WARNING << "Working around buggy boolean instructions in your Mesa driver. Mesa DRI 10.3+ is recommended.";
150 }
151 }
152 }
153 }
154
155 void setVertexShader(const std::string& src)
156 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected