MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / CompileOne

Function CompileOne

engine/PoseidonGL33/EngineGL33_ShadowDepth.cpp:63–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61)";
62
63GLuint CompileOne(GLenum type, const char* src)
64{
65 GLuint sh = glCreateShader(type);
66 glShaderSource(sh, 1, &src, nullptr);
67 glCompileShader(sh);
68 GLint ok = 0;
69 glGetShaderiv(sh, GL_COMPILE_STATUS, &ok);
70 if (!ok)
71 {
72 char log[512];
73 glGetShaderInfoLog(sh, sizeof(log), nullptr, log);
74 LOG_ERROR(Graphics, "GL33 shadow-depth shader compile: {}", log);
75 glDeleteShader(sh);
76 return 0;
77 }
78 return sh;
79}
80
81bool EnsureProgram()
82{

Callers 2

EnsureProgramFunction · 0.85
EnsureAlphaProgramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected