sphore 0.0.1
SPH openGL rendering engine

src/data-lines-dl.c File Reference

Code for managing data that is to be rendered as lines. More...

#include "data-lines.h"
#include <GL/gl.h>
#include <stdlib.h>

Data Structures

struct  _data_lines
 The internal storage for data to be rendered as lines. More...

Functions

data_lines_tdata_lines_create (unsigned int n, float *x, float *y, float *z, float *colour)
 Creates a new data object.
void data_lines_destroy (data_lines_t *data)
 Frees the memory associated with the given data_lines.
void data_lines_render (data_lines_t *ds)
void data_lines_set_colour (data_lines_t *ds, float *colour)

Detailed Description

Code for managing data that is to be rendered as lines.


Function Documentation

data_lines_t* data_lines_create ( unsigned int  n,
float *  x,
float *  y,
float *  z,
float *  colour 
)

Creates a new data object.

Makes a copy of the data to the video card, so your original copy can be destroyed.

Parameters:
[in]nthe number of control points.
[in]xthe x coordinantes of the points.
[in]ythe y coordinantes of the points.
[in]zthe z coordinantes of the points.
Returns:
A pointer to the new data object.
void data_lines_destroy ( data_lines_t ds)

Frees the memory associated with the given data_lines.

Parameters:
[in]dsthe data to be destroyed.
void data_lines_render ( data_lines_t data)

Renders the give lines.

void data_lines_set_colour ( data_lines_t ds,
float *  colour 
)

Sets the colour of the given data lines.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines