diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-29 04:21:36 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-29 04:21:36 +0000 |
commit | 8bf5a3eff3ae66eb2f4dae5feb1ae58dd240b4f3 (patch) | |
tree | 71919c02268fd8a8d462cccd5d3f211c3da57d81 /gpu/command_buffer/client/gles2_implementation.cc | |
parent | a8125d2a01d5d1f12f6dc23881b457804c904509 (diff) | |
download | chromium_src-8bf5a3eff3ae66eb2f4dae5feb1ae58dd240b4f3.zip chromium_src-8bf5a3eff3ae66eb2f4dae5feb1ae58dd240b4f3.tar.gz chromium_src-8bf5a3eff3ae66eb2f4dae5feb1ae58dd240b4f3.tar.bz2 |
Implements glGetVertexAttribPointerv
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/549201
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation.cc')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 78 |
1 files changed, 76 insertions, 2 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 032717d..61639b8 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -5,8 +5,6 @@ // A class to emluate GLES2 over command buffers. #include "gpu/command_buffer/client/gles2_implementation.h" -// TODO(gman): remove when all functions have been implemented. -#include "gpu/command_buffer/client/gles2_implementation_gen.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" namespace gpu { @@ -56,6 +54,11 @@ void GLES2Implementation::FreeIds(GLsizei n, const GLuint* ids) { } } +void GLES2Implementation::CopyResult(void* dst) { + SizedResult* result = static_cast<SizedResult*>(result_buffer_); + memcpy(dst, result->GetDataAs<void*>(), result->size); +} + void GLES2Implementation::WaitForCmd() { int32 token = helper_->InsertToken(); helper_->WaitForToken(token); @@ -76,6 +79,14 @@ void GLES2Implementation::SwapBuffers() { Finish(); } +void GLES2Implementation::GetVertexAttribPointerv( + GLuint index, GLenum pname, void** ptr) { + helper_->GetVertexAttribPointerv( + index, pname, result_shm_id(), result_shm_offset()); + WaitForCmd(); + CopyResult(ptr); +}; + GLint GLES2Implementation::GetAttribLocation( GLuint program, const char* name) { helper_->GetAttribLocationImmediate( @@ -270,5 +281,68 @@ void GLES2Implementation::TexSubImage2D( } +GLenum GLES2Implementation::CheckFramebufferStatus(GLenum target) { + // TODO(gman): implement. + return 0; +} + +void GLES2Implementation::GetActiveAttrib( + GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, + GLenum* type, char* name) { + // TODO(gman): implement. +} + +void GLES2Implementation::GetActiveUniform( + GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, + GLenum* type, char* name) { + // TODO(gman): implement. +} + +void GLES2Implementation::GetAttachedShaders( + GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { + // TODO(gman): implement. +} + +void GLES2Implementation::GetProgramInfoLog( + GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { + // TODO(gman): implement. +} + +void GLES2Implementation::GetShaderInfoLog( + GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { + // TODO(gman): implement. +} + +void GLES2Implementation::GetShaderPrecisionFormat( + GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { + // TODO(gman): implement. +} + +void GLES2Implementation::GetShaderSource( + GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { + // TODO(gman): implement. +} + +const GLubyte* GLES2Implementation::GetString(GLenum name) { + // TODO(gman): implement. + return 0; +} + +void GLES2Implementation::GetUniformfv( + GLuint program, GLint location, GLfloat* params) { + // TODO(gman): implement. +} + +void GLES2Implementation::GetUniformiv( + GLuint program, GLint location, GLint* params) { + // TODO(gman): implement. +} + +void GLES2Implementation::ReadPixels( + GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, + void* pixels) { + // TODO(gman): implement. +} + } // namespace gles2 } // namespace gpu |