CG_Labs 2026.1
Loading...
Searching...
No Matches
opengl.cpp File Reference
#include "Log.h"
#include "opengl.hpp"
#include "various.hpp"
#include <cassert>
#include <cstring>
#include <iostream>
#include <memory>
#include <sstream>

Namespaces

namespace  utils
namespace  utils::opengl
namespace  utils::opengl::debug
namespace  utils::opengl::shader
namespace  utils::opengl::fullscreen

Functions

bool utils::opengl::debug::isSupported ()
std::string utils::opengl::debug::getStringForType (GLenum type)
std::string utils::opengl::debug::getStringForSource (GLenum source)
std::string utils::opengl::debug::getStringForSeverity (GLenum severity)
void utils::opengl::debug::beginDebugGroup (std::string const &message, GLuint id=0u)
 Start a new debug group.
void utils::opengl::debug::endDebugGroup ()
 End the most recently-started debug group.
void utils::opengl::debug::nameObject (GLenum type, GLuint id, std::string const &label)
 Label an OpenGL object with a custon string.
void utils::opengl::debug::opengl_error_callback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei, GLchar const *msg, void const *)
bool utils::opengl::shader::source_and_build_shader (GLuint id, std::string const &source)
GLuint utils::opengl::shader::generate_shader (GLenum type, std::string const &source)
bool utils::opengl::shader::link_program (GLuint id)
void utils::opengl::shader::reload_program (GLuint id, std::vector< GLuint > const &ids, std::vector< std::string > const &sources)
GLuint utils::opengl::shader::generate_program (std::vector< GLuint > const &shaders_id)
void utils::opengl::fullscreen::init (std::string const &vs_path, std::string const &fs_path, size_t width, size_t height)
void utils::opengl::fullscreen::deinit ()
GLuint utils::opengl::fullscreen::get_texture_id ()
void utils::opengl::fullscreen::draw ()

Variables

static auto utils::opengl::fullscreen::vao_id = GLuint(0u)
static auto utils::opengl::fullscreen::vbo_id = GLuint(0u)
static auto utils::opengl::fullscreen::program_id = GLuint(0u)
static auto utils::opengl::fullscreen::texture_id = GLuint(0u)