Бранимир Караџић hace 4 años
padre
commit
d01f86a6a9
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      src/renderer_gl.cpp

+ 6 - 1
src/renderer_gl.cpp

@@ -6474,7 +6474,12 @@ namespace bgfx { namespace gl
 				code = temp;
 			}
 
-			GL_CHECK(glShaderSource(m_id, 1, (const GLchar**)&code, NULL) );
+			{
+				const GLchar* str = (const GLchar*)code.getPtr();
+				int32_t len = code.getLength();
+				GL_CHECK(glShaderSource(m_id, 1, &str, &len) );
+			}
+
 			GL_CHECK(glCompileShader(m_id) );
 
 			GLint compiled = 0;