MCPcopy Create free account
hub / github.com/baldurk/renderdoc / CreateShaderProgram

Function CreateShaderProgram

renderdoc/driver/gl/gl_debug.cpp:153–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153GLuint CreateShaderProgram(GLuint vs, GLuint fs, GLuint gs)
154{
155 GLuint ret = GL.glCreateProgram();
156
157 GL.glAttachShader(ret, vs);
158 GL.glAttachShader(ret, fs);
159 if(gs)
160 GL.glAttachShader(ret, gs);
161
162 GL.glLinkProgram(ret);
163
164 char buffer[1024] = {};
165 GLint status = 0;
166 GL.glGetProgramiv(ret, eGL_LINK_STATUS, &status);
167 if(status == 0)
168 {
169 GL.glGetProgramInfoLog(ret, 1024, NULL, buffer);
170 RDCERR("Shader error: %s", buffer);
171 }
172
173 return ret;
174}
175
176GLuint CreateShaderProgram(const rdcstr &vsSrc, const rdcstr &fsSrc, const rdcstr &gsSrc)
177{

Callers 4

CreateMethod · 0.85
CreateMeshProgramMethod · 0.85
InitDebugDataMethod · 0.85

Calls 9

CreateShaderFunction · 0.85
glCreateProgramMethod · 0.45
glAttachShaderMethod · 0.45
glLinkProgramMethod · 0.45
glGetProgramivMethod · 0.45
glGetProgramInfoLogMethod · 0.45
emptyMethod · 0.45
glDetachShaderMethod · 0.45
glDeleteShaderMethod · 0.45

Tested by

no test coverage detected