Commit e475674e by Krzysztof Kosiński

Implement OES_vertex_array_object.

This extension works the same as OpenGL ES 3.0 vertex arrays, but requires entry points with the OES suffix. Change-Id: I82b92bbcec078f88becee6f3b37eb7e8256a1233 Reviewed-on: https://swiftshader-review.googlesource.com/18808Tested-by: 's avatarKrzysztof Kosiński <krzysio@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 2a0def7f
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define MAJOR_VERSION 4 #define MAJOR_VERSION 4
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 4 #define BUILD_REVISION 5
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -4443,6 +4443,7 @@ const GLubyte *Context::getExtensions(GLuint index, GLuint *numExt) const ...@@ -4443,6 +4443,7 @@ const GLubyte *Context::getExtensions(GLuint index, GLuint *numExt) const
"GL_OES_texture_half_float_linear", "GL_OES_texture_half_float_linear",
"GL_OES_texture_npot", "GL_OES_texture_npot",
"GL_OES_texture_3D", "GL_OES_texture_3D",
"GL_OES_vertex_array_object",
"GL_OES_vertex_half_float", "GL_OES_vertex_half_float",
"GL_EXT_blend_minmax", "GL_EXT_blend_minmax",
"GL_EXT_color_buffer_half_float", "GL_EXT_color_buffer_half_float",
......
...@@ -6869,6 +6869,7 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP ...@@ -6869,6 +6869,7 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP
FUNCTION(glBindTexture), FUNCTION(glBindTexture),
FUNCTION(glBindTransformFeedback), FUNCTION(glBindTransformFeedback),
FUNCTION(glBindVertexArray), FUNCTION(glBindVertexArray),
FUNCTION(glBindVertexArrayOES),
FUNCTION(glBlendColor), FUNCTION(glBlendColor),
FUNCTION(glBlendEquation), FUNCTION(glBlendEquation),
FUNCTION(glBlendEquationSeparate), FUNCTION(glBlendEquationSeparate),
...@@ -6917,6 +6918,7 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP ...@@ -6917,6 +6918,7 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP
FUNCTION(glDeleteTextures), FUNCTION(glDeleteTextures),
FUNCTION(glDeleteTransformFeedbacks), FUNCTION(glDeleteTransformFeedbacks),
FUNCTION(glDeleteVertexArrays), FUNCTION(glDeleteVertexArrays),
FUNCTION(glDeleteVertexArraysOES),
FUNCTION(glDepthFunc), FUNCTION(glDepthFunc),
FUNCTION(glDepthMask), FUNCTION(glDepthMask),
FUNCTION(glDepthRangef), FUNCTION(glDepthRangef),
...@@ -6960,6 +6962,7 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP ...@@ -6960,6 +6962,7 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP
FUNCTION(glGenTextures), FUNCTION(glGenTextures),
FUNCTION(glGenTransformFeedbacks), FUNCTION(glGenTransformFeedbacks),
FUNCTION(glGenVertexArrays), FUNCTION(glGenVertexArrays),
FUNCTION(glGenVertexArraysOES),
FUNCTION(glGenerateMipmap), FUNCTION(glGenerateMipmap),
FUNCTION(glGenerateMipmapOES), FUNCTION(glGenerateMipmapOES),
FUNCTION(glGetActiveAttrib), FUNCTION(glGetActiveAttrib),
...@@ -7038,6 +7041,7 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP ...@@ -7038,6 +7041,7 @@ extern "C" NO_SANITIZE_FUNCTION __eglMustCastToProperFunctionPointerType es2GetP
FUNCTION(glIsTexture), FUNCTION(glIsTexture),
FUNCTION(glIsTransformFeedback), FUNCTION(glIsTransformFeedback),
FUNCTION(glIsVertexArray), FUNCTION(glIsVertexArray),
FUNCTION(glIsVertexArrayOES),
FUNCTION(glLineWidth), FUNCTION(glLineWidth),
FUNCTION(glLinkProgram), FUNCTION(glLinkProgram),
FUNCTION(glMapBufferRange), FUNCTION(glMapBufferRange),
......
...@@ -183,6 +183,10 @@ EXPORTS ...@@ -183,6 +183,10 @@ EXPORTS
glGetFramebufferAttachmentParameterivOES glGetFramebufferAttachmentParameterivOES
glGenerateMipmapOES glGenerateMipmapOES
glDrawBuffersEXT glDrawBuffersEXT
glBindVertexArrayOES
glDeleteVertexArraysOES
glGenVertexArraysOES
glIsVertexArrayOES
; GLES 3.0 Functions ; GLES 3.0 Functions
glReadBuffer @211 glReadBuffer @211
...@@ -292,4 +296,4 @@ EXPORTS ...@@ -292,4 +296,4 @@ EXPORTS
libGLESv2_swiftshader libGLESv2_swiftshader
Register Register
\ No newline at end of file
...@@ -290,6 +290,10 @@ global: ...@@ -290,6 +290,10 @@ global:
glGetFramebufferAttachmentParameterivOES; glGetFramebufferAttachmentParameterivOES;
glGenerateMipmapOES; glGenerateMipmapOES;
glDrawBuffersEXT; glDrawBuffersEXT;
glBindVertexArrayOES;
glDeleteVertexArraysOES;
glGenVertexArraysOES;
glIsVertexArrayOES;
# Table of function pointers to disambiguate between libraries # Table of function pointers to disambiguate between libraries
libGLESv2_swiftshader; libGLESv2_swiftshader;
...@@ -302,4 +306,4 @@ global: ...@@ -302,4 +306,4 @@ global:
local: local:
*; *;
}; };
\ No newline at end of file
...@@ -1469,6 +1469,11 @@ GL_APICALL void GL_APIENTRY glBindVertexArray(GLuint array) ...@@ -1469,6 +1469,11 @@ GL_APICALL void GL_APIENTRY glBindVertexArray(GLuint array)
} }
} }
GL_APICALL void GL_APIENTRY glBindVertexArrayOES(GLuint array)
{
glBindVertexArray(array);
}
GL_APICALL void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays) GL_APICALL void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
{ {
TRACE("(GLsizei n = %d, const GLuint *arrays = %p)", n, arrays); TRACE("(GLsizei n = %d, const GLuint *arrays = %p)", n, arrays);
...@@ -1489,6 +1494,11 @@ GL_APICALL void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays ...@@ -1489,6 +1494,11 @@ GL_APICALL void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays
} }
} }
GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays)
{
glDeleteVertexArrays(n, arrays);
}
GL_APICALL void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint *arrays) GL_APICALL void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint *arrays)
{ {
TRACE("(GLsizei n = %d, const GLuint *arrays = %p)", n, arrays); TRACE("(GLsizei n = %d, const GLuint *arrays = %p)", n, arrays);
...@@ -1509,6 +1519,11 @@ GL_APICALL void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint *arrays) ...@@ -1509,6 +1519,11 @@ GL_APICALL void GL_APIENTRY glGenVertexArrays(GLsizei n, GLuint *arrays)
} }
} }
GL_APICALL void GL_APIENTRY glGenVertexArraysOES(GLsizei n, GLuint *arrays)
{
glGenVertexArrays(n, arrays);
}
GL_APICALL GLboolean GL_APIENTRY glIsVertexArray(GLuint array) GL_APICALL GLboolean GL_APIENTRY glIsVertexArray(GLuint array)
{ {
TRACE("(GLuint array = %d)", array); TRACE("(GLuint array = %d)", array);
...@@ -1533,6 +1548,11 @@ GL_APICALL GLboolean GL_APIENTRY glIsVertexArray(GLuint array) ...@@ -1533,6 +1548,11 @@ GL_APICALL GLboolean GL_APIENTRY glIsVertexArray(GLuint array)
return GL_FALSE; return GL_FALSE;
} }
GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES(GLuint array)
{
return glIsVertexArray(array);
}
GL_APICALL void GL_APIENTRY glGetIntegeri_v(GLenum target, GLuint index, GLint *data) GL_APICALL void GL_APIENTRY glGetIntegeri_v(GLenum target, GLuint index, GLint *data)
{ {
TRACE("(GLenum target = 0x%X, GLuint index = %d, GLint* data = %p)", TRACE("(GLenum target = 0x%X, GLuint index = %d, GLint* data = %p)",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment