Graphite  Version 3
An experimental 3D geometry processing program
GL.h File Reference

Some utility functions for OpenGL graphics. More...

#include <geogram_gfx/basic/common.h>
#include <geogram_gfx/api/defs.h>
#include <geogram_gfx/third_party/glad/glad.h>
#include <geogram_gfx/GLUP/GLUP.h>
#include <geogram/basic/geometry.h>

Go to the source code of this file.

Namespaces

 GEO
 Global Vorpaline namespace.
 

Macros

#define GEO_GL_TEXTURE_3D
 
#define GEO_GL_150
 
#define GEO_GL_440
 
#define GEO_GL_ES2
 
#define GEO_CHECK_GL()
 Tests for OpenGL errors. More...
 

Functions

void GEO::GL::initialize ()
 Initializes some GL functions and objects. More...
 
void GEO::GL::terminate ()
 Terminates GL functions and objects. More...
 
void GEO::glupVertex (const vec2 &v)
 Sends a vertex to OpenGL. More...
 
void GEO::glupColor (const vec3 &v)
 Sends a RGB color to OpenGL. More...
 
void GEO::glupTexCoord (const vec2 &v)
 Sends 2d texture coordinates to OpenGL. More...
 
void GEO::glupTranslate (const vec3 &v)
 Applies a translation. More...
 
void GEO::glupMapTexCoords1d (double minval, double maxval, index_t mult=1)
 Maps texture coordinates from a specified interval to the unit interval. More...
 
void GEO::glupMultMatrix (const mat4 &m)
 Multiplies the current GLUP matrix with another one. More...
 
void GEO::glupLoadMatrix (const mat4 &m)
 Replaces the current GLUP matrix with a user defined one. More...
 
GLint64 GEO::get_size_of_bound_buffer_object (GLenum target)
 Gets the size (in bytes) of the OpenGL buffer bound to a specified target. More...
 
void GEO::update_buffer_object (GLuint &buffer_id, GLenum target, size_t new_size, const void *data)
 Updates the content of an OpenGL buffer object, and resizes it if need be. More...
 
void GEO::stream_buffer_object (GLuint &buffer_id, GLenum target, size_t new_size, const void *data)
 Updates the content of an OpenGL buffer object in streaming mode. More...
 
void GEO::update_or_check_buffer_object (GLuint &buffer_id, GLenum target, size_t new_size, const void *data, bool update)
 Updates the content of an OpenGL buffer object, and resizes it if need be, or tests whether it has the size it should have. More...
 
void GEO::check_gl (const char *file, int line, bool warning_only=false)
 Tests for OpenGL errors and displays a message if OpenGL errors were encountered. More...
 
void GEO::clear_gl_error_flags (const char *file, int line)
 Clears all error flags set by previous OpenGL calls. More...
 
void GEO::draw_unit_textured_quad (bool BW=false)
 Draws a textured quad. More...
 
void GEO::glTexImage2Dxpm (char const *const *xpm_data)
 

Detailed Description

Some utility functions for OpenGL graphics.

Definition in file GL.h.

Macro Definition Documentation

◆ GEO_CHECK_GL

#define GEO_CHECK_GL ( )

Tests for OpenGL errors.

If an OpenGL error was flagged, display it together with current file and line number.

Definition at line 365 of file GL.h.

Function Documentation

◆ initialize()

void GEO::GL::initialize ( )

Initializes some GL functions and objects.

Called by GEO::Graphics::initialize()

◆ terminate()

void GEO::GL::terminate ( )

Terminates GL functions and objects.

Called by GEO::Graphics::terminate()