From 254492ffd6b6ce4b5a2ca89294b9b63add0bb504 Mon Sep 17 00:00:00 2001 From: Jacky Romano Date: Mon, 11 Apr 2011 18:21:28 +0300 Subject: 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 --- tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp') 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; -- cgit v1.2.3