GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-d6dec75dd4
|
Nviz library – Draw map objects to GLX context. More...
#include <grass/nviz.h>
Go to the source code of this file.
Macros | |
#define | GL_CLAMP_TO_EDGE 0x812F |
Functions | |
int | Nviz_draw_all_surf (nv_data *dc) |
Draw all loaded surfaces. More... | |
int | Nviz_draw_all_vect (void) |
Draw all loaded vector sets (lines) More... | |
int | Nviz_draw_all_site (void) |
Draw all loaded vector point sets. More... | |
int | Nviz_draw_all_vol (void) |
Draw all loaded volume sets. More... | |
int | Nviz_draw_all (nv_data *data) |
Draw all map objects (in full resolution) and decorations. More... | |
int | Nviz_draw_quick (nv_data *data, int draw_mode) |
Draw all surfaces in wireframe (quick mode) More... | |
int | Nviz_load_image (GLubyte *image_data, int width, int height, int alpha) |
Load image into texture. More... | |
void | Nviz_set_2D (int width, int height) |
Set ortho view for drawing images. More... | |
void | Nviz_draw_image (int x, int y, int width, int height, int texture_id) |
Draw image as texture. More... | |
void | Nviz_del_texture (int texture_id) |
Delete texture. More... | |
void | Nviz_get_max_texture (int *size) |
Get maximum texture size. More... | |
Nviz library – Draw map objects to GLX context.
Based on visualization/nviz/src/draw.c and visualization/nviz/src/togl_flythrough.c
(C) 2008, 2010-2011 by the GRASS Development Team This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file nviz/draw.c.
#define GL_CLAMP_TO_EDGE 0x812F |
Definition at line 20 of file nviz/draw.c.
void Nviz_del_texture | ( | int | texture_id | ) |
Delete texture.
texture_id | texture id |
Definition at line 408 of file nviz/draw.c.
References t.
int Nviz_draw_all | ( | nv_data * | data | ) |
Draw all map objects (in full resolution) and decorations.
data | nviz data |
Definition at line 204 of file nviz/draw.c.
int Nviz_draw_all_site | ( | void | ) |
Draw all loaded vector point sets.
Definition at line 146 of file nviz/draw.c.
References G_free(), GP_draw_site(), GP_get_site_list(), GS_done_draw(), GS_ready_draw(), GS_set_draw(), GSD_BACK, and GSD_BOTH.
int Nviz_draw_all_surf | ( | nv_data * | dc | ) |
Draw all loaded surfaces.
dc | nviz data |
Definition at line 32 of file nviz/draw.c.
References GS_get_surf_list(), nv_data::light, MAX_SURFS, light_data::x, x, light_data::y, and light_data::z.
int Nviz_draw_all_vect | ( | void | ) |
Draw all loaded vector sets (lines)
Definition at line 121 of file nviz/draw.c.
References GS_done_draw(), GS_ready_draw(), GS_set_draw(), GSD_BACK, GSD_BOTH, and GV_alldraw_vect().
int Nviz_draw_all_vol | ( | void | ) |
Draw all loaded volume sets.
Definition at line 175 of file nviz/draw.c.
References G_free(), GS_done_draw(), GS_ready_draw(), GS_set_draw(), GSD_BACK, GSD_BOTH, GVL_draw_vol(), and GVL_get_vol_list().
void Nviz_draw_image | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
int | texture_id | ||
) |
Draw image as texture.
x,y | image coordinates |
width,height | image size |
texture_id | texture id |
Definition at line 379 of file nviz/draw.c.
int Nviz_draw_quick | ( | nv_data * | data, |
int | draw_mode | ||
) |
Draw all surfaces in wireframe (quick mode)
Draw modes:
data | nviz data |
draw_mode | draw mode |
Definition at line 281 of file nviz/draw.c.
void Nviz_get_max_texture | ( | int * | size | ) |
Get maximum texture size.
Definition at line 420 of file nviz/draw.c.
References scalebar_data::size.
int Nviz_load_image | ( | GLubyte * | image_data, |
int | width, | ||
int | height, | ||
int | alpha | ||
) |
Load image into texture.
image_data | image data |
width,height | image screen size |
alpha | has alpha channel |
Definition at line 318 of file nviz/draw.c.
void Nviz_set_2D | ( | int | width, |
int | height | ||
) |
Set ortho view for drawing images.
width,height | image screen size |
Definition at line 355 of file nviz/draw.c.