matf-rg-engine 1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
Loading...
Searching...
No Matches
Classes | Namespaces | Macros
OpenGL.hpp File Reference

Defines the OpenGL class that serves as the interface for OpenGL. More...

#include <cstdint>
#include <filesystem>
#include <engine/resources/Shader.hpp>
Include dependency graph for OpenGL.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  engine::graphics::OpenGL
 This class serves as the OpenGL interface for your app, since the engine doesn't directly link OpenGL to the app executable. More...
 

Namespaces

namespace  engine
 
namespace  engine::resources
 
namespace  engine::graphics
 

Macros

#define CHECKED_GL_CALL(func, ...)   engine::graphics::OpenGL::call(std::source_location::current(), func, __VA_ARGS__)
 Do an error-checked OpenGL call. Throws an OpenGL error if the call fails.
 

Detailed Description

Defines the OpenGL class that serves as the interface for OpenGL.

Macro Definition Documentation

◆ CHECKED_GL_CALL

#define CHECKED_GL_CALL (   func,
  ... 
)    engine::graphics::OpenGL::call(std::source_location::current(), func, __VA_ARGS__)

Do an error-checked OpenGL call. Throws an OpenGL error if the call fails.

Parameters
funcOpenGL function to call
...Function arguments

Example:

uint32_t texture_id = 0;
CHECKED_GL_CALL(glGenTextures, 1, &texture_id);
#define CHECKED_GL_CALL(func,...)
Do an error-checked OpenGL call. Throws an OpenGL error if the call fails.
Definition OpenGL.hpp:27