OpenGL wrapper classes.
More...
|
| | FF |
| | Functionality for mimicking fixed function with shaders easily.
|
| |
|
|
using | GLenum = unsigned int |
| |
|
using | GLuint = unsigned int |
| |
|
using | Program_UP = std::unique_ptr< Program > |
| |
|
using | Program_SP = std::shared_ptr< Program > |
| |
|
using | Texture_UP = std::unique_ptr< Texture > |
| |
|
using | Texture_SP = std::shared_ptr< Texture > |
| |
|
using | VBO_UP = std::unique_ptr< VBO > |
| |
|
using | VBO_SP = std::shared_ptr< VBO > |
| |
|
using | VAO_UP = std::unique_ptr< VAO > |
| |
|
using | VAO_SP = std::shared_ptr< VAO > |
| |
|
using | MeshPainter_UP = std::unique_ptr< MeshPainter > |
| |
|
using | MeshPainter_SP = std::shared_ptr< MeshPainter > |
| |
|
using | FBO_UP = std::unique_ptr< FBO > |
| |
|
using | FBO_SP = std::shared_ptr< FBO > |
| |
|
| enum | Normalize { DONT_NORMALIZE,
NORMALIZE
} |
| |
| enum | Usage { WRITE_ONCE_READ_MANY,
WRITE_MANY_READ_MANY,
WRITE_ONCE_READ_ONCE
} |
| | For VBO:s and the like.
|
| |
| enum | ImageFormat {
INVALID,
ImageFormat::Alpha8,
ImageFormat::Red8,
ImageFormat::RGB24,
ImageFormat::RGBA32,
ImageFormat::BGRA32,
ImageFormat::AlphaHF,
ImageFormat::RGBAHF,
ImageFormat::RGBAf
} |
| |
| enum | TexFilter { Nearest,
Linear,
Mipmapped,
TexFilter::DontCare
} |
| |
| enum | WrapMode { Repeat,
Mirror,
Clamp,
DontCare
} |
| |
◆ ImageFormat
| Enumerator |
|---|
| Alpha8 | One byte.
|
| Red8 | One byte.
|
| RGB24 | Three bytes.
|
| RGBA32 | Four bytes.
|
| BGRA32 | GL_BGRA - Four bytes.
|
| AlphaHF | 16-bit half-float, alpha channel only.
|
| RGBAHF | RGBA Half-float.
|
| RGBAf | 32bit float RGBA
|
◆ TexFilter
| Enumerator |
|---|
| DontCare | Best based on size.
|
◆ bind_imgui_painting()
| void gl::bind_imgui_painting |
( |
| ) |
|
Call this to use gl_lib to paint Dear ImGui. Call once at the start of your program. Will modify OmGui::GetIO().RenderDrawListsFn and OmGui::GetIO().Fonts->TexID Tested on MacOS and iOS
◆ compile_program()
| Program gl::compile_program |
( |
const std::string & |
vs, |
|
|
const std::string & |
fs, |
|
|
const std::string & |
debug_name |
|
) |
| |
Uses the same syntax for all OpenGL versions, including GL ES. VertexShader: vs_in/vs_out instead of attribute/varying. PixelShader: fs_in instead of varying, write to out_FragColor.
◆ load_uncompressed_pvr2_from_memory()
| Texture gl::load_uncompressed_pvr2_from_memory |
( |
const void * |
data, |
|
|
size_t |
num_bytes, |
|
|
TexParams |
params, |
|
|
std::string |
debug_name |
|
) |
| |
Assumes legacy PVR (version 2). Returns a default texture (has_data() == false) if the given memory does not contain an uncompressed PVR.