nngn
Loading...
Searching...
No Matches
utils.h File Reference
#include <string_view>
#include "os/platform.h"
#include "utils/log.h"
#include "utils/utils.h"
#include "opengl.h"
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nngn::GLDebugGroup
 RAII-based debug group manager. More...
 

Namespaces

namespace  nngn
 

Macros

#define LOG_RESULT(f, ...)   (f(__VA_ARGS__), nngn::gl_check_result(#f))
 
#define CHECK_RESULT(f, ...)    do { f(__VA_ARGS__); if(!nngn::gl_check_result(#f)) return false; } while(0)
 

Functions

const char * nngn::gl_strerror (GLenum error)
 
const char * nngn::gl_enum_str (GLenum e)
 
bool nngn::gl_check_result (const char *func_name)
 
bool nngn::gl_set_obj_name (GLenum type, GLuint obj, std::string_view name)
 

Variables

constexpr GLenum NNGN_GL_BUFFER = 0
 
constexpr GLenum NNGN_GL_PROGRAM = 0
 
constexpr GLenum NNGN_GL_SHADER = 0
 
constexpr GLenum NNGN_GL_VERTEX_ARRAY = 0
 

Macro Definition Documentation

◆ CHECK_RESULT

#define CHECK_RESULT (   f,
  ... 
)     do { f(__VA_ARGS__); if(!nngn::gl_check_result(#f)) return false; } while(0)

◆ LOG_RESULT

#define LOG_RESULT (   f,
  ... 
)    (f(__VA_ARGS__), nngn::gl_check_result(#f))

Variable Documentation

◆ NNGN_GL_BUFFER

constexpr GLenum NNGN_GL_BUFFER = 0
constexpr

◆ NNGN_GL_PROGRAM

constexpr GLenum NNGN_GL_PROGRAM = 0
constexpr

◆ NNGN_GL_SHADER

constexpr GLenum NNGN_GL_SHADER = 0
constexpr

◆ NNGN_GL_VERTEX_ARRAY

constexpr GLenum NNGN_GL_VERTEX_ARRAY = 0
constexpr