Helper functions to work with OpenGL 3.0+.
More...
#include "constants.h"
#include <glad/gl.h>
#include <glm/glm.hpp>
#include <cstdio>
#include <cstdlib>
Go to the source code of this file.
|
|
constexpr glm::vec3 | CSCI441::X_AXIS (1.0f, 0.0f, 0.0f) |
| | constant for positive X_AXIS
|
| |
|
constexpr glm::vec3 | CSCI441::Y_AXIS (0.0f, 1.0f, 0.0f) |
| | constant for positive Y_AXIS
|
| |
|
constexpr glm::vec3 | CSCI441::Z_AXIS (0.0f, 0.0f, 1.0f) |
| | constant for positive Z_AXIS
|
| |
|
constexpr glm::vec3 | CSCI441::X_AXIS_NEG (-1.0f, 0.0f, 0.0f) |
| | constant for negative X_AXIS
|
| |
|
constexpr glm::vec3 | CSCI441::Y_AXIS_NEG (0.0f, -1.0f, 0.0f) |
| | constant for negative Y_AXIS
|
| |
|
constexpr glm::vec3 | CSCI441::Z_AXIS_NEG (0.0f, 0.0f, -1.0f) |
| | constant for negative Z_AXIS
|
| |
|
void | CSCI441::OpenGLUtils::printOpenGLInfo () |
| | Prints information about our OpenGL context.
|
| |
|
void | CSCI441::OpenGLUtils::printOpenGLExtensions () |
| | Prints the list of available extensions.
|
| |
| void | CSCI441::OpenGLUtils::checkOpenGLErrors (const char *str="") |
| | Checks if there are any OpenGL errors, printing them if so, and clearing the error flag.
|
| |
| const char * | CSCI441::OpenGLUtils::openGLErrorMessage (GLenum err) |
| | Converts error value to string representation.
|
| |
| const char * | CSCI441::OpenGLUtils::debugSourceToString (GLenum source) |
| | Converts debug source value to string representation.
|
| |
| const char * | CSCI441::OpenGLUtils::debugTypeToString (GLenum type) |
| | Converts debug type value to string representation.
|
| |
| const char * | CSCI441::OpenGLUtils::debugSeverityToString (GLenum severity) |
| | Converts debug severity value to string representation.
|
| |
|
|
constexpr glm::vec3 | CSCI441::X_AXIS_POS = X_AXIS |
| | alias for constant for positive X_AXIS
|
| |
|
constexpr glm::vec3 | CSCI441::Y_AXIS_POS = Y_AXIS |
| | alias for constant for positive Y_AXIS
|
| |
|
constexpr glm::vec3 | CSCI441::Z_AXIS_POS = Z_AXIS |
| | alias for constant for positive Z_AXIS
|
| |
Helper functions to work with OpenGL 3.0+.
- Author
- Dr. Jeffrey Paone
- Copyright
- MIT License Copyright (c) 2017 Dr. Jeffrey Paone
These functions, classes, and constants help minimize common code that needs to be written.
- Warning
- NOTE: This header file depends upon GLAD (or alternatively GLEW)
-
NOTE: This header file depends upon glm
◆ checkOpenGLErrors()
| void CSCI441::OpenGLUtils::checkOpenGLErrors |
( |
const char * |
str = "" | ) |
|
|
inline |
Checks if there are any OpenGL errors, printing them if so, and clearing the error flag.
- Parameters
-
| str | optional string to display if errors do occur (useful to help determine which call to this function triggered the errors) |
◆ debugSeverityToString()
| const char * CSCI441::OpenGLUtils::debugSeverityToString |
( |
GLenum |
severity | ) |
|
|
inline |
Converts debug severity value to string representation.
- Parameters
-
- Returns
- severity of debug message
◆ debugSourceToString()
| const char * CSCI441::OpenGLUtils::debugSourceToString |
( |
GLenum |
source | ) |
|
|
inline |
Converts debug source value to string representation.
- Parameters
-
- Returns
- name of debug source
◆ debugTypeToString()
| const char * CSCI441::OpenGLUtils::debugTypeToString |
( |
GLenum |
type | ) |
|
|
inline |
Converts debug type value to string representation.
- Parameters
-
- Returns
- type of debug message
◆ openGLErrorMessage()
| const char * CSCI441::OpenGLUtils::openGLErrorMessage |
( |
GLenum |
err | ) |
|
|
inline |
Converts error value to string representation.
- Parameters
-
- Returns
- name of error