gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
Namespaces | Functions | Variables
OpenGLUtilities.h File Reference

Some utility functions about OpenGL. Now supports GLSL450 and OpenGL 4.5. More...

#include "gVirtualXRay/gVirtualXRayConfig.h"
#include <vector>
#include "gVirtualXRay/Matrix4x4.h"
#include "gVirtualXRay/Types.h"
#include "gVirtualXRay/VBO.h"
#include "gVirtualXRay/OpenGL2VBO.h"
#include "gVirtualXRay/OpenGL3VBO.h"
#include "OpenGLUtilities.inl"
Include dependency graph for OpenGLUtilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 gVirtualXRay
 

Functions

void gVirtualXRay::initialiseGLAD (const std::string &anAPI)
 Initialise GLAD. More...
 
void gVirtualXRay::initializeGLAD (const std::string &anAPI)
 Initialize GLAD. More...
 
void gVirtualXRay::initialiseGLEW ()
 Initialise GLEW. More...
 
void gVirtualXRay::initializeGLEW ()
 Initialize GLEW. More...
 
void gVirtualXRay::checkOpenGLErrorStatus (const char *aFileName, const char *aFunctionName, int aLineNumber)
 Check OpenGL's error status. More...
 
void gVirtualXRay::checkFBOErrorStatus (const char *aFileName, const char *aFunctionName, int aLineNumber)
 Check the current FBO's error status. More...
 
void gVirtualXRay::pushProjectionMatrix ()
 Add the current matrix to the projection matrix stack. More...
 
void gVirtualXRay::pushModelViewMatrix ()
 Add the current matrix to the model/view matrix stack. More...
 
void gVirtualXRay::pushFBO ()
 Add the current FBO binding to the FBO stack. More...
 
void gVirtualXRay::pushTexture1D ()
 Add the current 1D texture binding to the texture stack. More...
 
void gVirtualXRay::pushTexture2D ()
 Add the current 2D texture binding to the texture stack. More...
 
void gVirtualXRay::pushTextureRectangle ()
 Add the current rectangle texture binding to the texture stack. More...
 
void gVirtualXRay::pushTexture3D ()
 Add the current 3D texture binding to the texture stack. More...
 
void gVirtualXRay::pushEnableDisableState (int aParameter)
 Add the enable/disable state to the corresponding stack. More...
 
void gVirtualXRay::pushShaderProgram ()
 Add the current shader program to the corresponding stack. More...
 
void gVirtualXRay::popProjectionMatrix ()
 
void gVirtualXRay::popModelViewMatrix ()
 
void gVirtualXRay::popFBO ()
 
void gVirtualXRay::popTexture ()
 
void gVirtualXRay::popEnableDisableState ()
 
void gVirtualXRay::popShaderProgram ()
 
gVirtualXRay::Matrix4x4< float > gVirtualXRay::getCurrentOpenGLMatrix ()
 Load the current OpenGL matrix. More...
 
void gVirtualXRay::loadIdentityProjectionMatrix ()
 Replace the projection matrix by the identity matrix. More...
 
void gVirtualXRay::loadIdentityModelViewMatrix ()
 Replace the model/view matrix by the identity matrix. More...
 
void gVirtualXRay::loadFrustumProjectionMatrix (double left, double right, double bottom, double top, double near, double far)
 Replace the projection matrix by a perspective projection matrix. More...
 
void gVirtualXRay::loadPerspectiveProjectionMatrix (double fovy, double aspect, double zNear, double zFar)
 Replace the projection matrix by a perspective projection matrix. More...
 
void gVirtualXRay::loadOrthoProjectionMatrix (double left, double right, double bottom, double top, double near, double far)
 Replace the projection matrix by a orthographic projection matrix. More...
 
MATRIX4 gVirtualXRay::buildOrthoProjectionMatrix (double left, double right, double bottom, double top, double near, double far)
 Create a orthographic projection matrix. More...
 
MATRIX4 gVirtualXRay::buildFrustumProjectionMatrix (double left, double right, double bottom, double top, double near, double far)
 Create a perspective projection matrix. More...
 
MATRIX4 gVirtualXRay::buildPerspectiveProjectionMatrix (double fovy, double aspect, double zNear, double zFar)
 Create a perspective projection matrix. More...
 
