MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / createShader

Function createShader

test/browser/test_gl_subdata.c:111–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111GLuint createShader(const char* source, int type) {
112 char msg[512];
113 GLuint shader = glCreateShader(type);
114 glShaderSource(shader, 1, &source, NULL);
115 glCompileShader(shader);
116 glGetShaderInfoLog(shader, sizeof msg, NULL, msg);
117 printf("Shader info: %s\n", msg);
118 return shader;
119}
120
121static void gl_init(void) {
122 GLuint program = glCreateProgram();

Callers 1

gl_initFunction · 0.70

Calls 1

printfFunction · 0.85

Tested by

no test coverage detected