summaryrefslogtreecommitdiff
path: root/tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp
diff options
context:
space:
mode:
authorJacky Romano <jr@graphtech.co.il>2011-04-11 18:21:28 +0300
committerJacky Romano <jr@graphtech.co.il>2011-05-02 18:23:13 +0300
commit254492ffd6b6ce4b5a2ca89294b9b63add0bb504 (patch)
treebbab461e6d5d25e058d73021c5128df4b5e74a80 /tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp
parent3c2aa9b9318a36fb4329bab692678d86af87d0f3 (diff)
Add GLESv2 functionality to GLESv1/GLESv2 shared code
Extends GLClientState to support additional state data that is required by GLESv2. this includes: * normalized flag in vertex attribute arrays * getter for vertex attribute arrays state * glParamSize now knows about the result size of GL2 parameters * utility functions required for a GLESv2 encoder Change-Id: I7e57d978bed5b8b929b918aee66c7f71dc5df3b1
Diffstat (limited to 'tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp')
-rw-r--r--tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp
index 85def13e6..a7e2ea008 100644
--- a/tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp
+++ b/tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp
@@ -70,7 +70,7 @@ void GLClientState::enable(int location, int state)
m_states[location].enabled = state;
}
-void GLClientState::setState(int location, int size, GLenum type, GLsizei stride, void *data)
+void GLClientState::setState(int location, int size, GLenum type, GLboolean normalized, GLsizei stride, void *data)
{
if (!validLocation(location)) {
return;
@@ -81,6 +81,7 @@ void GLClientState::setState(int location, int size, GLenum type, GLsizei stride
m_states[location].data = data;
m_states[location].bufferObject = m_currentArrayVbo;
m_states[location].elementSize = glSizeof(type) * size;
+ m_states[location].normalized = normalized;
}
void GLClientState::setBufferObject(int location, GLuint id)
@@ -210,7 +211,7 @@ int GLClientState::setPixelStore(GLenum param, GLint value)
-size_t GLClientState::pixelDataSize(GLsizei width, GLsizei height, GLenum format, GLenum type, int pack)
+size_t GLClientState::pixelDataSize(GLsizei width, GLsizei height, GLenum format, GLenum type, int pack) const
{
int pixelsize = glUtilsPixelBitSize(format, type) >> 3;