Changeset 169714 in webkit


Ignore:
Timestamp:
Jun 9, 2014 2:09:09 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[iOS WebGL] Implement OES_vertex_array_object for iOS.
https://bugs.webkit.org/show_bug.cgi?id=133629

Patch by Alex Christensen <achristensen@webkit.org> on 2014-06-09
Reviewed by Brady Eidson.

Covered by the Khronos test (and in LayoutTests):
conformance/extensions/oes-vertex-array-object.html

  • platform/graphics/ios/GraphicsContext3DIOS.h:

Added OpenGL vertex array function renaming for iOS adding the OES suffix.

  • platform/graphics/opengl/Extensions3DOpenGL.cpp:

(WebCore::Extensions3DOpenGL::createVertexArrayOES):
(WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
(WebCore::Extensions3DOpenGL::isVertexArrayOES):
(WebCore::Extensions3DOpenGL::bindVertexArrayOES):
Added isVertexArrayObjectSupported and support for iOS.
(WebCore::Extensions3DOpenGL::supportsExtension):
Added iOS name for GL_OES_vertex_array_object extension.

  • platform/graphics/opengl/Extensions3DOpenGL.h:

Added isVertexArrayObjectSupported for iOS.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r169713 r169714  
     12014-06-09  Alex Christensen  <achristensen@webkit.org>
     2
     3        [iOS WebGL] Implement OES_vertex_array_object for iOS.
     4        https://bugs.webkit.org/show_bug.cgi?id=133629
     5
     6        Reviewed by Brady Eidson.
     7
     8        Covered by the Khronos test (and in LayoutTests):
     9        conformance/extensions/oes-vertex-array-object.html
     10
     11        * platform/graphics/ios/GraphicsContext3DIOS.h:
     12        Added OpenGL vertex array function renaming for iOS adding the OES suffix.
     13        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
     14        (WebCore::Extensions3DOpenGL::createVertexArrayOES):
     15        (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
     16        (WebCore::Extensions3DOpenGL::isVertexArrayOES):
     17        (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
     18        Added isVertexArrayObjectSupported and support for iOS.
     19        (WebCore::Extensions3DOpenGL::supportsExtension):
     20        Added iOS name for GL_OES_vertex_array_object extension.
     21        * platform/graphics/opengl/Extensions3DOpenGL.h:
     22        Added isVertexArrayObjectSupported for iOS.       
     23
    1242014-06-09  Eric Carlson  <eric.carlson@apple.com>
    225
  • trunk/Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h

    r165676 r169714  
    4848#define glVertexAttribDivisorARB glVertexAttribDivisorEXT
    4949
     50#define glBindVertexArray glBindVertexArrayOES
     51#define glDeleteVertexArrays glDeleteVertexArraysOES
     52#define glGenVertexArrays glGenVertexArraysOES
     53#define glIsVertexArray glIsVertexArrayOES
     54
    5055#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0
    5156#define GL_DEPTH24_STENCIL8_EXT GL_DEPTH24_STENCIL8_OES
  • trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp

    r169654 r169714  
    8787    m_context->makeContextCurrent();
    8888    GLuint array = 0;
    89 #if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN))
     89#if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(IOS))
    9090    if (isVertexArrayObjectSupported())
    9191        glGenVertexArrays(1, &array);
     
    102102
    103103    m_context->makeContextCurrent();
    104 #if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN))
     104#if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(IOS))
    105105    if (isVertexArrayObjectSupported())
    106106        glDeleteVertexArrays(1, &array);
     
    116116
    117117    m_context->makeContextCurrent();
    118 #if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN))
     118#if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(IOS))
    119119    if (isVertexArrayObjectSupported())
    120120        return glIsVertexArray(array);
     
    127127void Extensions3DOpenGL::bindVertexArrayOES(Platform3DObject array)
    128128{
    129 #if PLATFORM(IOS)
    130     UNUSED_PARAM(array);
    131 #endif
    132 
    133     m_context->makeContextCurrent();
    134 #if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN))
     129    m_context->makeContextCurrent();
     130#if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(IOS))
    135131    if (isVertexArrayObjectSupported())
    136132        glBindVertexArray(array);
     
    187183#if (PLATFORM(GTK) || PLATFORM(EFL))
    188184        return m_availableExtensions.contains("GL_ARB_vertex_array_object");
     185#elif PLATFORM(IOS)
     186        return m_availableExtensions.contains("GL_OES_vertex_array_object");
    189187#else
    190188        return m_availableExtensions.contains("GL_APPLE_vertex_array_object");
     
    285283}
    286284
    287 #if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN))
     285#if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(IOS))
    288286bool Extensions3DOpenGL::isVertexArrayObjectSupported()
    289287{
  • trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h

    r164468 r169714  
    6464    virtual bool supportsExtension(const WTF::String&);
    6565    virtual String getExtensions();
    66 #if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN))
     66#if (PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(IOS))
    6767private:
    6868    bool isVertexArrayObjectSupported();
Note: See TracChangeset for help on using the changeset viewer.