| 151 | } |
| 152 | |
| 153 | GLuint CreateShaderProgram(GLuint vs, GLuint fs, GLuint gs) |
| 154 | { |
| 155 | GLuint ret = GL.glCreateProgram(); |
| 156 | |
| 157 | GL.glAttachShader(ret, vs); |
| 158 | GL.glAttachShader(ret, fs); |
| 159 | if(gs) |
| 160 | GL.glAttachShader(ret, gs); |
| 161 | |
| 162 | GL.glLinkProgram(ret); |
| 163 | |
| 164 | char buffer[1024] = {}; |
| 165 | GLint status = 0; |
| 166 | GL.glGetProgramiv(ret, eGL_LINK_STATUS, &status); |
| 167 | if(status == 0) |
| 168 | { |
| 169 | GL.glGetProgramInfoLog(ret, 1024, NULL, buffer); |
| 170 | RDCERR("Shader error: %s", buffer); |
| 171 | } |
| 172 | |
| 173 | return ret; |
| 174 | } |
| 175 | |
| 176 | GLuint CreateShaderProgram(const rdcstr &vsSrc, const rdcstr &fsSrc, const rdcstr &gsSrc) |
| 177 | { |
no test coverage detected