blob: 014759a16a38989b8c84050502e2f430dc91f023 [file] [log] [blame]
Geoff Langf9a6f082015-01-22 13:32:49 -05001//
2// Copyright 2015 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// ProgramGL.cpp: Implements the class methods for ProgramGL.
8
9#include "libANGLE/renderer/gl/ProgramGL.h"
10
11#include "common/debug.h"
Geoff Lang5ed74cf2015-04-14 13:57:07 -040012#include "common/utilities.h"
Geoff Langb1f435e2015-02-20 10:01:01 -050013#include "libANGLE/renderer/gl/FunctionsGL.h"
14#include "libANGLE/renderer/gl/ShaderGL.h"
15#include "libANGLE/renderer/gl/StateManagerGL.h"
Geoff Langf9a6f082015-01-22 13:32:49 -050016
17namespace rx
18{
19
Geoff Langb1f435e2015-02-20 10:01:01 -050020ProgramGL::ProgramGL(const FunctionsGL *functions, StateManagerGL *stateManager)
21 : ProgramImpl(),
22 mFunctions(functions),
23 mStateManager(stateManager),
24 mProgramID(0)
25{
26 ASSERT(mFunctions);
27 ASSERT(mStateManager);
Geoff Lang0ca53782015-05-07 13:49:39 -040028
29 mProgramID = mFunctions->createProgram();
Geoff Langb1f435e2015-02-20 10:01:01 -050030}
Geoff Langf9a6f082015-01-22 13:32:49 -050031
32ProgramGL::~ProgramGL()
Geoff Langb1f435e2015-02-20 10:01:01 -050033{
Geoff Lang0ca53782015-05-07 13:49:39 -040034 mFunctions->deleteProgram(mProgramID);
35 mProgramID = 0;
Geoff Langb1f435e2015-02-20 10:01:01 -050036}
Geoff Langf9a6f082015-01-22 13:32:49 -050037
38bool ProgramGL::usesPointSize() const
39{
40 UNIMPLEMENTED();
41 return bool();
42}
43
44int ProgramGL::getShaderVersion() const
45{
46 UNIMPLEMENTED();
47 return int();
48}
49
50GLenum ProgramGL::getTransformFeedbackBufferMode() const
51{
52 UNIMPLEMENTED();
53 return GLenum();
54}
55
56GLenum ProgramGL::getBinaryFormat()
57{
58 UNIMPLEMENTED();
59 return GLenum();
60}
61
62LinkResult ProgramGL::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream)
63{
64 UNIMPLEMENTED();
65 return LinkResult(false, gl::Error(GL_INVALID_OPERATION));
66}
67
68gl::Error ProgramGL::save(gl::BinaryOutputStream *stream)
69{
70 UNIMPLEMENTED();
71 return gl::Error(GL_INVALID_OPERATION);
72}
73
74LinkResult ProgramGL::link(const gl::Data &data, gl::InfoLog &infoLog,
75 gl::Shader *fragmentShader, gl::Shader *vertexShader,
76 const std::vector<std::string> &transformFeedbackVaryings,
77 GLenum transformFeedbackBufferMode,
78 int *registers, std::vector<gl::LinkedVarying> *linkedVaryings,
79 std::map<int, gl::VariableLocation> *outputVariables)
80{
Geoff Langb1f435e2015-02-20 10:01:01 -050081 // Reset the program state, delete the current program if one exists
82 reset();
83
84 ShaderGL *vertexShaderGL = GetImplAs<ShaderGL>(vertexShader);
85 ShaderGL *fragmentShaderGL = GetImplAs<ShaderGL>(fragmentShader);
86
Geoff Langb1f435e2015-02-20 10:01:01 -050087 // Attach the shaders
88 mFunctions->attachShader(mProgramID, vertexShaderGL->getShaderID());
89 mFunctions->attachShader(mProgramID, fragmentShaderGL->getShaderID());
90
Geoff Langb1f435e2015-02-20 10:01:01 -050091 // Link and verify
92 mFunctions->linkProgram(mProgramID);
93
Geoff Lang0ca53782015-05-07 13:49:39 -040094 // Detach the shaders
95 mFunctions->detachShader(mProgramID, vertexShaderGL->getShaderID());
96 mFunctions->detachShader(mProgramID, fragmentShaderGL->getShaderID());
97
98 // Verify the link
Geoff Langb1f435e2015-02-20 10:01:01 -050099 GLint linkStatus = GL_FALSE;
100 mFunctions->getProgramiv(mProgramID, GL_LINK_STATUS, &linkStatus);
101 ASSERT(linkStatus == GL_TRUE);
102 if (linkStatus == GL_FALSE)
103 {
104 // Linking failed, put the error into the info log
105 GLint infoLogLength = 0;
106 mFunctions->getProgramiv(mProgramID, GL_INFO_LOG_LENGTH, &infoLogLength);
107
108 std::vector<char> buf(infoLogLength);
109 mFunctions->getProgramInfoLog(mProgramID, infoLogLength, nullptr, &buf[0]);
110
111 mFunctions->deleteProgram(mProgramID);
112 mProgramID = 0;
113
Jamie Madillf6113162015-05-07 11:49:21 -0400114 infoLog << &buf[0];
Geoff Langb1f435e2015-02-20 10:01:01 -0500115 TRACE("\n%s", &buf[0]);
116
117 // TODO, return GL_OUT_OF_MEMORY or just fail the link? This is an unexpected case
118 return LinkResult(false, gl::Error(GL_NO_ERROR));
119 }
120
121 // Query the uniform information
122 // TODO: A lot of this logic should be done at the gl::Program level
123 GLint activeUniformMaxLength = 0;
124 mFunctions->getProgramiv(mProgramID, GL_ACTIVE_UNIFORM_MAX_LENGTH, &activeUniformMaxLength);
125
126 std::vector<GLchar> uniformNameBuffer(activeUniformMaxLength);
127
128 GLint uniformCount = 0;
129 mFunctions->getProgramiv(mProgramID, GL_ACTIVE_UNIFORMS, &uniformCount);
130 for (GLint i = 0; i < uniformCount; i++)
131 {
132 GLsizei uniformNameLength = 0;
133 GLint uniformSize = 0;
134 GLenum uniformType = GL_NONE;
135 mFunctions->getActiveUniform(mProgramID, i, uniformNameBuffer.size(), &uniformNameLength, &uniformSize, &uniformType, &uniformNameBuffer[0]);
136
Geoff Lang5ed74cf2015-04-14 13:57:07 -0400137 std::string uniformName = gl::ParseUniformName(std::string(&uniformNameBuffer[0], uniformNameLength), nullptr);
138
139 for (size_t arrayIndex = 0; arrayIndex < static_cast<size_t>(uniformSize); arrayIndex++)
140 {
141 std::string locationName = uniformName;
142 if (uniformSize > 1)
143 {
144 locationName += "[" + Str(arrayIndex) + "]";
145 }
146
147 GLint location = mFunctions->getUniformLocation(mProgramID, locationName.c_str());
148 if (location >= 0)
149 {
150 // Make sure the uniform index array is large enough
151 if (static_cast<size_t>(location) >= mUniformIndex.size())
152 {
153 mUniformIndex.resize(location + 1);
154 }
155
156 mUniformIndex[location] = gl::VariableLocation(uniformName, arrayIndex, static_cast<unsigned int>(mUniforms.size()));
Geoff Langf51bc792015-05-04 14:57:03 -0400157
158 // If the uniform is a sampler, track it in the sampler bindings array
159 if (gl::IsSamplerType(uniformType))
160 {
161 SamplerLocation samplerLoc;
162 samplerLoc.samplerIndex = mSamplerBindings.size();
163 samplerLoc.arrayIndex = arrayIndex;
164 mSamplerUniformMap[location] = samplerLoc;
165 }
Geoff Lang5ed74cf2015-04-14 13:57:07 -0400166 }
167 }
168
169 // ANGLE uses 0 to identify an non-array uniform.
170 unsigned int arraySize = (uniformSize > 1) ? static_cast<unsigned int>(uniformSize) : 0;
Geoff Langb1f435e2015-02-20 10:01:01 -0500171
172 // TODO: determine uniform precision
Geoff Lang5ed74cf2015-04-14 13:57:07 -0400173 mUniforms.push_back(new gl::LinkedUniform(uniformType, GL_NONE, uniformName, arraySize, -1, sh::BlockMemberInfo::getDefaultBlockInfo()));
Geoff Langf51bc792015-05-04 14:57:03 -0400174
175 // If uniform is a sampler type, insert it into the mSamplerBindings array
176 if (gl::IsSamplerType(uniformType))
177 {
178 SamplerBindingGL samplerBinding;
179 samplerBinding.textureType = gl::SamplerTypeToTextureType(uniformType);
180 samplerBinding.boundTextureUnits.resize(uniformSize, 0);
181 mSamplerBindings.push_back(samplerBinding);
182 }
Geoff Langb1f435e2015-02-20 10:01:01 -0500183 }
184
185 // Query the attribute information
186 GLint activeAttributeMaxLength = 0;
187 mFunctions->getProgramiv(mProgramID, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &activeAttributeMaxLength);
188
189 std::vector<GLchar> attributeNameBuffer(activeAttributeMaxLength);
190
191 GLint attributeCount = 0;
192 mFunctions->getProgramiv(mProgramID, GL_ACTIVE_ATTRIBUTES, &attributeCount);
193 for (GLint i = 0; i < attributeCount; i++)
194 {
195 GLsizei attributeNameLength = 0;
196 GLint attributeSize = 0;
197 GLenum attributeType = GL_NONE;
198 mFunctions->getActiveAttrib(mProgramID, i, attributeNameBuffer.size(), &attributeNameLength, &attributeSize, &attributeType, &attributeNameBuffer[0]);
199
200 std::string attributeName(&attributeNameBuffer[0], attributeNameLength);
201
Geoff Lang0ca53782015-05-07 13:49:39 -0400202 GLint location = mFunctions->getAttribLocation(mProgramID, attributeName.c_str());
203
Geoff Langb1f435e2015-02-20 10:01:01 -0500204 // TODO: determine attribute precision
Geoff Lang0ca53782015-05-07 13:49:39 -0400205 setShaderAttribute(static_cast<size_t>(i), attributeType, GL_NONE, attributeName, attributeSize, location);
Geoff Langb1f435e2015-02-20 10:01:01 -0500206 }
207
208 return LinkResult(true, gl::Error(GL_NO_ERROR));
Geoff Langf9a6f082015-01-22 13:32:49 -0500209}
210
Geoff Lang0ca53782015-05-07 13:49:39 -0400211void ProgramGL::bindAttributeLocation(GLuint index, const std::string &name)
212{
213 mFunctions->bindAttribLocation(mProgramID, index, name.c_str());
214}
215
Geoff Langf9a6f082015-01-22 13:32:49 -0500216void ProgramGL::setUniform1fv(GLint location, GLsizei count, const GLfloat *v)
217{
Geoff Lang63cbace2015-02-26 10:03:12 -0500218 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500219 mFunctions->uniform1fv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500220}
221
222void ProgramGL::setUniform2fv(GLint location, GLsizei count, const GLfloat *v)
223{
Geoff Lang63cbace2015-02-26 10:03:12 -0500224 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500225 mFunctions->uniform2fv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500226}
227
228void ProgramGL::setUniform3fv(GLint location, GLsizei count, const GLfloat *v)
229{
Geoff Lang63cbace2015-02-26 10:03:12 -0500230 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500231 mFunctions->uniform3fv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500232}
233
234void ProgramGL::setUniform4fv(GLint location, GLsizei count, const GLfloat *v)
235{
Geoff Lang63cbace2015-02-26 10:03:12 -0500236 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500237 mFunctions->uniform4fv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500238}
239
240void ProgramGL::setUniform1iv(GLint location, GLsizei count, const GLint *v)
241{
Geoff Lang63cbace2015-02-26 10:03:12 -0500242 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500243 mFunctions->uniform1iv(location, count, v);
Geoff Langf51bc792015-05-04 14:57:03 -0400244
245 auto iter = mSamplerUniformMap.find(location);
246 if (iter != mSamplerUniformMap.end())
247 {
248 const SamplerLocation &samplerLoc = iter->second;
249 std::vector<GLuint> &boundTextureUnits = mSamplerBindings[samplerLoc.samplerIndex].boundTextureUnits;
250
251 size_t copyCount = std::max<size_t>(count, boundTextureUnits.size() - samplerLoc.arrayIndex);
252 std::copy(v, v + copyCount, boundTextureUnits.begin() + samplerLoc.arrayIndex);
253 }
Geoff Langf9a6f082015-01-22 13:32:49 -0500254}
255
256void ProgramGL::setUniform2iv(GLint location, GLsizei count, const GLint *v)
257{
Geoff Lang63cbace2015-02-26 10:03:12 -0500258 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500259 mFunctions->uniform2iv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500260}
261
262void ProgramGL::setUniform3iv(GLint location, GLsizei count, const GLint *v)
263{
Geoff Lang63cbace2015-02-26 10:03:12 -0500264 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500265 mFunctions->uniform3iv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500266}
267
268void ProgramGL::setUniform4iv(GLint location, GLsizei count, const GLint *v)
269{
Geoff Lang63cbace2015-02-26 10:03:12 -0500270 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500271 mFunctions->uniform4iv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500272}
273
274void ProgramGL::setUniform1uiv(GLint location, GLsizei count, const GLuint *v)
275{
Geoff Lang63cbace2015-02-26 10:03:12 -0500276 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500277 mFunctions->uniform1uiv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500278}
279
280void ProgramGL::setUniform2uiv(GLint location, GLsizei count, const GLuint *v)
281{
Geoff Lang63cbace2015-02-26 10:03:12 -0500282 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500283 mFunctions->uniform2uiv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500284}
285
286void ProgramGL::setUniform3uiv(GLint location, GLsizei count, const GLuint *v)
287{
Geoff Lang63cbace2015-02-26 10:03:12 -0500288 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500289 mFunctions->uniform3uiv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500290}
291
292void ProgramGL::setUniform4uiv(GLint location, GLsizei count, const GLuint *v)
293{
Geoff Lang63cbace2015-02-26 10:03:12 -0500294 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500295 mFunctions->uniform4uiv(location, count, v);
Geoff Langf9a6f082015-01-22 13:32:49 -0500296}
297
298void ProgramGL::setUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
299{
Geoff Lang63cbace2015-02-26 10:03:12 -0500300 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500301 mFunctions->uniformMatrix2fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500302}
303
304void ProgramGL::setUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
305{
Geoff Lang63cbace2015-02-26 10:03:12 -0500306 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500307 mFunctions->uniformMatrix3fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500308}
309
310void ProgramGL::setUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
311{
Geoff Lang63cbace2015-02-26 10:03:12 -0500312 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500313 mFunctions->uniformMatrix4fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500314}
315
316void ProgramGL::setUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
317{
Geoff Lang63cbace2015-02-26 10:03:12 -0500318 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500319 mFunctions->uniformMatrix2x3fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500320}
321
322void ProgramGL::setUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
323{
Geoff Lang63cbace2015-02-26 10:03:12 -0500324 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500325 mFunctions->uniformMatrix3x2fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500326}
327
328void ProgramGL::setUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
329{
Geoff Lang63cbace2015-02-26 10:03:12 -0500330 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500331 mFunctions->uniformMatrix2x4fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500332}
333
334void ProgramGL::setUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
335{
Geoff Lang63cbace2015-02-26 10:03:12 -0500336 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500337 mFunctions->uniformMatrix4x2fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500338}
339
340void ProgramGL::setUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
341{
Geoff Lang63cbace2015-02-26 10:03:12 -0500342 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500343 mFunctions->uniformMatrix3x4fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500344}
345
346void ProgramGL::setUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
347{
Geoff Lang63cbace2015-02-26 10:03:12 -0500348 mStateManager->useProgram(mProgramID);
Geoff Langb1f435e2015-02-20 10:01:01 -0500349 mFunctions->uniformMatrix4x3fv(location, count, transpose, value);
Geoff Langf9a6f082015-01-22 13:32:49 -0500350}
351
352void ProgramGL::getUniformfv(GLint location, GLfloat *params)
353{
Geoff Langb1f435e2015-02-20 10:01:01 -0500354 mFunctions->getUniformfv(mProgramID, location, params);
Geoff Langf9a6f082015-01-22 13:32:49 -0500355}
356
357void ProgramGL::getUniformiv(GLint location, GLint *params)
358{
Geoff Langb1f435e2015-02-20 10:01:01 -0500359 mFunctions->getUniformiv(mProgramID, location, params);
Geoff Langf9a6f082015-01-22 13:32:49 -0500360}
361
362void ProgramGL::getUniformuiv(GLint location, GLuint *params)
363{
Geoff Langb1f435e2015-02-20 10:01:01 -0500364 mFunctions->getUniformuiv(mProgramID, location, params);
Geoff Langf9a6f082015-01-22 13:32:49 -0500365}
366
367GLint ProgramGL::getSamplerMapping(gl::SamplerType type, unsigned int samplerIndex, const gl::Caps &caps) const
368{
369 UNIMPLEMENTED();
370 return GLint();
371}
372
373GLenum ProgramGL::getSamplerTextureType(gl::SamplerType type, unsigned int samplerIndex) const
374{
375 UNIMPLEMENTED();
376 return GLenum();
377}
378
379GLint ProgramGL::getUsedSamplerRange(gl::SamplerType type) const
380{
381 UNIMPLEMENTED();
382 return GLint();
383}
384
385void ProgramGL::updateSamplerMapping()
386{
387 UNIMPLEMENTED();
388}
389
390bool ProgramGL::validateSamplers(gl::InfoLog *infoLog, const gl::Caps &caps)
391{
Geoff Lang35d315c2015-03-31 12:48:54 -0400392 //UNIMPLEMENTED();
Geoff Langb1f435e2015-02-20 10:01:01 -0500393 return true;
Geoff Langf9a6f082015-01-22 13:32:49 -0500394}
395
396LinkResult ProgramGL::compileProgramExecutables(gl::InfoLog &infoLog, gl::Shader *fragmentShader, gl::Shader *vertexShader,
397 int registers)
398{
Geoff Langb1f435e2015-02-20 10:01:01 -0500399 //UNIMPLEMENTED();
400 return LinkResult(true, gl::Error(GL_NO_ERROR));
Geoff Langf9a6f082015-01-22 13:32:49 -0500401}
402
403bool ProgramGL::linkUniforms(gl::InfoLog &infoLog, const gl::Shader &vertexShader, const gl::Shader &fragmentShader,
404 const gl::Caps &caps)
405{
Geoff Langb1f435e2015-02-20 10:01:01 -0500406 //UNIMPLEMENTED();
407 return true;
Geoff Langf9a6f082015-01-22 13:32:49 -0500408}
409
410bool ProgramGL::defineUniformBlock(gl::InfoLog &infoLog, const gl::Shader &shader, const sh::InterfaceBlock &interfaceBlock,
411 const gl::Caps &caps)
412{
413 UNIMPLEMENTED();
414 return bool();
415}
416
417gl::Error ProgramGL::applyUniforms()
418{
419 UNIMPLEMENTED();
420 return gl::Error(GL_INVALID_OPERATION);
421}
422
Gregoire Payen de La Garanderie68694e92015-03-24 14:03:37 +0000423gl::Error ProgramGL::applyUniformBuffers(const gl::Data &data, GLuint uniformBlockBindings[])
Geoff Langf9a6f082015-01-22 13:32:49 -0500424{
425 UNIMPLEMENTED();
426 return gl::Error(GL_INVALID_OPERATION);
427}
428
429bool ProgramGL::assignUniformBlockRegister(gl::InfoLog &infoLog, gl::UniformBlock *uniformBlock, GLenum shader,
430 unsigned int registerIndex, const gl::Caps &caps)
431{
432 UNIMPLEMENTED();
433 return bool();
434}
435
Geoff Langb1f435e2015-02-20 10:01:01 -0500436void ProgramGL::reset()
437{
438 ProgramImpl::reset();
Geoff Langf51bc792015-05-04 14:57:03 -0400439
440 mSamplerUniformMap.clear();
441 mSamplerBindings.clear();
Geoff Langb1f435e2015-02-20 10:01:01 -0500442}
443
444GLuint ProgramGL::getProgramID() const
445{
446 return mProgramID;
447}
448
Geoff Langf51bc792015-05-04 14:57:03 -0400449const std::vector<SamplerBindingGL> &ProgramGL::getAppliedSamplerUniforms() const
450{
451 return mSamplerBindings;
452}
453
Geoff Langf9a6f082015-01-22 13:32:49 -0500454}