// EXTERNAL INCLUDES
#include <sstream>
#include <string>
+#include <cstring>
#include <map>
#include <cstdio>
#include <cstring> // for strcmp
inline void DeleteTextures(GLsizei n, const GLuint* textures)
{
std::stringstream out;
- out << n << ", " << textures << " = [" ;
+ out << n << ", " << textures << " = [";
for(GLsizei i=0; i<n; i++)
{
- out << textures[i] << ", " ;
+ out << textures[i] << ", ";
mDeletedTextureIds.push_back(textures[i]);
}
out << "]";
inline void GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
{
+ switch(index)
+ {
+ case 0:
+ *length = snprintf(name, bufsize, "sTexture");
+ *type = GL_SAMPLER_2D;
+ *size = 1;
+ break;
+ case 1:
+ *length = snprintf(name, bufsize, "sEffect");
+ *type = GL_SAMPLER_2D;
+ *size = 1;
+ break;
+ default:
+ break;
+ }
}
inline void GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
inline void GetProgramiv(GLuint program, GLenum pname, GLint* params)
{
- switch( pname ) {
+ switch( pname )
+ {
case GL_LINK_STATUS:
*params = mLinkStatus;
break;
case GL_PROGRAM_BINARY_LENGTH_OES:
*params = mProgramBinaryLength;
break;
+ case GL_ACTIVE_UNIFORMS:
+ *params = mNumberOfActiveUniforms;
+ break;
+ case GL_ACTIVE_UNIFORM_MAX_LENGTH:
+ *params = 100;
+ break;
}
}
{
}
-
inline void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
}
std::stringstream out;
out << program;
mShaderTrace.PushCall("LinkProgram", out.str());
+
+ mNumberOfActiveUniforms=2;
+ GetUniformLocation(program, "sTexture");
+ GetUniformLocation(program, "sEffect");
}
inline void PixelStorei(GLenum pname, GLint param)
BufferDataCalls mBufferDataCalls;
BufferSubDataCalls mBufferSubDataCalls;
GLuint mLinkStatus;
+ GLint mNumberOfActiveUniforms;
GLint mGetAttribLocationResult;
GLenum mGetErrorResult;
GLubyte* mGetStringResult;