Brenta Engine 1.2
Loading...
Searching...
No Matches
brenta::Gl Class Reference
Inheritance diagram for brenta::Gl:
brenta::Subsystem

Data Structures

class  Builder
 
struct  Config
 

Public Types

enum  Type {
  Byte = GL_BYTE , UnsignedByte = GL_UNSIGNED_BYTE , Short = GL_SHORT , UnsignedShort = GL_UNSIGNED_SHORT ,
  Int = GL_INT , UnsignedInt = GL_UNSIGNED_INT , Float = GL_FLOAT
}
 
- Public Types inherited from brenta::Subsystem
using Error = std::string
 

Public Member Functions

std::expected< void, Subsystem::Error > initialize () override
 
std::expected< void, Subsystem::Error > terminate () override
 
std::string name () override
 
bool is_initialized () override
 

Static Public Member Functions

static Glinstance ()
 
static int get_num_channels (GLenum color_format)
 
static int get_bytes_per_channel (GLenum type)
 
static void set_poligon_mode (GLboolean enable)
 
static void set_viewport (int x, int y, int width, int height)
 
static void set_color (const Color &color)
 
static void draw_arrays (GLenum mode, int first, int count)
 
static void draw_elements (GLenum mode, int count, GLenum type, const void *indices)
 
static void clear ()
 
static GLenum _check_error (const char *file, int line)
 

Static Public Attributes

static const GLboolean True = GL_TRUE
 
static const GLboolean False = GL_FALSE
 
static const std::string subsystem_name = "gl"
 

Detailed Description

Definition at line 31 of file gl.hpp.

Member Enumeration Documentation

◆ Type

enum brenta::Gl::Type

Definition at line 41 of file gl.hpp.

Member Function Documentation

◆ _check_error()

GLenum Gl::_check_error ( const char *  file,
int  line 
)
static

Definition at line 239 of file gl.cpp.

◆ clear()

void Gl::clear ( )
static

Definition at line 233 of file gl.cpp.

◆ draw_arrays()

void Gl::draw_arrays ( GLenum  mode,
int  first,
int  count 
)
static

Definition at line 221 of file gl.cpp.

◆ draw_elements()

void Gl::draw_elements ( GLenum  mode,
int  count,
GLenum  type,
const void *  indices 
)
static

Definition at line 227 of file gl.cpp.

◆ get_bytes_per_channel()

int Gl::get_bytes_per_channel ( GLenum  type)
static

Definition at line 178 of file gl.cpp.

◆ get_num_channels()

int Gl::get_num_channels ( GLenum  color_format)
static

Definition at line 146 of file gl.cpp.

◆ initialize()

std::expected< void, Subsystem::Error > Gl::initialize ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 37 of file gl.cpp.

◆ instance()

Gl & Gl::instance ( )
static

Definition at line 140 of file gl.cpp.

◆ is_initialized()

bool Gl::is_initialized ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 116 of file gl.cpp.

◆ name()

std::string Gl::name ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 111 of file gl.cpp.

◆ set_color()

void Gl::set_color ( const Color color)
static

Definition at line 215 of file gl.cpp.

◆ set_poligon_mode()

void Gl::set_poligon_mode ( GLboolean  enable)
static

Definition at line 125 of file gl.cpp.

◆ set_viewport()

void Gl::set_viewport ( int  x,
int  y,
int  width,
int  height 
)
static

Definition at line 209 of file gl.cpp.

◆ terminate()

std::expected< void, Subsystem::Error > Gl::terminate ( )
overridevirtual

Implements brenta::Subsystem.

Definition at line 102 of file gl.cpp.

Field Documentation

◆ False

const GLboolean Gl::False = GL_FALSE
static

Definition at line 39 of file gl.hpp.

◆ subsystem_name

const std::string Gl::subsystem_name = "gl"
static

Definition at line 52 of file gl.hpp.

◆ True

const GLboolean Gl::True = GL_TRUE
static

Definition at line 38 of file gl.hpp.


The documentation for this class was generated from the following files: