Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 549201: Implements glGetVertexAttribPointerv (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/client/gles2_implementation.cc
===================================================================
--- gpu/command_buffer/client/gles2_implementation.cc (revision 37435)
+++ gpu/command_buffer/client/gles2_implementation.cc (working copy)
@@ -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::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 @@
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 @@
}
+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
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/gles2_implementation_gen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698