MCPcopy Index your code
hub / github.com/ad-si/LuaCAD / getGLSLShader

Function getGLSLShader

OpenCSG/src/context.cpp:128–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126 }
127
128 static GLuint getGLSLShader(GLenum target, const char* prog)
129 {
130 GLuint id = glCreateShader(target);
131 glShaderSource(id, 1, &prog, 0);
132 glCompileShader(id);
133
134 GLint success;
135 char infoLog[512];
136
137 glGetShaderiv(id, GL_COMPILE_STATUS, &success);
138 if (!success) {
139 glGetShaderInfoLog(id, 512, NULL, infoLog);
140 //std::cerr << "Vertex Shader Compilation Error: " << infoLog << std::endl;
141 }
142
143 return id;
144 }
145
146 GLuint getGLSLVertexShader(const char* prog)
147 {

Callers 2

getGLSLVertexShaderFunction · 0.85
getGLSLFragmentShaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected