13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#ifndef _SGLRCONTEXTWRAPPER_HPP 23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#define _SGLRCONTEXTWRAPPER_HPP 33c827367444ee418f129b2c238299f49d3264554Jarkko Poyry/*------------------------------------------------------------------------- 43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * drawElements Quality Program OpenGL ES Utilities 53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * ------------------------------------------------ 63c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Copyright 2014 The Android Open Source Project 83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Licensed under the Apache License, Version 2.0 (the "License"); 103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * you may not use this file except in compliance with the License. 113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * You may obtain a copy of the License at 123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * http://www.apache.org/licenses/LICENSE-2.0 143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Unless required by applicable law or agreed to in writing, software 163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * distributed under the License is distributed on an "AS IS" BASIS, 173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * See the License for the specific language governing permissions and 193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * limitations under the License. 203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*! 223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \file 233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \brief Context wrapper that exposes sglr API as GL-compatible API. 243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*--------------------------------------------------------------------*/ 253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuDefs.hpp" 273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuVector.hpp" 283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 293c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace sglr 303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 323c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass Shader; 333c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass Context; 343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 353c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass ContextWrapper 363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 373c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic: 383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ContextWrapper (void); 393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ~ContextWrapper (void); 403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void setContext (Context* context); 423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Context* getCurrentContext (void) const; 433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int getWidth (void) const; 453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int getHeight (void) const; 463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // GL-compatible API. 483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glActiveTexture (deUint32 texture); 493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glAttachShader (deUint32 program, deUint32 shader); 503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindAttribLocation (deUint32 program, deUint32 index, const char* name); 513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindBuffer (deUint32 target, deUint32 buffer); 523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindFramebuffer (deUint32 target, deUint32 framebuffer); 533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindRenderbuffer (deUint32 target, deUint32 renderbuffer); 543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindTexture (deUint32 target, deUint32 texture); 553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBlendColor (float red, float green, float blue, float alpha); 563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBlendEquation (deUint32 mode); 573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBlendEquationSeparate (deUint32 modeRGB, deUint32 modeAlpha); 583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBlendFunc (deUint32 sfactor, deUint32 dfactor); 593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBlendFuncSeparate (deUint32 srcRGB, deUint32 dstRGB, deUint32 srcAlpha, deUint32 dstAlpha); 603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBufferData (deUint32 target, deIntptr size, const void* data, deUint32 usage); 613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBufferSubData (deUint32 target, deIntptr offset, deIntptr size, const void* data); 623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 glCheckFramebufferStatus (deUint32 target); 633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glClear (deUint32 mask); 643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glClearColor (float red, float green, float blue, float alpha); 653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glClearDepthf (float depth); 663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glClearStencil (int s); 673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glColorMask (deBool red, deBool green, deBool blue, deBool alpha); 683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCompileShader (deUint32 shader); 693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCompressedTexImage2D (deUint32 target, int level, deUint32 internalformat, int width, int height, int border, int imageSize, const void* data); 703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCompressedTexSubImage2D (deUint32 target, int level, int xoffset, int yoffset, int width, int height, deUint32 format, int imageSize, const void* data); 713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCopyTexImage1D (deUint32 target, int level, deUint32 internalformat, int x, int y, int width, int border); 723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCopyTexImage2D (deUint32 target, int level, deUint32 internalformat, int x, int y, int width, int height, int border); 733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCopyTexSubImage1D (deUint32 target, int level, int xoffset, int x, int y, int width); 743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCopyTexSubImage2D (deUint32 target, int level, int xoffset, int yoffset, int x, int y, int width, int height); 753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 glCreateProgram (); 763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 glCreateShader (deUint32 type); 773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCullFace (deUint32 mode); 783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteBuffers (int n, const deUint32* buffers); 793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteFramebuffers (int n, const deUint32* framebuffers); 803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteProgram (deUint32 program); 813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteRenderbuffers (int n, const deUint32* renderbuffers); 823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteShader (deUint32 shader); 833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteTextures (int n, const deUint32* textures); 843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDepthFunc (deUint32 func); 853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDepthMask (deBool flag); 863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDepthRangef (float n, float f); 873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDetachShader (deUint32 program, deUint32 shader); 883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDisable (deUint32 cap); 893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDisableVertexAttribArray (deUint32 index); 903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDrawArrays (deUint32 mode, int first, int count); 913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDrawElements (deUint32 mode, int count, deUint32 type, const void* indices); 923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glEnable (deUint32 cap); 933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glEnableVertexAttribArray (deUint32 index); 943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glFinish (); 953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glFlush (); 963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glFramebufferRenderbuffer (deUint32 target, deUint32 attachment, deUint32 renderbuffertarget, deUint32 renderbuffer); 973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glFramebufferTexture2D (deUint32 target, deUint32 attachment, deUint32 textarget, deUint32 texture, int level); 983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glFrontFace (deUint32 mode); 993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenBuffers (int n, deUint32* buffers); 1003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenerateMipmap (deUint32 target); 1013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenFramebuffers (int n, deUint32* framebuffers); 1023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenRenderbuffers (int n, deUint32* renderbuffers); 1033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenTextures (int n, deUint32* textures); 1043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetActiveAttrib (deUint32 program, deUint32 index, int bufsize, int* length, int* size, deUint32* type, char* name); 1053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetActiveUniform (deUint32 program, deUint32 index, int bufsize, int* length, int* size, deUint32* type, char* name); 1063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetAttachedShaders (deUint32 program, int maxcount, int* count, deUint32* shaders); 1073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int glGetAttribLocation (deUint32 program, const char* name); 1083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetBooleanv (deUint32 pname, deBool* params); 1093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetBufferParameteriv (deUint32 target, deUint32 pname, int* params); 1103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 glGetError (); 1113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetFloatv (deUint32 pname, float* params); 1123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetFramebufferAttachmentParameteriv (deUint32 target, deUint32 attachment, deUint32 pname, int* params); 1133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetIntegerv (deUint32 pname, int* params); 1143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetProgramiv (deUint32 program, deUint32 pname, int* params); 1153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetProgramInfoLog (deUint32 program, int bufsize, int* length, char* infolog); 1163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetRenderbufferParameteriv (deUint32 target, deUint32 pname, int* params); 1173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetShaderiv (deUint32 shader, deUint32 pname, int* params); 1183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetShaderInfoLog (deUint32 shader, int bufsize, int* length, char* infolog); 1193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetShaderPrecisionFormat (deUint32 shadertype, deUint32 precisiontype, int* range, int* precision); 1203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetShaderSource (deUint32 shader, int bufsize, int* length, char* source); 1213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const deUint8* glGetString (deUint32 name); 1223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetTexParameterfv (deUint32 target, deUint32 pname, float* params); 1233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetTexParameteriv (deUint32 target, deUint32 pname, int* params); 1243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetUniformfv (deUint32 program, int location, float* params); 1253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetUniformiv (deUint32 program, int location, int* params); 1263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int glGetUniformLocation (deUint32 program, const char* name); 1273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetVertexAttribfv (deUint32 index, deUint32 pname, float* params); 1283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetVertexAttribiv (deUint32 index, deUint32 pname, int* params); 1293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetVertexAttribPointerv (deUint32 index, deUint32 pname, void** pointer); 1303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glHint (deUint32 target, deUint32 mode); 1313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsBuffer (deUint32 buffer); 1323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsEnabled (deUint32 cap); 1333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsFramebuffer (deUint32 framebuffer); 1343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsProgram (deUint32 program); 1353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsRenderbuffer (deUint32 renderbuffer); 1363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsShader (deUint32 shader); 1373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsTexture (deUint32 texture); 1383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glLineWidth (float width); 1393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glLinkProgram (deUint32 program); 1403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glPixelStorei (deUint32 pname, int param); 1413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glPolygonOffset (float factor, float units); 1423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glReadPixels (int x, int y, int width, int height, deUint32 format, deUint32 type, void* pixels); 1433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glReleaseShaderCompiler (); 1443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glRenderbufferStorage (deUint32 target, deUint32 internalformat, int width, int height); 1453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glSampleCoverage (float value, deBool invert); 1463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glScissor (int x, int y, int width, int height); 1473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glShaderBinary (int n, const deUint32* shaders, deUint32 binaryformat, const void* binary, int length); 1483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glShaderSource (deUint32 shader, int count, const char* const* string, const int* length); 1493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glStencilFunc (deUint32 func, int ref, deUint32 mask); 1503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glStencilFuncSeparate (deUint32 face, deUint32 func, int ref, deUint32 mask); 1513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glStencilMask (deUint32 mask); 1523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glStencilMaskSeparate (deUint32 face, deUint32 mask); 1533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glStencilOp (deUint32 fail, deUint32 zfail, deUint32 zpass); 1543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glStencilOpSeparate (deUint32 face, deUint32 fail, deUint32 zfail, deUint32 zpass); 1553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexImage1D (deUint32 target, int level, int internalformat, int width, int border, deUint32 format, deUint32 type, const void* pixels); 1563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexImage2D (deUint32 target, int level, int internalformat, int width, int height, int border, deUint32 format, deUint32 type, const void* pixels); 1573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexParameterf (deUint32 target, deUint32 pname, float param); 1583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexParameterfv (deUint32 target, deUint32 pname, const float* params); 1593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexParameteri (deUint32 target, deUint32 pname, int param); 1603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexParameteriv (deUint32 target, deUint32 pname, const int* params); 1613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexSubImage1D (deUint32 target, int level, int xoffset, int width, deUint32 format, deUint32 type, const void* pixels); 1623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexSubImage2D (deUint32 target, int level, int xoffset, int yoffset, int width, int height, deUint32 format, deUint32 type, const void* pixels); 1633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform1f (int location, float x); 1643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform1fv (int location, int count, const float* v); 1653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform1i (int location, int x); 1663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform1iv (int location, int count, const int* v); 1673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform2f (int location, float x, float y); 1683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform2fv (int location, int count, const float* v); 1693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform2i (int location, int x, int y); 1703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform2iv (int location, int count, const int* v); 1713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform3f (int location, float x, float y, float z); 1723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform3fv (int location, int count, const float* v); 1733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform3i (int location, int x, int y, int z); 1743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform3iv (int location, int count, const int* v); 1753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform4f (int location, float x, float y, float z, float w); 1763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform4fv (int location, int count, const float* v); 1773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform4i (int location, int x, int y, int z, int w); 1783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform4iv (int location, int count, const int* v); 1793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix2fv (int location, int count, deBool transpose, const float* value); 1803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix3fv (int location, int count, deBool transpose, const float* value); 1813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix4fv (int location, int count, deBool transpose, const float* value); 1823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUseProgram (deUint32 program); 1833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glValidateProgram (deUint32 program); 1843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttrib1f (deUint32 indx, float x); 1853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttrib1fv (deUint32 indx, const float* values); 1863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttrib2f (deUint32 indx, float x, float y); 1873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttrib2fv (deUint32 indx, const float* values); 1883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttrib3f (deUint32 indx, float x, float y, float z); 1893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttrib3fv (deUint32 indx, const float* values); 1903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttrib4f (deUint32 indx, float x, float y, float z, float w); 1913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttrib4fv (deUint32 indx, const float* values); 1923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttribPointer (deUint32 indx, int size, deUint32 type, deBool normalized, int stride, const void* ptr); 1933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glViewport (int x, int y, int width, int height); 1943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glReadBuffer (deUint32 mode); 1953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDrawRangeElements (deUint32 mode, deUint32 start, deUint32 end, int count, deUint32 type, const void* indices); 1963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexImage3D (deUint32 target, int level, int internalformat, int width, int height, int depth, int border, deUint32 format, deUint32 type, const void* pixels); 1973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexSubImage3D (deUint32 target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, deUint32 format, deUint32 type, const void* pixels); 1983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCopyTexSubImage3D (deUint32 target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); 1993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCompressedTexImage3D (deUint32 target, int level, deUint32 internalformat, int width, int height, int depth, int border, int imageSize, const void* data); 2003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCompressedTexSubImage3D (deUint32 target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, deUint32 format, int imageSize, const void* data); 2013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenQueries (int n, deUint32* ids); 2023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteQueries (int n, const deUint32* ids); 2033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsQuery (deUint32 id); 2043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBeginQuery (deUint32 target, deUint32 id); 2053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glEndQuery (deUint32 target); 2063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetQueryiv (deUint32 target, deUint32 pname, int* params); 2073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetQueryObjectuiv (deUint32 id, deUint32 pname, deUint32* params); 2083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glUnmapBuffer (deUint32 target); 2093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetBufferPointerv (deUint32 target, deUint32 pname, void** params); 2103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDrawBuffers (int n, const deUint32* bufs); 2113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix2x3fv (int location, int count, deBool transpose, const float* value); 2123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix3x2fv (int location, int count, deBool transpose, const float* value); 2133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix2x4fv (int location, int count, deBool transpose, const float* value); 2143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix4x2fv (int location, int count, deBool transpose, const float* value); 2153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix3x4fv (int location, int count, deBool transpose, const float* value); 2163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformMatrix4x3fv (int location, int count, deBool transpose, const float* value); 2173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBlitFramebuffer (int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, deUint32 mask, deUint32 filter); 2183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glRenderbufferStorageMultisample (deUint32 target, int samples, deUint32 internalformat, int width, int height); 2193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glFramebufferTextureLayer (deUint32 target, deUint32 attachment, deUint32 texture, int level, int layer); 2203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void* glMapBufferRange (deUint32 target, deIntptr offset, deIntptr length, deUint32 access); 2213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glFlushMappedBufferRange (deUint32 target, deIntptr offset, deIntptr length); 2223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindVertexArray (deUint32 array); 2233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteVertexArrays (int n, const deUint32* arrays); 2243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenVertexArrays (int n, deUint32* arrays); 2253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsVertexArray (deUint32 array); 2263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetIntegeri_v (deUint32 target, deUint32 index, int* data); 2273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBeginTransformFeedback (deUint32 primitiveMode); 2283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glEndTransformFeedback (); 2293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindBufferRange (deUint32 target, deUint32 index, deUint32 buffer, deIntptr offset, deIntptr size); 2303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindBufferBase (deUint32 target, deUint32 index, deUint32 buffer); 2313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTransformFeedbackVaryings (deUint32 program, int count, const char* const* varyings, deUint32 bufferMode); 2323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetTransformFeedbackVarying (deUint32 program, deUint32 index, int bufSize, int* length, int* size, deUint32* type, char* name); 2333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttribIPointer (deUint32 index, int size, deUint32 type, int stride, const void* pointer); 2343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetVertexAttribIiv (deUint32 index, deUint32 pname, int* params); 2353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetVertexAttribIuiv (deUint32 index, deUint32 pname, deUint32* params); 2363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttribI4i (deUint32 index, int x, int y, int z, int w); 2373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttribI4ui (deUint32 index, deUint32 x, deUint32 y, deUint32 z, deUint32 w); 2383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttribI4iv (deUint32 index, const int* v); 2393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttribI4uiv (deUint32 index, const deUint32* v); 2403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetUniformuiv (deUint32 program, int location, deUint32* params); 2413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int glGetFragDataLocation (deUint32 program, const char* name); 2423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform1ui (int location, deUint32 v0); 2433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform2ui (int location, deUint32 v0, deUint32 v1); 2443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform3ui (int location, deUint32 v0, deUint32 v1, deUint32 v2); 2453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform4ui (int location, deUint32 v0, deUint32 v1, deUint32 v2, deUint32 v3); 2463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform1uiv (int location, int count, const deUint32* value); 2473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform2uiv (int location, int count, const deUint32* value); 2483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform3uiv (int location, int count, const deUint32* value); 2493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniform4uiv (int location, int count, const deUint32* value); 2503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glClearBufferiv (deUint32 buffer, int drawbuffer, const int* value); 2513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glClearBufferuiv (deUint32 buffer, int drawbuffer, const deUint32* value); 2523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glClearBufferfv (deUint32 buffer, int drawbuffer, const float* value); 2533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glClearBufferfi (deUint32 buffer, int drawbuffer, float depth, int stencil); 2543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const deUint8* glGetStringi (deUint32 name, deUint32 index); 2553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glCopyBufferSubData (deUint32 readTarget, deUint32 writeTarget, deIntptr readOffset, deIntptr writeOffset, deIntptr size); 2563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetUniformIndices (deUint32 program, int uniformCount, const char* const* uniformNames, deUint32* uniformIndices); 2573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetActiveUniformsiv (deUint32 program, int uniformCount, const deUint32* uniformIndices, deUint32 pname, int* params); 2583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 glGetUniformBlockIndex (deUint32 program, const char* uniformBlockName); 2593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetActiveUniformBlockiv (deUint32 program, deUint32 uniformBlockIndex, deUint32 pname, int* params); 2603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetActiveUniformBlockName (deUint32 program, deUint32 uniformBlockIndex, int bufSize, int* length, char* uniformBlockName); 2613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glUniformBlockBinding (deUint32 program, deUint32 uniformBlockIndex, deUint32 uniformBlockBinding); 2623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDrawArraysInstanced (deUint32 mode, int first, int count, int primcount); 2633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDrawElementsInstanced (deUint32 mode, int count, deUint32 type, const void* indices, int primcount); 2643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void* glFenceSync (deUint32 condition, deUint32 flags); 2653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsSync (void* sync); 2663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteSync (void* sync); 2673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 glClientWaitSync (void* sync, deUint32 flags, deUint64 timeout); 2683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glWaitSync (void* sync, deUint32 flags, deUint64 timeout); 2693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetInteger64v (deUint32 pname, deInt64* params); 2703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetSynciv (void* sync, deUint32 pname, int bufSize, int* length, int* values); 2713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetInteger64i_v (deUint32 target, deUint32 index, deInt64* data); 2723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetBufferParameteri64v (deUint32 target, deUint32 pname, deInt64* params); 2733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenSamplers (int count, deUint32* samplers); 2743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteSamplers (int count, const deUint32* samplers); 2753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsSampler (deUint32 sampler); 2763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindSampler (deUint32 unit, deUint32 sampler); 2773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glSamplerParameteri (deUint32 sampler, deUint32 pname, int param); 2783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glSamplerParameteriv (deUint32 sampler, deUint32 pname, const int* param); 2793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glSamplerParameterf (deUint32 sampler, deUint32 pname, float param); 2803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glSamplerParameterfv (deUint32 sampler, deUint32 pname, const float* param); 2813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetSamplerParameteriv (deUint32 sampler, deUint32 pname, int* params); 2823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetSamplerParameterfv (deUint32 sampler, deUint32 pname, float* params); 2833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glVertexAttribDivisor (deUint32 index, deUint32 divisor); 2843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glBindTransformFeedback (deUint32 target, deUint32 id); 2853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glDeleteTransformFeedbacks (int n, const deUint32* ids); 2863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGenTransformFeedbacks (int n, deUint32* ids); 2873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deBool glIsTransformFeedback (deUint32 id); 2883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glPauseTransformFeedback (); 2893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glResumeTransformFeedback (); 2903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetProgramBinary (deUint32 program, int bufSize, int* length, deUint32* binaryFormat, void* binary); 2913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glProgramBinary (deUint32 program, deUint32 binaryFormat, const void* binary, int length); 2923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glProgramParameteri (deUint32 program, deUint32 pname, int value); 2933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glInvalidateFramebuffer (deUint32 target, int numAttachments, const deUint32* attachments); 2943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glInvalidateSubFramebuffer (deUint32 target, int numAttachments, const deUint32* attachments, int x, int y, int width, int height); 2953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexStorage2D (deUint32 target, int levels, deUint32 internalformat, int width, int height); 2963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glTexStorage3D (deUint32 target, int levels, deUint32 internalformat, int width, int height, int depth); 2973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry void glGetInternalformativ (deUint32 target, deUint32 internalformat, deUint32 pname, int bufSize, int* params); 2983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2993c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate: 3003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Context* m_curCtx; 3013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}; 3023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // sglr 3043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#endif // _SGLRCONTEXTWRAPPER_HPP 306