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

Function CreateCShaderProgram

renderdoc/driver/gl/gl_debug.cpp:125–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125GLuint CreateCShaderProgram(const rdcstr &src)
126{
127 GLuint cs = CreateShader(eGL_COMPUTE_SHADER, src);
128 if(cs == 0)
129 return 0;
130
131 GLuint ret = GL.glCreateProgram();
132
133 GL.glAttachShader(ret, cs);
134
135 GL.glLinkProgram(ret);
136
137 char buffer[1024] = {};
138 GLint status = 0;
139 GL.glGetProgramiv(ret, eGL_LINK_STATUS, &status);
140 if(status == 0)
141 {
142 GL.glGetProgramInfoLog(ret, 1024, NULL, buffer);
143 RDCERR("Link error: %s", buffer);
144 }
145
146 GL.glDetachShader(ret, cs);
147
148 GL.glDeleteShader(cs);
149
150 return ret;
151}
152
153GLuint CreateShaderProgram(GLuint vs, GLuint fs, GLuint gs)
154{

Callers 3

CreateMethod · 0.85
InitDebugDataMethod · 0.85

Calls 8

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

Tested by

no test coverage detected