diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp index f1509fb5f..03460cf2c 100644 --- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp +++ b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp @@ -67,11 +67,20 @@ #define GL_RGBA32F_ARB 0x8814 #define GL_RGB32F_ARB 0x8815 #else -#if USE(OPENGL_ES_2) +#if PLATFORM(QT) +#define FUNCTIONS m_functions +#include "OpenGLShimsQt.h" + +#define glGetError(...) m_functions->glGetError(__VA_ARGS__) +#define glIsEnabled(...) m_functions->glIsEnabled(__VA_ARGS__) + +#define scopedScissor(c, s) scopedScissor(m_functions, c, s) +#define scopedDither(c, s) scopedDither(m_functions, c, s) +#elif USE(OPENGL_ES_2) #include "OpenGLESShims.h" #elif PLATFORM(MAC) #include <OpenGL/gl.h> -#elif PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(QT) || PLATFORM(WIN) +#elif PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) #include "OpenGLShims.h" #endif #endif @@ -403,7 +412,7 @@ bool GraphicsContext3D::checkVaryingsPacking(Platform3DObject vertexShader, Plat } GC3Dint maxVaryingVectors = 0; -#if !PLATFORM(IOS) && !((PLATFORM(WIN) || PLATFORM(GTK)) && USE(OPENGL_ES_2)) +#if !PLATFORM(IOS) && !((PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(QT)) && USE(OPENGL_ES_2)) GC3Dint maxVaryingFloats = 0; ::glGetIntegerv(GL_MAX_VARYING_FLOATS, &maxVaryingFloats); maxVaryingVectors = maxVaryingFloats / 4; @@ -1012,7 +1021,7 @@ GC3Denum GraphicsContext3D::getError() } makeContextCurrent(); - return ::glGetError(); + return glGetError(); } String GraphicsContext3D::getString(GC3Denum name) @@ -1039,7 +1048,7 @@ GC3Dboolean GraphicsContext3D::isBuffer(Platform3DObject buffer) GC3Dboolean GraphicsContext3D::isEnabled(GC3Denum cap) { makeContextCurrent(); - return ::glIsEnabled(cap); + return glIsEnabled(cap); } GC3Dboolean GraphicsContext3D::isFramebuffer(Platform3DObject framebuffer) @@ -1382,6 +1391,7 @@ void GraphicsContext3D::viewport(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsize ::glViewport(x, y, width, height); } +#if !PLATFORM(QT) || ENABLE(WEBGL2) Platform3DObject GraphicsContext3D::createVertexArray() { makeContextCurrent(); @@ -1432,6 +1442,7 @@ void GraphicsContext3D::bindVertexArray(Platform3DObject array) UNUSED_PARAM(array); #endif } +#endif void GraphicsContext3D::getBooleanv(GC3Denum pname, GC3Dboolean* value) { |