aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-28 19:41:24 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-28 19:41:24 +0000
commit06d4cda5f0acdd33fd4d2b86145dcddaa61c528f (patch)
treea007f5fd9ef22e94b5202ee5282cda96b34df57c /src/gpu
parent172eb1baaf10ff5ea8c25e6b6bd2ce1278b939cc (diff)
Rename GR_GL_GET_PROC macros in mesa and unix GrGLInterface factories to be more consistent with other platforms.
R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/258693008 git-svn-id: http://skia.googlecode.com/svn/trunk@14418 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp302
-rw-r--r--src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp324
2 files changed, 313 insertions, 313 deletions
diff --git a/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp b/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
index ea8026eb18..ec25a515b0 100644
--- a/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
+++ b/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
@@ -13,9 +13,9 @@
#define GL_GLEXT_PROTOTYPES
#include "osmesa_wrapper.h"
-#define GR_GL_GET_PROC(F) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
+#define GET_PROC(F) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
OSMesaGetProcAddress("gl" #F);
-#define GR_GL_GET_PROC_SUFFIX(F, S) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
+#define GET_PROC_SUFFIX(F, S) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
OSMesaGetProcAddress("gl" #F #S);
// We use OSMesaGetProcAddress for every gl function to avoid accidentally using
@@ -45,191 +45,191 @@ const GrGLInterface* GrGLCreateMesaInterface() {
}
GrGLInterface* interface = SkNEW(GrGLInterface());
- GR_GL_GET_PROC(ActiveTexture);
- GR_GL_GET_PROC(BeginQuery);
- GR_GL_GET_PROC(AttachShader);
- GR_GL_GET_PROC(BindAttribLocation);
- GR_GL_GET_PROC(BindBuffer);
- GR_GL_GET_PROC(BindFragDataLocation);
- GR_GL_GET_PROC(BindTexture);
- GR_GL_GET_PROC(BlendFunc);
+ GET_PROC(ActiveTexture);
+ GET_PROC(BeginQuery);
+ GET_PROC(AttachShader);
+ GET_PROC(BindAttribLocation);
+ GET_PROC(BindBuffer);
+ GET_PROC(BindFragDataLocation);
+ GET_PROC(BindTexture);
+ GET_PROC(BlendFunc);
if (glVer >= GR_GL_VER(1,4) ||
extensions.has("GL_ARB_imaging") ||
extensions.has("GL_EXT_blend_color")) {
- GR_GL_GET_PROC(BlendColor);
+ GET_PROC(BlendColor);
}
- GR_GL_GET_PROC(BufferData);
- GR_GL_GET_PROC(BufferSubData);
- GR_GL_GET_PROC(Clear);
- GR_GL_GET_PROC(ClearColor);
- GR_GL_GET_PROC(ClearStencil);
- GR_GL_GET_PROC(ColorMask);
- GR_GL_GET_PROC(CompileShader);
- GR_GL_GET_PROC(CompressedTexImage2D);
- GR_GL_GET_PROC(CopyTexSubImage2D);
- GR_GL_GET_PROC(CreateProgram);
- GR_GL_GET_PROC(CreateShader);
- GR_GL_GET_PROC(CullFace);
- GR_GL_GET_PROC(DeleteBuffers);
- GR_GL_GET_PROC(DeleteProgram);
- GR_GL_GET_PROC(DeleteQueries);
- GR_GL_GET_PROC(DeleteShader);
- GR_GL_GET_PROC(DeleteTextures);
- GR_GL_GET_PROC(DepthMask);
- GR_GL_GET_PROC(Disable);
- GR_GL_GET_PROC(DisableVertexAttribArray);
- GR_GL_GET_PROC(DrawArrays);
- GR_GL_GET_PROC(DrawBuffer);
- GR_GL_GET_PROC(DrawBuffers);
- GR_GL_GET_PROC(DrawElements);
- GR_GL_GET_PROC(Enable);
- GR_GL_GET_PROC(EnableVertexAttribArray);
- GR_GL_GET_PROC(EndQuery);
- GR_GL_GET_PROC(Finish);
- GR_GL_GET_PROC(Flush);
- GR_GL_GET_PROC(FrontFace);
- GR_GL_GET_PROC(GenBuffers);
- GR_GL_GET_PROC(GenerateMipmap);
- GR_GL_GET_PROC(GenQueries);
- GR_GL_GET_PROC(GetBufferParameteriv);
- GR_GL_GET_PROC(GetError);
- GR_GL_GET_PROC(GetIntegerv);
- GR_GL_GET_PROC(GetProgramInfoLog);
- GR_GL_GET_PROC(GetProgramiv);
+ GET_PROC(BufferData);
+ GET_PROC(BufferSubData);
+ GET_PROC(Clear);
+ GET_PROC(ClearColor);
+ GET_PROC(ClearStencil);
+ GET_PROC(ColorMask);
+ GET_PROC(CompileShader);
+ GET_PROC(CompressedTexImage2D);
+ GET_PROC(CopyTexSubImage2D);
+ GET_PROC(CreateProgram);
+ GET_PROC(CreateShader);
+ GET_PROC(CullFace);
+ GET_PROC(DeleteBuffers);
+ GET_PROC(DeleteProgram);
+ GET_PROC(DeleteQueries);
+ GET_PROC(DeleteShader);
+ GET_PROC(DeleteTextures);
+ GET_PROC(DepthMask);
+ GET_PROC(Disable);
+ GET_PROC(DisableVertexAttribArray);
+ GET_PROC(DrawArrays);
+ GET_PROC(DrawBuffer);
+ GET_PROC(DrawBuffers);
+ GET_PROC(DrawElements);
+ GET_PROC(Enable);
+ GET_PROC(EnableVertexAttribArray);
+ GET_PROC(EndQuery);
+ GET_PROC(Finish);
+ GET_PROC(Flush);
+ GET_PROC(FrontFace);
+ GET_PROC(GenBuffers);
+ GET_PROC(GenerateMipmap);
+ GET_PROC(GenQueries);
+ GET_PROC(GetBufferParameteriv);
+ GET_PROC(GetError);
+ GET_PROC(GetIntegerv);
+ GET_PROC(GetProgramInfoLog);
+ GET_PROC(GetProgramiv);
if (glVer >= GR_GL_VER(3,3) || extensions.has("GL_ARB_timer_query")) {
- GR_GL_GET_PROC(GetQueryObjecti64v);
- GR_GL_GET_PROC(GetQueryObjectui64v)
- GR_GL_GET_PROC(QueryCounter);
+ GET_PROC(GetQueryObjecti64v);
+ GET_PROC(GetQueryObjectui64v)
+ GET_PROC(QueryCounter);
} else if (extensions.has("GL_EXT_timer_query")) {
- GR_GL_GET_PROC_SUFFIX(GetQueryObjecti64v, EXT);
- GR_GL_GET_PROC_SUFFIX(GetQueryObjectui64v, EXT);
+ GET_PROC_SUFFIX(GetQueryObjecti64v, EXT);
+ GET_PROC_SUFFIX(GetQueryObjectui64v, EXT);
}
- GR_GL_GET_PROC(GetQueryObjectiv);
- GR_GL_GET_PROC(GetQueryObjectuiv);
- GR_GL_GET_PROC(GetQueryiv);
- GR_GL_GET_PROC(GetShaderInfoLog);
- GR_GL_GET_PROC(GetShaderiv);
- GR_GL_GET_PROC(GetString);
- GR_GL_GET_PROC(GetStringi);
- GR_GL_GET_PROC(GetTexLevelParameteriv);
- GR_GL_GET_PROC(GenTextures);
- GR_GL_GET_PROC(GetUniformLocation);
- GR_GL_GET_PROC(LineWidth);
- GR_GL_GET_PROC(LinkProgram);
- GR_GL_GET_PROC(MapBuffer);
+ GET_PROC(GetQueryObjectiv);
+ GET_PROC(GetQueryObjectuiv);
+ GET_PROC(GetQueryiv);
+ GET_PROC(GetShaderInfoLog);
+ GET_PROC(GetShaderiv);
+ GET_PROC(GetString);
+ GET_PROC(GetStringi);
+ GET_PROC(GetTexLevelParameteriv);
+ GET_PROC(GenTextures);
+ GET_PROC(GetUniformLocation);
+ GET_PROC(LineWidth);
+ GET_PROC(LinkProgram);
+ GET_PROC(MapBuffer);
if (extensions.has("GL_EXT_direct_state_access")) {
- GR_GL_GET_PROC_SUFFIX(MatrixLoadf, EXT);
- GR_GL_GET_PROC_SUFFIX(MatrixLoadIdentity, EXT);
+ GET_PROC_SUFFIX(MatrixLoadf, EXT);
+ GET_PROC_SUFFIX(MatrixLoadIdentity, EXT);
}
- GR_GL_GET_PROC(PixelStorei);
- GR_GL_GET_PROC(ReadBuffer);
- GR_GL_GET_PROC(ReadPixels);
- GR_GL_GET_PROC(Scissor);
- GR_GL_GET_PROC(ShaderSource);
- GR_GL_GET_PROC(StencilFunc);
- GR_GL_GET_PROC(StencilFuncSeparate);
- GR_GL_GET_PROC(StencilMask);
- GR_GL_GET_PROC(StencilMaskSeparate);
- GR_GL_GET_PROC(StencilOp);
- GR_GL_GET_PROC(StencilOpSeparate);
- GR_GL_GET_PROC(TexImage2D)
- GR_GL_GET_PROC(TexParameteri);
- GR_GL_GET_PROC(TexParameteriv);
- GR_GL_GET_PROC(TexStorage2D);
+ GET_PROC(PixelStorei);
+ GET_PROC(ReadBuffer);
+ GET_PROC(ReadPixels);
+ GET_PROC(Scissor);
+ GET_PROC(ShaderSource);
+ GET_PROC(StencilFunc);
+ GET_PROC(StencilFuncSeparate);
+ GET_PROC(StencilMask);
+ GET_PROC(StencilMaskSeparate);
+ GET_PROC(StencilOp);
+ GET_PROC(StencilOpSeparate);
+ GET_PROC(TexImage2D)
+ GET_PROC(TexParameteri);
+ GET_PROC(TexParameteriv);
+ GET_PROC(TexStorage2D);
if (NULL == interface->fFunctions.fTexStorage2D) {
- GR_GL_GET_PROC_SUFFIX(TexStorage2D, EXT);
+ GET_PROC_SUFFIX(TexStorage2D, EXT);
}
- GR_GL_GET_PROC(TexSubImage2D);
- GR_GL_GET_PROC(Uniform1f);
- GR_GL_GET_PROC(Uniform1i);
- GR_GL_GET_PROC(Uniform1fv);
- GR_GL_GET_PROC(Uniform1iv);
- GR_GL_GET_PROC(Uniform2f);
- GR_GL_GET_PROC(Uniform2i);
- GR_GL_GET_PROC(Uniform2fv);
- GR_GL_GET_PROC(Uniform2iv);
- GR_GL_GET_PROC(Uniform3f);
- GR_GL_GET_PROC(Uniform3i);
- GR_GL_GET_PROC(Uniform3fv);
- GR_GL_GET_PROC(Uniform3iv);
- GR_GL_GET_PROC(Uniform4f);
- GR_GL_GET_PROC(Uniform4i);
- GR_GL_GET_PROC(Uniform4fv);
- GR_GL_GET_PROC(Uniform4iv);
- GR_GL_GET_PROC(UniformMatrix2fv);
- GR_GL_GET_PROC(UniformMatrix3fv);
- GR_GL_GET_PROC(UniformMatrix4fv);
- GR_GL_GET_PROC(UnmapBuffer);
- GR_GL_GET_PROC(UseProgram);
- GR_GL_GET_PROC(VertexAttrib4fv);
- GR_GL_GET_PROC(VertexAttribPointer);
- GR_GL_GET_PROC(Viewport);
+ GET_PROC(TexSubImage2D);
+ GET_PROC(Uniform1f);
+ GET_PROC(Uniform1i);
+ GET_PROC(Uniform1fv);
+ GET_PROC(Uniform1iv);
+ GET_PROC(Uniform2f);
+ GET_PROC(Uniform2i);
+ GET_PROC(Uniform2fv);
+ GET_PROC(Uniform2iv);
+ GET_PROC(Uniform3f);
+ GET_PROC(Uniform3i);
+ GET_PROC(Uniform3fv);
+ GET_PROC(Uniform3iv);
+ GET_PROC(Uniform4f);
+ GET_PROC(Uniform4i);
+ GET_PROC(Uniform4fv);
+ GET_PROC(Uniform4iv);
+ GET_PROC(UniformMatrix2fv);
+ GET_PROC(UniformMatrix3fv);
+ GET_PROC(UniformMatrix4fv);
+ GET_PROC(UnmapBuffer);
+ GET_PROC(UseProgram);
+ GET_PROC(VertexAttrib4fv);
+ GET_PROC(VertexAttribPointer);
+ GET_PROC(Viewport);
if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_vertex_array_object")) {
// no ARB suffix for GL_ARB_vertex_array_object
- GR_GL_GET_PROC(BindVertexArray);
- GR_GL_GET_PROC(DeleteVertexArrays);
- GR_GL_GET_PROC(GenVertexArrays);
+ GET_PROC(BindVertexArray);
+ GET_PROC(DeleteVertexArrays);
+ GET_PROC(GenVertexArrays);
}
// First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since
// GL_ARB_framebuffer_object doesn't use ARB suffix.)
if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object")) {
- GR_GL_GET_PROC(GenFramebuffers);
- GR_GL_GET_PROC(GetFramebufferAttachmentParameteriv);
- GR_GL_GET_PROC(GetRenderbufferParameteriv);
- GR_GL_GET_PROC(BindFramebuffer);
- GR_GL_GET_PROC(FramebufferTexture2D);
- GR_GL_GET_PROC(CheckFramebufferStatus);
- GR_GL_GET_PROC(DeleteFramebuffers);
- GR_GL_GET_PROC(RenderbufferStorage);
- GR_GL_GET_PROC(GenRenderbuffers);
- GR_GL_GET_PROC(DeleteRenderbuffers);
- GR_GL_GET_PROC(FramebufferRenderbuffer);
- GR_GL_GET_PROC(BindRenderbuffer);
- GR_GL_GET_PROC(RenderbufferStorageMultisample);
- GR_GL_GET_PROC(BlitFramebuffer);
+ GET_PROC(GenFramebuffers);
+ GET_PROC(GetFramebufferAttachmentParameteriv);
+ GET_PROC(GetRenderbufferParameteriv);
+ GET_PROC(BindFramebuffer);
+ GET_PROC(FramebufferTexture2D);
+ GET_PROC(CheckFramebufferStatus);
+ GET_PROC(DeleteFramebuffers);
+ GET_PROC(RenderbufferStorage);
+ GET_PROC(GenRenderbuffers);
+ GET_PROC(DeleteRenderbuffers);
+ GET_PROC(FramebufferRenderbuffer);
+ GET_PROC(BindRenderbuffer);
+ GET_PROC(RenderbufferStorageMultisample);
+ GET_PROC(BlitFramebuffer);
} else if (extensions.has("GL_EXT_framebuffer_object")) {
- GR_GL_GET_PROC_SUFFIX(GenFramebuffers, EXT);
- GR_GL_GET_PROC_SUFFIX(GetFramebufferAttachmentParameteriv, EXT);
- GR_GL_GET_PROC_SUFFIX(GetRenderbufferParameteriv, EXT);
- GR_GL_GET_PROC_SUFFIX(BindFramebuffer, EXT);
- GR_GL_GET_PROC_SUFFIX(FramebufferTexture2D, EXT);
- GR_GL_GET_PROC_SUFFIX(CheckFramebufferStatus, EXT);
- GR_GL_GET_PROC_SUFFIX(DeleteFramebuffers, EXT);
- GR_GL_GET_PROC_SUFFIX(RenderbufferStorage, EXT);
- GR_GL_GET_PROC_SUFFIX(GenRenderbuffers, EXT);
- GR_GL_GET_PROC_SUFFIX(DeleteRenderbuffers, EXT);
- GR_GL_GET_PROC_SUFFIX(FramebufferRenderbuffer, EXT);
- GR_GL_GET_PROC_SUFFIX(BindRenderbuffer, EXT);
+ GET_PROC_SUFFIX(GenFramebuffers, EXT);
+ GET_PROC_SUFFIX(GetFramebufferAttachmentParameteriv, EXT);
+ GET_PROC_SUFFIX(GetRenderbufferParameteriv, EXT);
+ GET_PROC_SUFFIX(BindFramebuffer, EXT);
+ GET_PROC_SUFFIX(FramebufferTexture2D, EXT);
+ GET_PROC_SUFFIX(CheckFramebufferStatus, EXT);
+ GET_PROC_SUFFIX(DeleteFramebuffers, EXT);
+ GET_PROC_SUFFIX(RenderbufferStorage, EXT);
+ GET_PROC_SUFFIX(GenRenderbuffers, EXT);
+ GET_PROC_SUFFIX(DeleteRenderbuffers, EXT);
+ GET_PROC_SUFFIX(FramebufferRenderbuffer, EXT);
+ GET_PROC_SUFFIX(BindRenderbuffer, EXT);
if (extensions.has("GL_EXT_framebuffer_multisample")) {
- GR_GL_GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT);
+ GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT);
}
if (extensions.has("GL_EXT_framebuffer_blit")) {
- GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT);
+ GET_PROC_SUFFIX(BlitFramebuffer, EXT);
}
} else {
// we must have FBOs
delete interface;
return NULL;
}
- GR_GL_GET_PROC(BindFragDataLocationIndexed);
+ GET_PROC(BindFragDataLocationIndexed);
if (extensions.has("GL_EXT_debug_marker")) {
- GR_GL_GET_PROC_SUFFIX(InsertEventMarker, EXT);
- GR_GL_GET_PROC_SUFFIX(PopGroupMarker, EXT);
- GR_GL_GET_PROC_SUFFIX(PushGroupMarker, EXT);
+ GET_PROC_SUFFIX(InsertEventMarker, EXT);
+ GET_PROC_SUFFIX(PopGroupMarker, EXT);
+ GET_PROC_SUFFIX(PushGroupMarker, EXT);
}
if (glVer >= GR_GL_VER(4,3) || extensions.has("GL_ARB_invalidate_subdata")) {
- GR_GL_GET_PROC(InvalidateBufferData);
- GR_GL_GET_PROC(InvalidateBufferSubData);
- GR_GL_GET_PROC(InvalidateFramebuffer);
- GR_GL_GET_PROC(InvalidateSubFramebuffer);
- GR_GL_GET_PROC(InvalidateTexImage);
- GR_GL_GET_PROC(InvalidateTexSubImage);
+ GET_PROC(InvalidateBufferData);
+ GET_PROC(InvalidateBufferSubData);
+ GET_PROC(InvalidateFramebuffer);
+ GET_PROC(InvalidateSubFramebuffer);
+ GET_PROC(InvalidateTexImage);
+ GET_PROC(InvalidateTexSubImage);
}
interface->fStandard = kGL_GrGLStandard;
diff --git a/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp b/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp
index 4d5b8f4563..5dd1c6cab9 100644
--- a/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp
+++ b/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp
@@ -15,9 +15,9 @@
#include <GL/glext.h>
#include <GL/glu.h>
-#define GR_GL_GET_PROC(F) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
+#define GET_PROC(F) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
glXGetProcAddress(reinterpret_cast<const GLubyte*>("gl" #F));
-#define GR_GL_GET_PROC_SUFFIX(F, S) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
+#define GET_PROC_SUFFIX(F, S) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
glXGetProcAddress(reinterpret_cast<const GLubyte*>("gl" #F #S));
const GrGLInterface* GrGLCreateNativeInterface() {
@@ -46,171 +46,171 @@ const GrGLInterface* GrGLCreateNativeInterface() {
GrGLInterface::Functions* functions = &interface->fFunctions;
functions->fActiveTexture = glActiveTexture;
- GR_GL_GET_PROC(AttachShader);
- GR_GL_GET_PROC(BindAttribLocation);
- GR_GL_GET_PROC(BindBuffer);
- GR_GL_GET_PROC(BindFragDataLocation);
- GR_GL_GET_PROC(BeginQuery);
+ GET_PROC(AttachShader);
+ GET_PROC(BindAttribLocation);
+ GET_PROC(BindBuffer);
+ GET_PROC(BindFragDataLocation);
+ GET_PROC(BeginQuery);
functions->fBindTexture = glBindTexture;
functions->fBlendFunc = glBlendFunc;
if (glVer >= GR_GL_VER(1,4) ||
extensions.has("GL_ARB_imaging") ||
extensions.has("GL_EXT_blend_color")) {
- GR_GL_GET_PROC(BlendColor);
+ GET_PROC(BlendColor);
}
- GR_GL_GET_PROC(BufferData);
- GR_GL_GET_PROC(BufferSubData);
+ GET_PROC(BufferData);
+ GET_PROC(BufferSubData);
functions->fClear = glClear;
functions->fClearColor = glClearColor;
functions->fClearStencil = glClearStencil;
functions->fColorMask = glColorMask;
- GR_GL_GET_PROC(CompileShader);
+ GET_PROC(CompileShader);
functions->fCompressedTexImage2D = glCompressedTexImage2D;
functions->fCopyTexSubImage2D = glCopyTexSubImage2D;
- GR_GL_GET_PROC(CreateProgram);
- GR_GL_GET_PROC(CreateShader);
+ GET_PROC(CreateProgram);
+ GET_PROC(CreateShader);
functions->fCullFace = glCullFace;
- GR_GL_GET_PROC(DeleteBuffers);
- GR_GL_GET_PROC(DeleteProgram);
- GR_GL_GET_PROC(DeleteQueries);
- GR_GL_GET_PROC(DeleteShader);
+ GET_PROC(DeleteBuffers);
+ GET_PROC(DeleteProgram);
+ GET_PROC(DeleteQueries);
+ GET_PROC(DeleteShader);
functions->fDeleteTextures = glDeleteTextures;
functions->fDepthMask = glDepthMask;
functions->fDisable = glDisable;
- GR_GL_GET_PROC(DisableVertexAttribArray);
+ GET_PROC(DisableVertexAttribArray);
functions->fDrawArrays = glDrawArrays;
functions->fDrawBuffer = glDrawBuffer;
- GR_GL_GET_PROC(DrawBuffers);
+ GET_PROC(DrawBuffers);
functions->fDrawElements = glDrawElements;
functions->fEnable = glEnable;
- GR_GL_GET_PROC(EnableVertexAttribArray);
- GR_GL_GET_PROC(EndQuery);
+ GET_PROC(EnableVertexAttribArray);
+ GET_PROC(EndQuery);
functions->fFinish = glFinish;
functions->fFlush = glFlush;
functions->fFrontFace = glFrontFace;
- GR_GL_GET_PROC(GenBuffers);
- GR_GL_GET_PROC(GenerateMipmap);
- GR_GL_GET_PROC(GetBufferParameteriv);
+ GET_PROC(GenBuffers);
+ GET_PROC(GenerateMipmap);
+ GET_PROC(GetBufferParameteriv);
functions->fGetError = glGetError;
functions->fGetIntegerv = glGetIntegerv;
- GR_GL_GET_PROC(GetQueryObjectiv);
- GR_GL_GET_PROC(GetQueryObjectuiv);
+ GET_PROC(GetQueryObjectiv);
+ GET_PROC(GetQueryObjectuiv);
if (glVer >= GR_GL_VER(3,3) || extensions.has("GL_ARB_timer_query")) {
- GR_GL_GET_PROC(GetQueryObjecti64v);
- GR_GL_GET_PROC(GetQueryObjectui64v);
- GR_GL_GET_PROC(QueryCounter);
+ GET_PROC(GetQueryObjecti64v);
+ GET_PROC(GetQueryObjectui64v);
+ GET_PROC(QueryCounter);
} else if (extensions.has("GL_EXT_timer_query")) {
- GR_GL_GET_PROC_SUFFIX(GetQueryObjecti64v, EXT);
- GR_GL_GET_PROC_SUFFIX(GetQueryObjectui64v, EXT);
+ GET_PROC_SUFFIX(GetQueryObjecti64v, EXT);
+ GET_PROC_SUFFIX(GetQueryObjectui64v, EXT);
}
- GR_GL_GET_PROC(GetQueryiv);
- GR_GL_GET_PROC(GetProgramInfoLog);
- GR_GL_GET_PROC(GetProgramiv);
- GR_GL_GET_PROC(GetShaderInfoLog);
- GR_GL_GET_PROC(GetShaderiv);
+ GET_PROC(GetQueryiv);
+ GET_PROC(GetProgramInfoLog);
+ GET_PROC(GetProgramiv);
+ GET_PROC(GetShaderInfoLog);
+ GET_PROC(GetShaderiv);
functions->fGetString = glGetString;
- GR_GL_GET_PROC(GetStringi);
+ GET_PROC(GetStringi);
functions->fGetTexLevelParameteriv = glGetTexLevelParameteriv;
- GR_GL_GET_PROC(GenQueries);
+ GET_PROC(GenQueries);
functions->fGenTextures = glGenTextures;
- GR_GL_GET_PROC(GetUniformLocation);
+ GET_PROC(GetUniformLocation);
functions->fLineWidth = glLineWidth;
- GR_GL_GET_PROC(LinkProgram);
- GR_GL_GET_PROC(MapBuffer);
+ GET_PROC(LinkProgram);
+ GET_PROC(MapBuffer);
if (extensions.has("GL_EXT_direct_state_access")) {
- GR_GL_GET_PROC_SUFFIX(MatrixLoadf, EXT);
- GR_GL_GET_PROC_SUFFIX(MatrixLoadIdentity, EXT);
+ GET_PROC_SUFFIX(MatrixLoadf, EXT);
+ GET_PROC_SUFFIX(MatrixLoadIdentity, EXT);
}
functions->fPixelStorei = glPixelStorei;
functions->fReadBuffer = glReadBuffer;
functions->fReadPixels = glReadPixels;
functions->fScissor = glScissor;
- GR_GL_GET_PROC(ShaderSource);
+ GET_PROC(ShaderSource);
functions->fStencilFunc = glStencilFunc;
- GR_GL_GET_PROC(StencilFuncSeparate);
+ GET_PROC(StencilFuncSeparate);
functions->fStencilMask = glStencilMask;
- GR_GL_GET_PROC(StencilMaskSeparate);
+ GET_PROC(StencilMaskSeparate);
functions->fStencilOp = glStencilOp;
- GR_GL_GET_PROC(StencilOpSeparate);
+ GET_PROC(StencilOpSeparate);
functions->fTexImage2D = glTexImage2D;
functions->fTexParameteri = glTexParameteri;
functions->fTexParameteriv = glTexParameteriv;
if (glVer >= GR_GL_VER(4,2) || extensions.has("GL_ARB_texture_storage")) {
- GR_GL_GET_PROC(TexStorage2D);
+ GET_PROC(TexStorage2D);
} else if (extensions.has("GL_EXT_texture_storage")) {
- GR_GL_GET_PROC_SUFFIX(TexStorage2D, EXT);
+ GET_PROC_SUFFIX(TexStorage2D, EXT);
}
functions->fTexSubImage2D = glTexSubImage2D;
- GR_GL_GET_PROC(Uniform1f);
- GR_GL_GET_PROC(Uniform1i);
- GR_GL_GET_PROC(Uniform1fv);
- GR_GL_GET_PROC(Uniform1iv);
- GR_GL_GET_PROC(Uniform2f);
- GR_GL_GET_PROC(Uniform2i);
- GR_GL_GET_PROC(Uniform2fv);
- GR_GL_GET_PROC(Uniform2iv);
- GR_GL_GET_PROC(Uniform3f);
- GR_GL_GET_PROC(Uniform3i);
- GR_GL_GET_PROC(Uniform3fv);
- GR_GL_GET_PROC(Uniform3iv);
- GR_GL_GET_PROC(Uniform4f);
- GR_GL_GET_PROC(Uniform4i);
- GR_GL_GET_PROC(Uniform4fv);
- GR_GL_GET_PROC(Uniform4iv);
- GR_GL_GET_PROC(UniformMatrix2fv);
- GR_GL_GET_PROC(UniformMatrix3fv);
- GR_GL_GET_PROC(UniformMatrix4fv);
- GR_GL_GET_PROC(UnmapBuffer);
- GR_GL_GET_PROC(UseProgram);
- GR_GL_GET_PROC(VertexAttrib4fv);
- GR_GL_GET_PROC(VertexAttribPointer);
+ GET_PROC(Uniform1f);
+ GET_PROC(Uniform1i);
+ GET_PROC(Uniform1fv);
+ GET_PROC(Uniform1iv);
+ GET_PROC(Uniform2f);
+ GET_PROC(Uniform2i);
+ GET_PROC(Uniform2fv);
+ GET_PROC(Uniform2iv);
+ GET_PROC(Uniform3f);
+ GET_PROC(Uniform3i);
+ GET_PROC(Uniform3fv);
+ GET_PROC(Uniform3iv);
+ GET_PROC(Uniform4f);
+ GET_PROC(Uniform4i);
+ GET_PROC(Uniform4fv);
+ GET_PROC(Uniform4iv);
+ GET_PROC(UniformMatrix2fv);
+ GET_PROC(UniformMatrix3fv);
+ GET_PROC(UniformMatrix4fv);
+ GET_PROC(UnmapBuffer);
+ GET_PROC(UseProgram);
+ GET_PROC(VertexAttrib4fv);
+ GET_PROC(VertexAttribPointer);
functions->fViewport = glViewport;
- GR_GL_GET_PROC(BindFragDataLocationIndexed);
+ GET_PROC(BindFragDataLocationIndexed);
if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_vertex_array_object")) {
// no ARB suffix for GL_ARB_vertex_array_object
- GR_GL_GET_PROC(BindVertexArray);
- GR_GL_GET_PROC(GenVertexArrays);
- GR_GL_GET_PROC(DeleteVertexArrays);
+ GET_PROC(BindVertexArray);
+ GET_PROC(GenVertexArrays);
+ GET_PROC(DeleteVertexArrays);
}
// First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since
// GL_ARB_framebuffer_object doesn't use ARB suffix.)
if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object")) {
- GR_GL_GET_PROC(GenFramebuffers);
- GR_GL_GET_PROC(GetFramebufferAttachmentParameteriv);
- GR_GL_GET_PROC(GetRenderbufferParameteriv);
- GR_GL_GET_PROC(BindFramebuffer);
- GR_GL_GET_PROC(FramebufferTexture2D);
- GR_GL_GET_PROC(CheckFramebufferStatus);
- GR_GL_GET_PROC(DeleteFramebuffers);
- GR_GL_GET_PROC(RenderbufferStorage);
- GR_GL_GET_PROC(GenRenderbuffers);
- GR_GL_GET_PROC(DeleteRenderbuffers);
- GR_GL_GET_PROC(FramebufferRenderbuffer);
- GR_GL_GET_PROC(BindRenderbuffer);
- GR_GL_GET_PROC(RenderbufferStorageMultisample);
- GR_GL_GET_PROC(BlitFramebuffer);
+ GET_PROC(GenFramebuffers);
+ GET_PROC(GetFramebufferAttachmentParameteriv);
+ GET_PROC(GetRenderbufferParameteriv);
+ GET_PROC(BindFramebuffer);
+ GET_PROC(FramebufferTexture2D);
+ GET_PROC(CheckFramebufferStatus);
+ GET_PROC(DeleteFramebuffers);
+ GET_PROC(RenderbufferStorage);
+ GET_PROC(GenRenderbuffers);
+ GET_PROC(DeleteRenderbuffers);
+ GET_PROC(FramebufferRenderbuffer);
+ GET_PROC(BindRenderbuffer);
+ GET_PROC(RenderbufferStorageMultisample);
+ GET_PROC(BlitFramebuffer);
} else if (extensions.has("GL_EXT_framebuffer_object")) {
- GR_GL_GET_PROC_SUFFIX(GenFramebuffers, EXT);
- GR_GL_GET_PROC_SUFFIX(GetFramebufferAttachmentParameteriv, EXT);
- GR_GL_GET_PROC_SUFFIX(GetRenderbufferParameteriv, EXT);
- GR_GL_GET_PROC_SUFFIX(BindFramebuffer, EXT);
- GR_GL_GET_PROC_SUFFIX(FramebufferTexture2D, EXT);
- GR_GL_GET_PROC_SUFFIX(CheckFramebufferStatus, EXT);
- GR_GL_GET_PROC_SUFFIX(DeleteFramebuffers, EXT);
- GR_GL_GET_PROC_SUFFIX(RenderbufferStorage, EXT);
- GR_GL_GET_PROC_SUFFIX(GenRenderbuffers, EXT);
- GR_GL_GET_PROC_SUFFIX(DeleteRenderbuffers, EXT);
- GR_GL_GET_PROC_SUFFIX(FramebufferRenderbuffer, EXT);
- GR_GL_GET_PROC_SUFFIX(BindRenderbuffer, EXT);
+ GET_PROC_SUFFIX(GenFramebuffers, EXT);
+ GET_PROC_SUFFIX(GetFramebufferAttachmentParameteriv, EXT);
+ GET_PROC_SUFFIX(GetRenderbufferParameteriv, EXT);
+ GET_PROC_SUFFIX(BindFramebuffer, EXT);
+ GET_PROC_SUFFIX(FramebufferTexture2D, EXT);
+ GET_PROC_SUFFIX(CheckFramebufferStatus, EXT);
+ GET_PROC_SUFFIX(DeleteFramebuffers, EXT);
+ GET_PROC_SUFFIX(RenderbufferStorage, EXT);
+ GET_PROC_SUFFIX(GenRenderbuffers, EXT);
+ GET_PROC_SUFFIX(DeleteRenderbuffers, EXT);
+ GET_PROC_SUFFIX(FramebufferRenderbuffer, EXT);
+ GET_PROC_SUFFIX(BindRenderbuffer, EXT);
if (extensions.has("GL_EXT_framebuffer_multisample")) {
- GR_GL_GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT);
+ GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT);
}
if (extensions.has("GL_EXT_framebuffer_blit")) {
- GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT);
+ GET_PROC_SUFFIX(BlitFramebuffer, EXT);
}
} else {
// we must have FBOs
@@ -219,70 +219,70 @@ const GrGLInterface* GrGLCreateNativeInterface() {
}
if (extensions.has("GL_NV_path_rendering")) {
- GR_GL_GET_PROC_SUFFIX(PathCommands, NV);
- GR_GL_GET_PROC_SUFFIX(PathCoords, NV);
- GR_GL_GET_PROC_SUFFIX(PathSubCommands, NV);
- GR_GL_GET_PROC_SUFFIX(PathSubCoords, NV);
- GR_GL_GET_PROC_SUFFIX(PathString, NV);
- GR_GL_GET_PROC_SUFFIX(PathGlyphs, NV);
- GR_GL_GET_PROC_SUFFIX(PathGlyphRange, NV);
- GR_GL_GET_PROC_SUFFIX(WeightPaths, NV);
- GR_GL_GET_PROC_SUFFIX(CopyPath, NV);
- GR_GL_GET_PROC_SUFFIX(InterpolatePaths, NV);
- GR_GL_GET_PROC_SUFFIX(TransformPath, NV);
- GR_GL_GET_PROC_SUFFIX(PathParameteriv, NV);
- GR_GL_GET_PROC_SUFFIX(PathParameteri, NV);
- GR_GL_GET_PROC_SUFFIX(PathParameterfv, NV);
- GR_GL_GET_PROC_SUFFIX(PathParameterf, NV);
- GR_GL_GET_PROC_SUFFIX(PathDashArray, NV);
- GR_GL_GET_PROC_SUFFIX(GenPaths, NV);
- GR_GL_GET_PROC_SUFFIX(DeletePaths, NV);
- GR_GL_GET_PROC_SUFFIX(IsPath, NV);
- GR_GL_GET_PROC_SUFFIX(PathStencilFunc, NV);
- GR_GL_GET_PROC_SUFFIX(PathStencilDepthOffset, NV);
- GR_GL_GET_PROC_SUFFIX(StencilFillPath, NV);
- GR_GL_GET_PROC_SUFFIX(StencilStrokePath, NV);
- GR_GL_GET_PROC_SUFFIX(StencilFillPathInstanced, NV);
- GR_GL_GET_PROC_SUFFIX(StencilStrokePathInstanced, NV);
- GR_GL_GET_PROC_SUFFIX(PathCoverDepthFunc, NV);
- GR_GL_GET_PROC_SUFFIX(PathColorGen, NV);
- GR_GL_GET_PROC_SUFFIX(PathTexGen, NV);
- GR_GL_GET_PROC_SUFFIX(PathFogGen, NV);
- GR_GL_GET_PROC_SUFFIX(CoverFillPath, NV);
- GR_GL_GET_PROC_SUFFIX(CoverStrokePath, NV);
- GR_GL_GET_PROC_SUFFIX(CoverFillPathInstanced, NV);
- GR_GL_GET_PROC_SUFFIX(CoverStrokePathInstanced, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathParameteriv, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathParameterfv, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathCommands, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathCoords, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathDashArray, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathMetrics, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathMetricRange, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathSpacing, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathColorGeniv, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathColorGenfv, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathTexGeniv, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathTexGenfv, NV);
- GR_GL_GET_PROC_SUFFIX(IsPointInFillPath, NV);
- GR_GL_GET_PROC_SUFFIX(IsPointInStrokePath, NV);
- GR_GL_GET_PROC_SUFFIX(GetPathLength, NV);
- GR_GL_GET_PROC_SUFFIX(PointAlongPath, NV);
+ GET_PROC_SUFFIX(PathCommands, NV);
+ GET_PROC_SUFFIX(PathCoords, NV);
+ GET_PROC_SUFFIX(PathSubCommands, NV);
+ GET_PROC_SUFFIX(PathSubCoords, NV);
+ GET_PROC_SUFFIX(PathString, NV);
+ GET_PROC_SUFFIX(PathGlyphs, NV);
+ GET_PROC_SUFFIX(PathGlyphRange, NV);
+ GET_PROC_SUFFIX(WeightPaths, NV);
+ GET_PROC_SUFFIX(CopyPath, NV);
+ GET_PROC_SUFFIX(InterpolatePaths, NV);
+ GET_PROC_SUFFIX(TransformPath, NV);
+ GET_PROC_SUFFIX(PathParameteriv, NV);
+ GET_PROC_SUFFIX(PathParameteri, NV);
+ GET_PROC_SUFFIX(PathParameterfv, NV);
+ GET_PROC_SUFFIX(PathParameterf, NV);
+ GET_PROC_SUFFIX(PathDashArray, NV);
+ GET_PROC_SUFFIX(GenPaths, NV);
+ GET_PROC_SUFFIX(DeletePaths, NV);
+ GET_PROC_SUFFIX(IsPath, NV);
+ GET_PROC_SUFFIX(PathStencilFunc, NV);
+ GET_PROC_SUFFIX(PathStencilDepthOffset, NV);
+ GET_PROC_SUFFIX(StencilFillPath, NV);
+ GET_PROC_SUFFIX(StencilStrokePath, NV);
+ GET_PROC_SUFFIX(StencilFillPathInstanced, NV);
+ GET_PROC_SUFFIX(StencilStrokePathInstanced, NV);
+ GET_PROC_SUFFIX(PathCoverDepthFunc, NV);
+ GET_PROC_SUFFIX(PathColorGen, NV);
+ GET_PROC_SUFFIX(PathTexGen, NV);
+ GET_PROC_SUFFIX(PathFogGen, NV);
+ GET_PROC_SUFFIX(CoverFillPath, NV);
+ GET_PROC_SUFFIX(CoverStrokePath, NV);
+ GET_PROC_SUFFIX(CoverFillPathInstanced, NV);
+ GET_PROC_SUFFIX(CoverStrokePathInstanced, NV);
+ GET_PROC_SUFFIX(GetPathParameteriv, NV);
+ GET_PROC_SUFFIX(GetPathParameterfv, NV);
+ GET_PROC_SUFFIX(GetPathCommands, NV);
+ GET_PROC_SUFFIX(GetPathCoords, NV);
+ GET_PROC_SUFFIX(GetPathDashArray, NV);
+ GET_PROC_SUFFIX(GetPathMetrics, NV);
+ GET_PROC_SUFFIX(GetPathMetricRange, NV);
+ GET_PROC_SUFFIX(GetPathSpacing, NV);
+ GET_PROC_SUFFIX(GetPathColorGeniv, NV);
+ GET_PROC_SUFFIX(GetPathColorGenfv, NV);
+ GET_PROC_SUFFIX(GetPathTexGeniv, NV);
+ GET_PROC_SUFFIX(GetPathTexGenfv, NV);
+ GET_PROC_SUFFIX(IsPointInFillPath, NV);
+ GET_PROC_SUFFIX(IsPointInStrokePath, NV);
+ GET_PROC_SUFFIX(GetPathLength, NV);
+ GET_PROC_SUFFIX(PointAlongPath, NV);
}
if (extensions.has("GL_EXT_debug_marker")) {
- GR_GL_GET_PROC_SUFFIX(InsertEventMarker, EXT);
- GR_GL_GET_PROC_SUFFIX(PushGroupMarker, EXT);
- GR_GL_GET_PROC_SUFFIX(PopGroupMarker, EXT);
+ GET_PROC_SUFFIX(InsertEventMarker, EXT);
+ GET_PROC_SUFFIX(PushGroupMarker, EXT);
+ GET_PROC_SUFFIX(PopGroupMarker, EXT);
}
if (glVer >= GR_GL_VER(4,3) || extensions.has("GL_ARB_invalidate_subdata")) {
- GR_GL_GET_PROC(InvalidateBufferData);
- GR_GL_GET_PROC(InvalidateBufferSubData);
- GR_GL_GET_PROC(InvalidateFramebuffer);
- GR_GL_GET_PROC(InvalidateSubFramebuffer);
- GR_GL_GET_PROC(InvalidateTexImage);
- GR_GL_GET_PROC(InvalidateTexSubImage);
+ GET_PROC(InvalidateBufferData);
+ GET_PROC(InvalidateBufferSubData);
+ GET_PROC(InvalidateFramebuffer);
+ GET_PROC(InvalidateSubFramebuffer);
+ GET_PROC(InvalidateTexImage);
+ GET_PROC(InvalidateTexSubImage);
}
interface->fStandard = kGL_GrGLStandard;