|
vgl 1.0.0
Virtual Globe Library: API 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 |
Parameters of a draw. Zero-initialize, set struct_size, then fill in.
| uint32_t vgl_gl_draw_info::struct_size |
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| double vgl_gl_draw_info::contour_interval |
Height between contour lines (VGL_DRAW_FEATURE_CONTOURS), in metres. 0 selects VGL_CONTOUR_INTERVAL_DEFAULT.
| 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.