GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r73122
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
nviz/render.c File Reference

Nviz library – GLX context manipulation. More...

#include <grass/glocale.h>
#include <grass/nviz.h>
Include dependency graph for nviz/render.c:

Go to the source code of this file.


struct render_windowNviz_new_render_window (void)
 Allocate memory for render window. More...
void Nviz_init_render_window (struct render_window *rwin)
 Initialize render window. More...
void Nviz_destroy_render_window (struct render_window *rwin)
 Free render window. More...
int Nviz_create_render_window (struct render_window *rwin, void *display, int width, int height)
 Create render window. More...
int Nviz_make_current_render_window (const struct render_window *rwin)
 Make window current for rendering. More...

Detailed Description

Nviz library – GLX context manipulation.

Based on visualization/nviz/src/togl.c

(C) 2008, 2010, 2018 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.

Updated/modified by Martin Landa <landa.martin> (Google SoC 2008/2010)
Support for framebuffer objects by Huidae Cho <grass4u> (July 2018)

Definition in file nviz/render.c.

Function Documentation

int Nviz_create_render_window ( struct render_window rwin,
void *  display,
int  width,
int  height 

Create render window.

rwinpointer to render_window struct
displaydisplay instance (NULL for offscreen)
widthwindow width
heightwindow height
0 on success
-1 on error

Definition at line 144 of file nviz/render.c.

References _, G_fatal_error(), G_warning(), render_window::height, NULL, and render_window::width.

void Nviz_destroy_render_window ( struct render_window rwin)

Free render window.

winpointer to render_window struct

Definition at line 110 of file nviz/render.c.

References G_free().

void Nviz_init_render_window ( struct render_window rwin)

Initialize render window.

winpointer to render_window struct

Definition at line 81 of file nviz/render.c.

References render_window::height, NULL, and render_window::width.

int Nviz_make_current_render_window ( const struct render_window rwin)

Make window current for rendering.

winpointer to render_window struct
1 on success
0 on failure

Definition at line 299 of file nviz/render.c.

References _, G_warning(), render_window::height, and render_window::width.

struct render_window* Nviz_new_render_window ( void  )

Allocate memory for render window.

pointer to render_window struct
NULL on failure

Definition at line 66 of file nviz/render.c.