|
sphore 0.0.1
SPH openGL rendering engine
|
#include "offscreen.h"#include "warning.h"#include "sphore.h"#include "settings.h"#include <stdlib.h>#include <limits.h>#include <GL/gl.h>Data Structures | |
| struct | _offscreen |
Functions | |
| offscreen_t * | offscreen_create (unsigned int width, unsigned int height) |
| Creates an offscreen object with the sepcified dimensions. | |
| void | offscreen_destroy (offscreen_t *o) |
| Cleans up the memory accosiated with an offscreen object. | |
| void | offscreen_load_texture (offscreen_t *o) |
| unsigned int | get_next_power_2 (unsigned int x) |
| Returns a number that is the smallest power of two heigher that x. | |
| GLuint | offscreen_get_framebuffer (offscreen_t *o) |
| GLuint | offscreen_get_texture (offscreen_t *o) |
| Gets the OpenGL identifier for the texture that has been drawn to. | |
| GLint | offscreen_get_texture_location (offscreen_t *o) |
| Gets the location of the texture in the current glsl program. | |
| void | offscreen_set_texture_location (offscreen_t *o, GLint loc) |
| Sets the location of the texture in the current glsl program. | |
| void | offscreen_get_texture_size (offscreen_t *o, unsigned int *width, unsigned int *height) |
| unsigned int get_next_power_2 | ( | unsigned int | x | ) |
Returns a number that is the smallest power of two heigher that x.
| [in] | x | The number that the return value must be equall to or higher than. |
| offscreen_t* offscreen_create | ( | unsigned int | width, |
| unsigned int | height | ||
| ) |
Creates an offscreen object with the sepcified dimensions.
| [in] | width | The width of the offscreen object in pixels. |
| [in] | height | The height of the offscreen object in pixels. |
| void offscreen_destroy | ( | offscreen_t * | o | ) |
Cleans up the memory accosiated with an offscreen object.
| [in] | o | The object to be destroyed. |
| GLuint offscreen_get_framebuffer | ( | offscreen_t * | o | ) |
| GLuint offscreen_get_texture | ( | offscreen_t * | o | ) |
Gets the OpenGL identifier for the texture that has been drawn to.
| [in] | o | The object for which we want the texture. |
| GLint offscreen_get_texture_location | ( | offscreen_t * | o | ) |
Gets the location of the texture in the current glsl program.
| [in] | o | The offscreen object to query. |
| void offscreen_get_texture_size | ( | offscreen_t * | o, |
| unsigned int * | width, | ||
| unsigned int * | height | ||
| ) |
Returns the size of the offscreen object in pixels.
| [in] | o | The object to query. |
| [out] | width | Gets set to the width of the object in pixels. |
| [out] | height | Gets set to the height of the object in pixels. |
| void offscreen_load_texture | ( | offscreen_t * | o | ) |
| void offscreen_set_texture_location | ( | offscreen_t * | o, |
| GLint | loc | ||
| ) |
Sets the location of the texture in the current glsl program.
| [in] | o | The offscreen object to modify. |
| [in] | loc | The new location identifier. |