PageRenderTime 58ms CodeModel.GetById 34ms RepoModel.GetById 0ms app.codeStats 0ms

/src/OpenGl/OpenGl_GlCore30.hxx

https://github.com/tpaviot/oce
C++ Header | 160 lines | 118 code | 18 blank | 24 comment | 0 complexity | f88bebf318d2294b53bcfdb1b17111b3 MD5 | raw file
  1. // Created on: 2014-03-17
  2. // Created by: Kirill GAVRILOV
  3. // Copyright (c) 2014 OPEN CASCADE SAS
  4. //
  5. // This file is part of Open CASCADE Technology software library.
  6. //
  7. // This library is free software; you can redistribute it and/or modify it under
  8. // the terms of the GNU Lesser General Public License version 2.1 as published
  9. // by the Free Software Foundation, with special exception defined in the file
  10. // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
  11. // distribution for complete text of the license and disclaimer of any warranty.
  12. //
  13. // Alternatively, this file may be used under the terms of Open CASCADE
  14. // commercial license or contractual agreement.
  15. #ifndef _OpenGl_GlCore30_Header
  16. #define _OpenGl_GlCore30_Header
  17. #include <OpenGl_GlCore21.hxx>
  18. //! OpenGL 3.0 core.
  19. //! This is first version with deprecation model introduced
  20. //! - a lot of functionality regarding to fixed pipeline were marked deprecated.
  21. //! Notice that nothing were actually removed in this version (unless Forward context loaded)!
  22. template<typename theBaseClass_t>
  23. struct OpenGl_TmplCore30 : public theBaseClass_t
  24. {
  25. public: //! @name GL_ARB_framebuffer_object (added to OpenGL 3.0 core)
  26. using theBaseClass_t::glIsRenderbuffer;
  27. using theBaseClass_t::glBindRenderbuffer;
  28. using theBaseClass_t::glDeleteRenderbuffers;
  29. using theBaseClass_t::glGenRenderbuffers;
  30. using theBaseClass_t::glRenderbufferStorage;
  31. using theBaseClass_t::glGetRenderbufferParameteriv;
  32. using theBaseClass_t::glIsFramebuffer;
  33. using theBaseClass_t::glBindFramebuffer;
  34. using theBaseClass_t::glDeleteFramebuffers;
  35. using theBaseClass_t::glGenFramebuffers;
  36. using theBaseClass_t::glCheckFramebufferStatus;
  37. using theBaseClass_t::glFramebufferTexture2D;
  38. using theBaseClass_t::glFramebufferRenderbuffer;
  39. using theBaseClass_t::glGetFramebufferAttachmentParameteriv;
  40. using theBaseClass_t::glGenerateMipmap;
  41. using theBaseClass_t::glBlitFramebuffer;
  42. using theBaseClass_t::glRenderbufferStorageMultisample;
  43. using theBaseClass_t::glFramebufferTextureLayer;
  44. #if !defined(GL_ES_VERSION_2_0)
  45. using theBaseClass_t::glFramebufferTexture1D;
  46. using theBaseClass_t::glFramebufferTexture3D;
  47. #endif
  48. public: //! @name GL_ARB_vertex_array_object (added to OpenGL 3.0 core)
  49. using theBaseClass_t::glBindVertexArray;
  50. using theBaseClass_t::glDeleteVertexArrays;
  51. using theBaseClass_t::glGenVertexArrays;
  52. using theBaseClass_t::glIsVertexArray;
  53. public: //! @name GL_ARB_map_buffer_range (added to OpenGL 3.0 core)
  54. #ifndef __EMSCRIPTEN__
  55. using theBaseClass_t::glMapBufferRange;
  56. using theBaseClass_t::glFlushMappedBufferRange;
  57. #endif
  58. public: //! @name OpenGL 3.0 additives to 2.1
  59. using theBaseClass_t::glGetBooleani_v;
  60. using theBaseClass_t::glGetIntegeri_v;
  61. using theBaseClass_t::glBeginTransformFeedback;
  62. using theBaseClass_t::glEndTransformFeedback;
  63. using theBaseClass_t::glBindBufferRange;
  64. using theBaseClass_t::glBindBufferBase;
  65. using theBaseClass_t::glTransformFeedbackVaryings;
  66. using theBaseClass_t::glGetTransformFeedbackVarying;
  67. using theBaseClass_t::glVertexAttribIPointer;
  68. using theBaseClass_t::glGetVertexAttribIiv;
  69. using theBaseClass_t::glGetVertexAttribIuiv;
  70. using theBaseClass_t::glVertexAttribI4i;
  71. using theBaseClass_t::glVertexAttribI4ui;
  72. using theBaseClass_t::glVertexAttribI4iv;
  73. using theBaseClass_t::glVertexAttribI4uiv;
  74. using theBaseClass_t::glGetUniformuiv;
  75. using theBaseClass_t::glGetFragDataLocation;
  76. using theBaseClass_t::glUniform1ui;
  77. using theBaseClass_t::glUniform2ui;
  78. using theBaseClass_t::glUniform3ui;
  79. using theBaseClass_t::glUniform4ui;
  80. using theBaseClass_t::glUniform1uiv;
  81. using theBaseClass_t::glUniform2uiv;
  82. using theBaseClass_t::glUniform3uiv;
  83. using theBaseClass_t::glUniform4uiv;
  84. using theBaseClass_t::glClearBufferiv;
  85. using theBaseClass_t::glClearBufferuiv;
  86. using theBaseClass_t::glClearBufferfv;
  87. using theBaseClass_t::glClearBufferfi;
  88. using theBaseClass_t::glGetStringi;
  89. #if !defined(GL_ES_VERSION_2_0)
  90. // the following have been added only in OpenGL ES 3.2
  91. using theBaseClass_t::glColorMaski;
  92. using theBaseClass_t::glEnablei;
  93. using theBaseClass_t::glDisablei;
  94. using theBaseClass_t::glIsEnabledi;
  95. using theBaseClass_t::glTexParameterIiv;
  96. using theBaseClass_t::glTexParameterIuiv;
  97. using theBaseClass_t::glGetTexParameterIiv;
  98. using theBaseClass_t::glGetTexParameterIuiv;
  99. #endif
  100. #if !defined(GL_ES_VERSION_2_0)
  101. // the following are defined only on desktop OpenGL
  102. using theBaseClass_t::glClampColor;
  103. using theBaseClass_t::glBeginConditionalRender;
  104. using theBaseClass_t::glEndConditionalRender;
  105. using theBaseClass_t::glBindFragDataLocation;
  106. using theBaseClass_t::glVertexAttribI1i;
  107. using theBaseClass_t::glVertexAttribI2i;
  108. using theBaseClass_t::glVertexAttribI3i;
  109. using theBaseClass_t::glVertexAttribI1ui;
  110. using theBaseClass_t::glVertexAttribI2ui;
  111. using theBaseClass_t::glVertexAttribI3ui;
  112. using theBaseClass_t::glVertexAttribI1iv;
  113. using theBaseClass_t::glVertexAttribI2iv;
  114. using theBaseClass_t::glVertexAttribI3iv;
  115. using theBaseClass_t::glVertexAttribI1uiv;
  116. using theBaseClass_t::glVertexAttribI2uiv;
  117. using theBaseClass_t::glVertexAttribI3uiv;
  118. using theBaseClass_t::glVertexAttribI4bv;
  119. using theBaseClass_t::glVertexAttribI4sv;
  120. using theBaseClass_t::glVertexAttribI4ubv;
  121. using theBaseClass_t::glVertexAttribI4usv;
  122. #endif
  123. #if defined(GL_ES_VERSION_2_0)
  124. // the following functions from OpenGL 1.5 have been added only in OpenGL ES 3.0
  125. using theBaseClass_t::glGenQueries;
  126. using theBaseClass_t::glDeleteQueries;
  127. using theBaseClass_t::glIsQuery;
  128. using theBaseClass_t::glBeginQuery;
  129. using theBaseClass_t::glEndQuery;
  130. using theBaseClass_t::glGetQueryiv;
  131. using theBaseClass_t::glGetQueryObjectuiv;
  132. #ifndef __EMSCRIPTEN__
  133. using theBaseClass_t::glUnmapBuffer;
  134. #endif
  135. #endif
  136. };
  137. //! OpenGL 3.0 core based on 2.1 version.
  138. typedef OpenGl_TmplCore30<OpenGl_GlCore21> OpenGl_GlCore30;
  139. //! OpenGL 3.0 without deprecated entry points.
  140. //! Notice that this doesn't actually corresponds to GL3.0 forward profile!
  141. typedef OpenGl_TmplCore30<OpenGl_GlCore21Fwd> OpenGl_GlCore30Fwd;
  142. #endif // _OpenGl_GlCore30_Header