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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user