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

Function compile_shader

test/browser/webgl_sample_query.c:44–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44GLuint compile_shader(GLenum shaderType, const char *src) {
45 GLuint shader = glCreateShader(shaderType);
46 GL_CALL(glShaderSource(shader, 1, &src, NULL));
47 GL_CALL(glCompileShader(shader));
48
49 GLint isCompiled = 0;
50 GL_CALL(glGetShaderiv(shader, GL_COMPILE_STATUS, &isCompiled));
51 assert(isCompiled);
52 return shader;
53}
54
55GLuint create_program(GLuint vert, GLuint frag) {
56 GLuint program = glCreateProgram();

Callers 1

mainFunction · 0.70

Calls 1

assertFunction · 0.50

Tested by

no test coverage detected