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 below is stated separately rather than derived from these.

◆ 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, which OpenGL ES provides from 3.1 onward, so the session takes the stated physical size as given on the ES 3.0 contexts it targets and cannot detect a mismatch. The session renders through a framebuffer at that size, and a texture smaller than the framebuffer clips or garbles output, so the caller guarantees this relationship.


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