Loading...
Searching...
No Matches
render.c File Reference

Nviz library – GLX context manipulation. More...

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

Go to the source code of this file.

## Functions

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

## 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.

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

Definition in file render.c.

## Function Documentation

## Nviz_create_render_window()

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

Create render window.

Parameters

  rwin | pointer to render_window struct
  display | display instance (NULL for offscreen) [unused]
  width | window width
  height | window height

Returns
  0 on success
  -1 on error

Definition at line 157 of file render.c.

References G_fatal_error(), G_warning(), and NULL.

## Nviz_destroy_render_window()

void Nviz_destroy_render_window | ( | struct render_window * | rwin | ) |

Free render window.

Parameters

  win | pointer to render_window struct

Definition at line 123 of file render.c.

References G_free().

## Nviz_init_render_window()

void Nviz_init_render_window | ( | struct render_window * | rwin | ) |

Initialize render window.

Parameters

  rwin | pointer to render_window struct

Definition at line 94 of file render.c.

References NULL.

## Nviz_make_current_render_window()

int Nviz_make_current_render_window | ( | const struct render_window * | rwin | ) |

Make window current for rendering.

Parameters

  rwin | pointer to render_window struct

Returns
  1 on success
  0 on failure

Definition at line 325 of file render.c.

References G_warning().

## Nviz_new_render_window()

struct render_window * Nviz_new_render_window | ( | void |  | ) |

Allocate memory for render window.

Returns
  pointer to render_window struct
  NULL on failure

Definition at line 79 of file render.c.