class opengl

Declaration

class opengl : public api { /* full declaration omitted */ };

Declared at: include/ekg/os/ekg_opengl.hpp:42

Inherits from: api

Member Variables

protected std::vector<ekg::gpu::sampler_t*> bound_sampler_list = {}
protected std::string_view glsl_version = {}
protected int32_t uniform_active_texture = {}
protected int32_t uniform_active_tex_slot = {}
protected int32_t uniform_content = {}
protected int32_t uniform_rect = {}
protected int32_t uniform_line_thickness = {}
protected int32_t uniform_scissor = {}
protected int32_t uniform_viewport_height = {}
protected int32_t uniform_projection = {}
protected uint32_t geometry_buffer = {}
protected uint32_t vbo_array = {}
protected uint32_t ebo_simple_shape = {}
protected uint32_t pipeline_program = {}
protected uint8_t protected_texture_active_index = {}

Inherited from api:

protected rendering_shader_fragment_source = {}
public static projection
public static viewport

Method Overview

  • public uint64_t allocate_sampler(const ekg::gpu::sampler_allocate_info * p_sampler_allocate_info, ekg::gpu::sampler_t * p_sampler)
  • public uint64_t bind_sampler(ekg::gpu::sampler_t * p_sampler)
  • public bool create_pipeline_program(uint32_t & program, const std::unordered_map<std::string_view, uint32_t> & resources)
  • public void draw(ekg::gpu::data_t * p_gpu_data, uint64_t loaded_gpu_data_size)
  • public uint64_t fill_sampler(const ekg::gpu::sampler_fill_info * sampler_fill_info, ekg::gpu::sampler_t * p_sampler)
  • public uint64_t generate_font_atlas(ekg::gpu::sampler_t * p_sampler, ekg::draw::font_face_t * p_font_face_text, ekg::draw::font_face_t * p_font_face_emoji, int32_t atlas_width, int32_t atlas_height, std::vector<char32_t> & loaded_sampler_generate_list, std::unordered_map<char32_t, ekg::draw::glyph_char_t> & mapped_glyph_char_data, float & non_swizzlable_range)
  • public void init()
  • public void log_vendor_details()
  • public opengl(std::string_view set_glsl_version = "#version 450")
  • public void pre_re_alloc()
  • public void quit()
  • public void re_alloc_geometry_resources(const float * p_data, uint64_t size)
  • public void update_viewport(int32_t w, int32_t h)

Inherited from api:

Methods

uint64_t allocate_sampler(
    const ekg::gpu::sampler_allocate_info*
        p_sampler_allocate_info,
    ekg::gpu::sampler_t* p_sampler)

Declared at: include/ekg/os/ekg_opengl.hpp:87

Parameters

const ekg::gpu::sampler_allocate_info* p_sampler_allocate_info
ekg::gpu::sampler_t* p_sampler

uint64_t bind_sampler(
    ekg::gpu::sampler_t* p_sampler)

Declared at: include/ekg/os/ekg_opengl.hpp:108

Parameters

ekg::gpu::sampler_t* p_sampler

bool create_pipeline_program(
    uint32_t& program,
    const std::unordered_map<std::string_view,
                             uint32_t>& resources)

Declared at: include/ekg/os/ekg_opengl.hpp:62

Parameters

uint32_t& program
const std::unordered_map<std::string_view, uint32_t>& resources

void draw(ekg::gpu::data_t* p_gpu_data,
          uint64_t loaded_gpu_data_size)

Declared at: include/ekg/os/ekg_opengl.hpp:82

Parameters

ekg::gpu::data_t* p_gpu_data
uint64_t loaded_gpu_data_size

uint64_t fill_sampler(
    const ekg::gpu::sampler_fill_info*
        sampler_fill_info,
    ekg::gpu::sampler_t* p_sampler)

Declared at: include/ekg/os/ekg_opengl.hpp:92

Parameters

const ekg::gpu::sampler_fill_info* sampler_fill_info
ekg::gpu::sampler_t* p_sampler

uint64_t generate_font_atlas(
    ekg::gpu::sampler_t* p_sampler,
    ekg::draw::font_face_t* p_font_face_text,
    ekg::draw::font_face_t* p_font_face_emoji,
    int32_t atlas_width,
    int32_t atlas_height,
    std::vector<char32_t>&
        loaded_sampler_generate_list,
    std::unordered_map<char32_t,
                       ekg::draw::glyph_char_t>&
        mapped_glyph_char_data,
    float& non_swizzlable_range)

Declared at: include/ekg/os/ekg_opengl.hpp:97

Parameters

ekg::gpu::sampler_t* p_sampler
ekg::draw::font_face_t* p_font_face_text
ekg::draw::font_face_t* p_font_face_emoji
int32_t atlas_width
int32_t atlas_height
std::vector<char32_t>& loaded_sampler_generate_list
std::unordered_map<char32_t, ekg::draw::glyph_char_t>& mapped_glyph_char_data
float& non_swizzlable_range

void init()

Declared at: include/ekg/os/ekg_opengl.hpp:76

void log_vendor_details()

Declared at: include/ekg/os/ekg_opengl.hpp:74

opengl(std::string_view set_glsl_version =
           "#version 450")

Description

OpenGL API wrapper abstraction constructor; `set_glsl_version` must be 330 higher, if not, the version is auto-initialized as `450`. OpenGL ES 3 needs explicity set to the GLSL ES version.

Declared at: include/ekg/os/ekg_opengl.hpp:72

Parameters

std::string_view set_glsl_version = "#version 450"

void pre_re_alloc()

Declared at: include/ekg/os/ekg_opengl.hpp:78

void quit()

Declared at: include/ekg/os/ekg_opengl.hpp:77

void re_alloc_geometry_resources(
    const float* p_data,
    uint64_t size)

Declared at: include/ekg/os/ekg_opengl.hpp:80

Parameters

const float* p_data
uint64_t size

void update_viewport(int32_t w, int32_t h)

Declared at: include/ekg/os/ekg_opengl.hpp:79

Parameters

int32_t w
int32_t h