63 GLuint internal, GLuint fmt, GLuint type,
void * texture_map_pbo(GLuint pbo_id, size_t size_bytes)
Maps a PBO for writing.
Definition texture.c:104
GLuint texture_upload_hdr_from_pbo(GLuint pbo_id, void *ptr, int width, int height, GLuint reuse_tex_id, GLuint internal, GLuint fmt, GLuint type, bool is_compressed, GLsizei pbo_size)
Finalizes HDR upload from a PBO (Unmap -> Upload -> Mipmaps).
Definition texture.c:257
float * texture_load_pixels(const char *path, int *width, int *height, int *channels)
Decodes an HDR image into RAM without uploading to GPU.
Definition texture.c:21
void texture_ensure_pbo(GLuint *pbo_id, GLsizeiptr *current_size, GLsizeiptr required_size)
Ensures a PBO is allocated with sufficient size.
Definition texture.c:76
GLuint texture_load_rgba_png(const char *path)
Loads a PNG image from disk and creates an OpenGL RGBA texture.
Definition texture.c:340
GLuint texture_preallocate_hdr(int width, int height, GLuint old_tex)
Pre-allocates VRAM for an HDR texture (glTexStorage2D only).
Definition texture.c:159
void texture_generate_hdr_mipmap(GLuint tex)
Generates mipmaps for an HDR texture.
Definition texture.c:329