void gVirtualXRay::loadLookAtModelViewMatrix (const VEC3 &eye, const VEC3 &centre, const VEC3 &up)
 Replace the modelling-viewing matrix by a viewing transformation matrix. More...
 
void gVirtualXRay::loadLookAtModelViewMatrix (double eyeX, double eyeY, double eyeZ, double centreX, double centreY, double centreZ, double upX, double upY, double upZ)
 Replace the modelling-viewing matrix by a viewing transformation matrix. More...
 
MATRIX4 gVirtualXRay::buildLookAtModelViewMatrix (const VEC3 &eye, const VEC3 &centre, const VEC3 &up)
 Create a modelling-viewing matrix. More...
 
MATRIX4 gVirtualXRay::buildLookAtModelViewMatrix (double eyeX, double eyeY, double eyeZ, double centreX, double centreY, double centreZ, double upX, double upY, double upZ)
 Create a modelling-viewing matrix. More...
 
void gVirtualXRay::loadProjectionMatrixFromOpenGL ()
 Replace the projection matrix by OpenGL's projection matrix. More...
 
void gVirtualXRay::loadModelViewMatrixFromOpenGL ()
 Replace the modelling-viewing matrix by OpenGL's modelling-viewing matrix. More...
 
void gVirtualXRay::applyModelViewMatrix ()
 
bool gVirtualXRay::useOpenGL45 ()
 Check if OpenGL 4.5 is supported by the current OpenGL context. More...
 
bool gVirtualXRay::useOpenGL32 ()
 Check if OpenGL 3.2 is supported by the current OpenGL context. More...
 
bool gVirtualXRay::useOpenGLCompute ()
 Check if OpenGL Compute Shaders are supported by the current OpenGL context. More...
 
VBO * gVirtualXRay::createVBO ()
 Create an OpenGL VBO suitable for the current OpenGL context. More...
 
OpenGL2VBO * gVirtualXRay::createOpenGL2VBO ()
 Create an OpenGL 2.x VBO. More...
 
OpenGL3VBO * gVirtualXRay::createOpenGL3VBO ()
 Create an OpenGL 3.x or 4.x VBO. More...
 
std::string gVirtualXRay::getShaderTypeID (const std::type_info &aTypeID)
 
std::string gVirtualXRay::getShaderImageType (const std::type_info &aTypeID)
 
std::string gVirtualXRay::getShaderPixelType (const std::type_info &aTypeID)
 
std::string gVirtualXRay::getShaderRGBAPixelType (const std::type_info &aTypeID)
 

Variables

std::vector< MATRIX4 > gVirtualXRay::g_p_modelview_matrix_stack
 The stack of model/view matrices. More...
 
std::vector< MATRIX4 > gVirtualXRay::g_p_projection_matrix_stack
 The stack of projection matrix. More...
 
MATRIX4 gVirtualXRay::g_current_modelview_matrix
 The model/view matrices. More...
 
MATRIX4 gVirtualXRay::g_current_projection_matrix
 The projection matrix. More...
 
std::vector< int > gVirtualXRay::g_frame_buffer_object_stack
 The stack of FBO binding. More...
 
std::vector< std::pair< int, int > > gVirtualXRay::g_texture_stack
 The stack of texture binding. More...
 
std::vector< std::pair< int, bool > > gVirtualXRay::g_enable_disable_state_stack
 The stack of enable/disable states. More...
 
std::vector< int > gVirtualXRay::g_shader_program_stack
 The stack of shader programs. More...
 

Detailed Description

Some utility functions about OpenGL. Now supports GLSL450 and OpenGL 4.5.

Version
1.0
Date
25/02/2020
Author
Dr Franck P. Vidal

License BSD 3-Clause License.

For details on use and redistribution please refer to http://opensource.org/licenses/BSD-3-Clause

Copyright (c) by Dr Franck P. Vidal (franc.nosp@m.k.p..nosp@m.vidal.nosp@m.@fpv.nosp@m.idal..nosp@m.net), http://www.fpvidal.net/, Feb 2020, 2020, version 1.0, BSD 3-Clause License

Definition in file OpenGLUtilities.h.