MLX42 1.0
MLX42
Loading...
Searching...
No Matches
mlx_ctx Struct Reference

#include <MLX42_Int.h>

Collaboration diagram for mlx_ctx:
Collaboration graph

Data Fields

GLuint vao
 
GLuint vbo
 
GLuint shaderprogram
 
int32_t initialWidth
 
int32_t initialHeight
 
mlx_list_thooks
 
mlx_list_timages
 
mlx_list_trender_queue
 
mlx_scroll_t scroll_hook
 
mlx_mouse_t mouse_hook
 
mlx_cursor_t cursor_hook
 
mlx_key_t key_hook
 
mlx_resize_t resize_hook
 
mlx_close_t close_hook
 
int32_t zdepth
 
int32_t bound_textures [16]
 
int32_t batch_size
 
vertex_t batch_vertices [MLX_BATCH_SIZE]
 

Detailed Description

For rendering we need to store most of OpenGL's stuff such as the vertex array object, vertex buffer object & the shader program as well as hooks and the zdepth level.

Additionally we represent draw calls with a linked list queue that points to the image and the index of its instance. Again, instances only carry XYZ data, so coupled with the image it lets us know where to draw a copy of the image.

Texture contexts are kept in a struct alongside the capacity of the array of instances, since the array is realloced like a vector.

Definition at line 172 of file MLX42_Int.h.

Field Documentation

◆ batch_size

int32_t mlx_ctx::batch_size

Definition at line 194 of file MLX42_Int.h.

◆ batch_vertices

vertex_t mlx_ctx::batch_vertices[MLX_BATCH_SIZE]

Definition at line 195 of file MLX42_Int.h.

◆ bound_textures

int32_t mlx_ctx::bound_textures[16]

Definition at line 193 of file MLX42_Int.h.

◆ close_hook

mlx_close_t mlx_ctx::close_hook

Definition at line 190 of file MLX42_Int.h.

◆ cursor_hook

mlx_cursor_t mlx_ctx::cursor_hook

Definition at line 187 of file MLX42_Int.h.

◆ hooks

mlx_list_t* mlx_ctx::hooks

Definition at line 181 of file MLX42_Int.h.

◆ images

mlx_list_t* mlx_ctx::images

Definition at line 182 of file MLX42_Int.h.

◆ initialHeight

int32_t mlx_ctx::initialHeight

Definition at line 179 of file MLX42_Int.h.

◆ initialWidth

int32_t mlx_ctx::initialWidth

Definition at line 178 of file MLX42_Int.h.

◆ key_hook

mlx_key_t mlx_ctx::key_hook

Definition at line 188 of file MLX42_Int.h.

◆ mouse_hook

mlx_mouse_t mlx_ctx::mouse_hook

Definition at line 186 of file MLX42_Int.h.

◆ render_queue

mlx_list_t* mlx_ctx::render_queue

Definition at line 183 of file MLX42_Int.h.

◆ resize_hook

mlx_resize_t mlx_ctx::resize_hook

Definition at line 189 of file MLX42_Int.h.

◆ scroll_hook

mlx_scroll_t mlx_ctx::scroll_hook

Definition at line 185 of file MLX42_Int.h.

◆ shaderprogram

GLuint mlx_ctx::shaderprogram

Definition at line 176 of file MLX42_Int.h.

◆ vao

GLuint mlx_ctx::vao

Definition at line 174 of file MLX42_Int.h.

◆ vbo

GLuint mlx_ctx::vbo

Definition at line 175 of file MLX42_Int.h.

◆ zdepth

int32_t mlx_ctx::zdepth

Definition at line 192 of file MLX42_Int.h.


The documentation for this struct was generated from the following file: