GrGLInterface.h revision fbfcd5602128ec010c82cb733c9cdc0a3254f9f3
159a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 2ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com/* 3ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Copyright 2011 Google Inc. 4ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * 5ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Use of this source code is governed by a BSD-style license that can be 6ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * found in the LICENSE file. 759a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com */ 859a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 959a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 1059a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com#ifndef GrGLInterface_DEFINED 1159a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com#define GrGLInterface_DEFINED 1259a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 13637d5e929708db8eace06b81fa3049141f9a07efbsalomon@google.com#include "GrGLFunctions.h" 140b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com#include "GrRefCnt.h" 1559a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 1659a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com//////////////////////////////////////////////////////////////////////////////// 1759a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 1859a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com/** 1989ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com * Classifies GL contexts (currently as Desktop vs. ES2). This is a bitfield. 2089ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com * A GrGLInterface (defined below) may support multiple bindings. 2189ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com */ 2289ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.comenum GrGLBinding { 2389ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com kNone_GrGLBinding = 0x0, 2489ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com 2589ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com kDesktop_GrGLBinding = 0x01, 2689ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com kES2_GrGLBinding = 0x02, 2789ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com 2889ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com // for iteration of GrGLBindings 29b447d215772a5984dc776a8dc058e0711d566c04bsalomon@google.com kFirstGrGLBinding = kDesktop_GrGLBinding, 3089ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com kLastGrGLBinding = kES2_GrGLBinding 3189ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com}; 3289ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com 3389ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com//////////////////////////////////////////////////////////////////////////////// 3489ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com 3589ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com/** 360b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * Rather than depend on platform-specific GL headers and libraries, we require 370b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * the client to provide a struct of GL function pointers. This struct can be 380b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * specified per-GrContext as a parameter to GrContext::Create. If NULL is 390b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * passed to Create then the "default" GL interface is used. If the default is 400b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * also NULL GrContext creation will fail. 410b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com * 426fb736fc2ea5f3f7ac44494211cc6755180ca192bsalomon@google.com * The default interface is returned by GrGLDefaultInterface. This function's 430da3719050473344b6013fd7b614611984f20effrobertphillips@google.com * implementation is platform-specific. Several have been provided, along with 440da3719050473344b6013fd7b614611984f20effrobertphillips@google.com * an implementation that simply returns NULL. It is implementation-specific 456fb736fc2ea5f3f7ac44494211cc6755180ca192bsalomon@google.com * whether the same GrGLInterface is returned or whether a new one is created 466fb736fc2ea5f3f7ac44494211cc6755180ca192bsalomon@google.com * at each call. Some platforms may not be able to use a single GrGLInterface 476fb736fc2ea5f3f7ac44494211cc6755180ca192bsalomon@google.com * because extension function ptrs vary across contexts. Note that GrGLInterface 48fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com * is ref-counted. So if the same object is returned by multiple calls to 496fb736fc2ea5f3f7ac44494211cc6755180ca192bsalomon@google.com * GrGLDefaultInterface, each should bump the ref count. 5056bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com * 5156bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com * By defining GR_GL_PER_GL_CALL_IFACE_CALLBACK to 1 the client can specify a 5256bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com * callback function that will be called prior to each GL function call. See 5356bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com * comments in GrGLConfig.h 5459a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com */ 550b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com 5659a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.comstruct GrGLInterface; 5759a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 586fb736fc2ea5f3f7ac44494211cc6755180ca192bsalomon@google.comconst GrGLInterface* GrGLDefaultInterface(); 5959a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 6057f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com/** 6157f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows, 6257f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com * GLX on linux, AGL on Mac). On platforms that have context-specific function 63fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com * pointers for GL extensions (e.g. windows) the returned interface is only 6457f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com * valid for the context that was current at creation. 6557f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com */ 66373a6635b7190b4af4d265fdd4b70f102ec3a6fdbsalomon@google.comconst GrGLInterface* GrGLCreateNativeInterface(); 67373a6635b7190b4af4d265fdd4b70f102ec3a6fdbsalomon@google.com 68d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.com#if SK_MESA 6957f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com/** 7057f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com * Creates a GrGLInterface for an OSMesa context. 7157f5d9854bfc78c347cb587e044fb3950f9ad298bsalomon@google.com */ 72373a6635b7190b4af4d265fdd4b70f102ec3a6fdbsalomon@google.comconst GrGLInterface* GrGLCreateMesaInterface(); 73d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.com#endif 74d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.com 75d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.com#if SK_ANGLE 76d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.com/** 77d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.com * Creates a GrGLInterface for an ANGLE context. 78d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.com */ 79d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.comconst GrGLInterface* GrGLCreateANGLEInterface(); 80d3b9fbbc48c13a1b2a664cf7e01374a44c201f51robertphillips@google.com#endif 81373a6635b7190b4af4d265fdd4b70f102ec3a6fdbsalomon@google.com 8274913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com/** 8374913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com * Creates a null GrGLInterface that doesn't draw anything. Used for measuring 8474913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com * CPU overhead. 8574913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com */ 8674913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.comconst GrGLInterface* GrGLCreateNullInterface(); 8774913722bfe5e4b6810545891958e3d8e9c63791bsalomon@google.com 880da3719050473344b6013fd7b614611984f20effrobertphillips@google.com/** 89fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com * Creates a debugging GrGLInterface that doesn't draw anything. Used for 900da3719050473344b6013fd7b614611984f20effrobertphillips@google.com * finding memory leaks and invalid memory accesses. 910da3719050473344b6013fd7b614611984f20effrobertphillips@google.com */ 920da3719050473344b6013fd7b614611984f20effrobertphillips@google.comconst GrGLInterface* GrGLCreateDebugInterface(); 930da3719050473344b6013fd7b614611984f20effrobertphillips@google.com 9456bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com#if GR_GL_PER_GL_FUNC_CALLBACK 9556bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.comtypedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*); 9656bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.comtypedef intptr_t GrGLInterfaceCallbackData; 9756bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com#endif 9856bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com 99bf2a46941e8fdebfcd24ea8f7184779021898225bsalomon@google.com/* 100cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * GrContext uses the following interface to make all calls into OpenGL. When a 101cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * GrContext is created it is given a GrGLInterface. The interface's function 102cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * pointers must be valid for the OpenGL context associated with the GrContext. 103cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * On some platforms, such as Windows, function pointers for OpenGL extensions 104cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * may vary between OpenGL contexts. So the caller must be careful to use a 105cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * GrGLInterface initialized for the correct context. All functions that should 106cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * be available based on the OpenGL's version and extension string must be 107cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * non-NULL or GrContext creation will fail. This can be tested with the 108cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com * validate() method when the OpenGL context has been made current. 109bf2a46941e8fdebfcd24ea8f7184779021898225bsalomon@google.com */ 1100b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.comstruct GR_API GrGLInterface : public GrRefCnt { 111ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.comprivate: 1129c1f1ac5d399c73f5f331bdf7b392ea7f0c44dafbsalomon@google.com // simple wrapper class that exists only to initialize a pointer to NULL 113ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com template <typename FNPTR_TYPE> class GLPtr { 114ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com public: 115ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr() : fPtr(NULL) {} 116ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr operator =(FNPTR_TYPE ptr) { fPtr = ptr; return *this; } 117ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com operator FNPTR_TYPE() const { return fPtr; } 118ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com private: 119ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com FNPTR_TYPE fPtr; 120ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com }; 121ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com 12215e9d3e66e161ce23df30bc13f8a0c87d196b463robertphillips@google.com typedef GrRefCnt INHERITED; 12315e9d3e66e161ce23df30bc13f8a0c87d196b463robertphillips@google.com 124ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.compublic: 12515e9d3e66e161ce23df30bc13f8a0c87d196b463robertphillips@google.com SK_DECLARE_INST_COUNT(GrGLInterface) 12615e9d3e66e161ce23df30bc13f8a0c87d196b463robertphillips@google.com 1270b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com GrGLInterface(); 1280b77d6892b067ad402c9678b0226bff70599fbe2bsalomon@google.com 12989ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com // Validates that the GrGLInterface supports a binding. This means that 13089ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com // the GrGLinterface advertises the binding in fBindingsExported and all 131cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com // the necessary function pointers have been initialized. The interface is 132cc61b1762814ada94970ac071aa2d0a96f897363bsalomon@google.com // validated for the current OpenGL context. 13389ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com bool validate(GrGLBinding binding) const; 13489ec61e33daa9cbac200d38f7c5bb8b88046999absalomon@google.com 135b65e0cb8ad8a690498142d2b0097be250b0c7dfbtwiz@google.com // Indicator variable specifying the type of GL implementation 136ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com // exported: GLES2 and/or Desktop. 137b65e0cb8ad8a690498142d2b0097be250b0c7dfbtwiz@google.com GrGLBinding fBindingsExported; 138b65e0cb8ad8a690498142d2b0097be250b0c7dfbtwiz@google.com 139ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLActiveTextureProc> fActiveTexture; 140ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLAttachShaderProc> fAttachShader; 141ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBeginQueryProc> fBeginQuery; 142ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBindAttribLocationProc> fBindAttribLocation; 143ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBindBufferProc> fBindBuffer; 144ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBindFragDataLocationProc> fBindFragDataLocation; 145ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed; 146ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBindFramebufferProc> fBindFramebuffer; 147ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBindRenderbufferProc> fBindRenderbuffer; 148ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBindTextureProc> fBindTexture; 149ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBlendColorProc> fBlendColor; 150ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBlendFuncProc> fBlendFunc; 151ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBlitFramebufferProc> fBlitFramebuffer; 152ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBufferDataProc> fBufferData; 153ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLBufferSubDataProc> fBufferSubData; 154ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus; 155ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLClearProc> fClear; 156ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLClearColorProc> fClearColor; 157ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLClearStencilProc> fClearStencil; 158ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLColorMaskProc> fColorMask; 159ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLCompileShaderProc> fCompileShader; 160ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLCompressedTexImage2DProc> fCompressedTexImage2D; 161ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLCreateProgramProc> fCreateProgram; 162ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLCreateShaderProc> fCreateShader; 163ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLCullFaceProc> fCullFace; 164ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDeleteBuffersProc> fDeleteBuffers; 165ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDeleteFramebuffersProc> fDeleteFramebuffers; 166ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDeleteProgramProc> fDeleteProgram; 167ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDeleteQueriesProc> fDeleteQueries; 168ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers; 169ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDeleteShaderProc> fDeleteShader; 170ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDeleteTexturesProc> fDeleteTextures; 171ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDepthMaskProc> fDepthMask; 172ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDisableProc> fDisable; 173ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray; 174ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDrawArraysProc> fDrawArrays; 175ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDrawBufferProc> fDrawBuffer; 176ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDrawBuffersProc> fDrawBuffers; 177ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLDrawElementsProc> fDrawElements; 178ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLEnableProc> fEnable; 179ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray; 180ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLEndQueryProc> fEndQuery; 181ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLFinishProc> fFinish; 182ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLFlushProc> fFlush; 183ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer; 184ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLFramebufferTexture2DProc> fFramebufferTexture2D; 185ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLFrontFaceProc> fFrontFace; 186ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGenBuffersProc> fGenBuffers; 187ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGenFramebuffersProc> fGenFramebuffers; 188ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGenQueriesProc> fGenQueries; 189ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGenRenderbuffersProc> fGenRenderbuffers; 190ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGenTexturesProc> fGenTextures; 191ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetBufferParameterivProc> fGetBufferParameteriv; 192ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetErrorProc> fGetError; 193ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv; 194ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetIntegervProc> fGetIntegerv; 195ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v; 196ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetQueryObjectivProc> fGetQueryObjectiv; 197ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v; 198ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv; 199ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetQueryivProc> fGetQueryiv; 200ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetProgramInfoLogProc> fGetProgramInfoLog; 201ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetProgramivProc> fGetProgramiv; 202ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv; 203ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetShaderInfoLogProc> fGetShaderInfoLog; 204ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetShaderivProc> fGetShaderiv; 205ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetStringProc> fGetString; 206ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; 207ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLGetUniformLocationProc> fGetUniformLocation; 208ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLLineWidthProc> fLineWidth; 209ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLLinkProgramProc> fLinkProgram; 210ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLMapBufferProc> fMapBuffer; 211ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLPixelStoreiProc> fPixelStorei; 212ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLQueryCounterProc> fQueryCounter; 213ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLReadBufferProc> fReadBuffer; 214ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLReadPixelsProc> fReadPixels; 215ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLRenderbufferStorageProc> fRenderbufferStorage; 216ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample; 217c9668ecdb7188a90b050771727da899c54dc7013bsalomon@google.com GLPtr<GrGLRenderbufferStorageMultisampleCoverageProc> fRenderbufferStorageMultisampleCoverage; 218ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer; 219ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLScissorProc> fScissor; 220ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLShaderSourceProc> fShaderSource; 221ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLStencilFuncProc> fStencilFunc; 222ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLStencilFuncSeparateProc> fStencilFuncSeparate; 223ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLStencilMaskProc> fStencilMask; 224ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLStencilMaskSeparateProc> fStencilMaskSeparate; 225ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLStencilOpProc> fStencilOp; 226ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLStencilOpSeparateProc> fStencilOpSeparate; 227ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLTexImage2DProc> fTexImage2D; 228ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLTexParameteriProc> fTexParameteri; 2294d063dea5ee9d5a62e3566a07cb8386cb1a59585bsalomon@google.com GLPtr<GrGLTexParameterivProc> fTexParameteriv; 230ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLTexSubImage2DProc> fTexSubImage2D; 231ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLTexStorage2DProc> fTexStorage2D; 232ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform1fProc> fUniform1f; 233ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform1iProc> fUniform1i; 234ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform1fvProc> fUniform1fv; 235ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform1ivProc> fUniform1iv; 236ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform2fProc> fUniform2f; 237ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform2iProc> fUniform2i; 238ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform2fvProc> fUniform2fv; 239ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform2ivProc> fUniform2iv; 240ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform3fProc> fUniform3f; 241ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform3iProc> fUniform3i; 242ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform3fvProc> fUniform3fv; 243ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform3ivProc> fUniform3iv; 244ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform4fProc> fUniform4f; 245ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform4iProc> fUniform4i; 246ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform4fvProc> fUniform4fv; 247ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniform4ivProc> fUniform4iv; 248ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniformMatrix2fvProc> fUniformMatrix2fv; 249ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniformMatrix3fvProc> fUniformMatrix3fv; 250ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUniformMatrix4fvProc> fUniformMatrix4fv; 251ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUnmapBufferProc> fUnmapBuffer; 252ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLUseProgramProc> fUseProgram; 253ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLVertexAttrib4fvProc> fVertexAttrib4fv; 254ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLVertexAttribPointerProc> fVertexAttribPointer; 255ba800e22253d96a7ba6aab09e969e1581f2b487dbsalomon@google.com GLPtr<GrGLViewportProc> fViewport; 256271cffc77bd2fcb3458559e509634442517ca1e9bsalomon@google.com 257fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com // Experimental: Functions for GL_NV_path_rendering. These will be 258fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com // alphabetized with the above functions once this is fully supported 259fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com // (and functions we are unlikely to use will possibly be omitted). 260fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLMatrixModeProc> fMatrixMode; 261fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLLoadIdentityProc> fLoadIdentity; 262fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLLoadMatrixfProc> fLoadMatrixf; 263fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathCommandsProc> fPathCommands; 264fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathCoordsProc> fPathCoords; 265fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathSubCommandsProc> fPathSubCommands; 266fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathSubCoordsProc> fPathSubCoords; 267fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathStringProc> fPathString; 268fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathGlyphsProc> fPathGlyphs; 269fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathGlyphRangeProc> fPathGlyphRange; 270fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLWeightPathsProc> fWeightPaths; 271fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLCopyPathProc> fCopyPath; 272fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLInterpolatePathsProc> fInterpolatePaths; 273fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLTransformPathProc> fTransformPath; 274fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathParameterivProc> fPathParameteriv; 275fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathParameteriProc> fPathParameteri; 276fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathParameterfvProc> fPathParameterfv; 277fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathParameterfProc> fPathParameterf; 278fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathDashArrayProc> fPathDashArray; 279fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGenPathsProc> fGenPaths; 280fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLDeletePathsProc> fDeletePaths; 281fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLIsPathProc> fIsPath; 282fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathStencilFuncProc> fPathStencilFunc; 283fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathStencilDepthOffsetProc> fPathStencilDepthOffset; 284fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLStencilFillPathProc> fStencilFillPath; 285fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLStencilStrokePathProc> fStencilStrokePath; 286fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced; 287fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced; 288fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathCoverDepthFuncProc> fPathCoverDepthFunc; 289fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathColorGenProc> fPathColorGen; 290fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathTexGenProc> fPathTexGen; 291fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPathFogGenProc> fPathFogGen; 292fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLCoverFillPathProc> fCoverFillPath; 293fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLCoverStrokePathProc> fCoverStrokePath; 294fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced; 295fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced; 296fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathParameterivProc> fGetPathParameteriv; 297fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathParameterfvProc> fGetPathParameterfv; 298fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathCommandsProc> fGetPathCommands; 299fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathCoordsProc> fGetPathCoords; 300fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathDashArrayProc> fGetPathDashArray; 301fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathMetricsProc> fGetPathMetrics; 302fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathMetricRangeProc> fGetPathMetricRange; 303fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathSpacingProc> fGetPathSpacing; 304fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathColorGenivProc> fGetPathColorGeniv; 305fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathColorGenfvProc> fGetPathColorGenfv; 306fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathTexGenivProc> fGetPathTexGeniv; 307fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathTexGenfvProc> fGetPathTexGenfv; 308fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLIsPointInFillPathProc> fIsPointInFillPath; 309fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLIsPointInStrokePathProc> fIsPointInStrokePath; 310fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLGetPathLengthProc> fGetPathLength; 311fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com GLPtr<GrGLPointAlongPathProc> fPointAlongPath; 312fe11cb6486adfccc1a9ca9658ae25907192a8642bsalomon@google.com 31356bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com // Per-GL func callback 31456bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com#if GR_GL_PER_GL_FUNC_CALLBACK 31556bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com GrGLInterfaceCallbackProc fCallback; 31656bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com GrGLInterfaceCallbackData fCallbackData; 31756bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com#endif 31856bfc5acc210987838744eece7383bc2f6b34915bsalomon@google.com 319bf2a46941e8fdebfcd24ea8f7184779021898225bsalomon@google.com}; 32059a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com 32159a190bcab5d4b2bf03f8f10cb6a581d19fed403twiz@google.com#endif 322