MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/HBAOPlus / CompileProgram

Method CompileProgram

src/GLSLProgram.h:152–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150 }
151
152 GLuint CompileProgram(const GFSDK_SSAO_GLFunctions& GL, const char *pVertexShaderGLSL, const char *pFragmentShaderGLSL)
153 {
154 GLuint Program = GL.glCreateProgram();
155 m_VS = AttachShader(GL, Program, GL_VERTEX_SHADER, pVertexShaderGLSL);
156 m_FS = AttachShader(GL, Program, GL_FRAGMENT_SHADER, pFragmentShaderGLSL);
157
158 for (GLuint ColorIndex = 0; ColorIndex < 8; ++ColorIndex)
159 {
160 char VariableName[32];
161 snprintf(VariableName, sizeof(VariableName), "PixOutput%d", ColorIndex);
162 GL.glBindFragDataLocation(Program, ColorIndex, VariableName);
163 ASSERT_GL_ERROR(GL);
164 }
165
166 GL.glLinkProgram(Program);
167 CheckLinkError(GL, Program);
168
169 return Program;
170 }
171
172 GLuint CompileProgram(const GFSDK_SSAO_GLFunctions& GL, const char *pVertexShaderGLSL, const char* pGeometryShaderGLSL, const char *pFragmentShaderGLSL)
173 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected