MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
mln_opengl_borrowed_texture_descriptor Struct Reference

#include <texture.h>

Data Fields

mln_render_target_extent extent
 
uint32_t physical_width
 
uint32_t physical_height
 
mln_opengl_context_descriptor context
 
uint32_t texture
 
uint32_t target
 

Detailed Description

OpenGL caller-owned texture session attachment options.

Field Documentation

◆ context

mln_opengl_context_descriptor mln_opengl_borrowed_texture_descriptor::context

Borrowed OpenGL context provider data. The texture must belong to this context or a context in the same share group.

◆ extent

mln_render_target_extent mln_opengl_borrowed_texture_descriptor::extent

Logical texture extent. The map viewport uses width and height and the renderer uses scale_factor; the physical size is stated separately below.

◆ physical_height

uint32_t mln_opengl_borrowed_texture_descriptor::physical_height

Physical texture height in device pixels. Must be positive.

◆ physical_width

uint32_t mln_opengl_borrowed_texture_descriptor::physical_width

Physical texture width in device pixels. Must be positive.

◆ target

uint32_t mln_opengl_borrowed_texture_descriptor::target

OpenGL texture target. GL_TEXTURE_2D is the expected target.

◆ texture

uint32_t mln_opengl_borrowed_texture_descriptor::texture

Borrowed OpenGL texture object name. Required.

The texture's level-0 dimensions must equal physical_width and physical_height.

Querying texture dimensions needs glGetTexLevelParameteriv, absent before OpenGL ES 3.1, so the caller guarantees the stated physical size: the session renders through a framebuffer at that size, and a smaller texture clips or garbles output.


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