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

Unified Diff: ppapi/shared_impl/ppb_opengles2_shared.cc

Issue 397183002: Add PPAPI interface for OpenGL ES 2.0 Vertex Array Objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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: ppapi/shared_impl/ppb_opengles2_shared.cc
diff --git a/ppapi/shared_impl/ppb_opengles2_shared.cc b/ppapi/shared_impl/ppb_opengles2_shared.cc
index 00cb2ed2f4d57f9df1a19c0f3732794d8401cc61..8979a3aba5c3b0313e734e57284cfda96df06c20 100644
--- a/ppapi/shared_impl/ppb_opengles2_shared.cc
+++ b/ppapi/shared_impl/ppb_opengles2_shared.cc
@@ -1476,6 +1476,38 @@ void GetQueryObjectuivEXT(PP_Resource context_id,
}
}
+void GenVertexArraysOES(PP_Resource context_id, GLsizei n, GLuint* arrays) {
+ Enter3D enter(context_id, true);
+ if (enter.succeeded()) {
+ ToGles2Impl(&enter)->GenVertexArraysOES(n, arrays);
+ }
+}
+
+void DeleteVertexArraysOES(PP_Resource context_id,
+ GLsizei n,
+ const GLuint* arrays) {
+ Enter3D enter(context_id, true);
+ if (enter.succeeded()) {
+ ToGles2Impl(&enter)->DeleteVertexArraysOES(n, arrays);
+ }
+}
+
+GLboolean IsVertexArrayOES(PP_Resource context_id, GLuint array) {
+ Enter3D enter(context_id, true);
+ if (enter.succeeded()) {
+ return ToGles2Impl(&enter)->IsVertexArrayOES(array);
+ } else {
+ return GL_FALSE;
+ }
+}
+
+void BindVertexArrayOES(PP_Resource context_id, GLuint array) {
+ Enter3D enter(context_id, true);
+ if (enter.succeeded()) {
+ ToGles2Impl(&enter)->BindVertexArrayOES(array);
+ }
+}
+
GLboolean EnableFeatureCHROMIUM(PP_Resource context_id, const char* feature) {
Enter3D enter(context_id, true);
if (enter.succeeded()) {
@@ -1687,6 +1719,13 @@ const PPB_OpenGLES2Query* PPB_OpenGLES2_Shared::GetQueryInterface() {
&EndQueryEXT, &GetQueryivEXT, &GetQueryObjectuivEXT};
return &ppb_opengles2;
}
+const PPB_OpenGLES2VertexArray*
+PPB_OpenGLES2_Shared::GetVertexArrayInterface() {
+ static const struct PPB_OpenGLES2VertexArray ppb_opengles2 = {
+ &GenVertexArraysOES, &DeleteVertexArraysOES, &IsVertexArrayOES,
+ &BindVertexArrayOES};
+ return &ppb_opengles2;
+}
const PPB_OpenGLES2DrawBuffers_Dev*
PPB_OpenGLES2_Shared::GetDrawBuffersInterface() {
static const struct PPB_OpenGLES2DrawBuffers_Dev ppb_opengles2 = {

Powered by Google App Engine
This is Rietveld 408576698