vgl 1.0.0
Virtual Globe Library: API reference
Loading...
Searching...
No Matches
vgl_gl_draw_info Struct Reference

#include <vgl/gl.h>

Public Attributes

uint32_t struct_size
 
vgl_bool mirrored
 
const vgl_dmat4 * view_matrix
 
const vgl_dmat4 * projection_matrix
 
vgl_dvec3 sun_direction
 
double logarithmic_far
 
uint64_t upload_budget
 
vgl_draw_features features
 
vgl_debug_views debug_views
 
double earth_rotation_angle
 
double contour_interval
 
double cloud_height
 

Detailed Description

Parameters of a draw. Zero-initialize, set struct_size, then fill in.

Member Data Documentation

◆ struct_size

uint32_t vgl_gl_draw_info::struct_size

◆ mirrored

vgl_bool vgl_gl_draw_info::mirrored

VGL_TRUE when the projection mirrors the image, as a projection with a flipped y axis for rendering into a texture does. Triangles then face the other way, and the backend culls the other side.

◆ view_matrix

const vgl_dmat4* vgl_gl_draw_info::view_matrix

Optional. The camera to draw from, when it differs from the view of the last update (vgl_frame_begin_info.view_matrix). Null uses the context's view.

◆ projection_matrix

const vgl_dmat4* vgl_gl_draw_info::projection_matrix

Optional. From camera space to clip space, with OpenGL's depth from -1 to 1 for the logarithmic and conventional conventions, and from 0 to 1 for reversed-Z, which the backend sets with clip control (docs/render-interface.md, section 8). Null uses the context's view.

◆ sun_direction

vgl_dvec3 vgl_gl_draw_info::sun_direction

Direction towards the sun, along the ECEF axes; it need not be normalized. Zero lights the terrain from the camera.

◆ logarithmic_far

double vgl_gl_draw_info::logarithmic_far

The logarithmic convention's far distance, in metres: the camera distance that maps to depth 1. 0 selects VGL_LOGARITHMIC_DEPTH_FAR_DEFAULT. Ignored by the other conventions.

◆ upload_budget

uint64_t vgl_gl_draw_info::upload_budget

Bytes of resources to upload in this draw (vgl_frame_begin_info.upload_budget). 0 selects VGL_UPLOAD_BUDGET_DEFAULT.

◆ features

vgl_draw_features vgl_gl_draw_info::features

What to draw besides the terrain and its imagery: vgl_draw_feature values (vgl/render.h). 0 draws the terrain alone.

◆ debug_views

vgl_debug_views vgl_gl_draw_info::debug_views

Views for inspecting level of detail and loading: vgl_debug_view values (vgl/render.h). 0 draws normally.

◆ earth_rotation_angle

double vgl_gl_draw_info::earth_rotation_angle

The Earth rotation angle in radians (vgl_earth_rotation_angle_get), which turns the stars' celestial frame into ECEF, for VGL_DRAW_FEATURE_STARS.

◆ contour_interval

double vgl_gl_draw_info::contour_interval

Height between contour lines (VGL_DRAW_FEATURE_CONTOURS), in metres. 0 selects VGL_CONTOUR_INTERVAL_DEFAULT.

◆ cloud_height

double vgl_gl_draw_info::cloud_height

The cloud shell's height above the ellipsoid (VGL_DRAW_FEATURE_CLOUDS), in metres. 0 selects VGL_CLOUD_HEIGHT_DEFAULT.


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