sphore 0.0.1
SPH openGL rendering engine
|
00001 /******************************************************************** 00002 * sphore - SPH Opengl Rendering Engine 00003 * 00004 * This file is (or was) part of sphore. 00005 * sphore comes with ABSOLUTELY NO WARRANTY. 00006 * This is free software; and you are welcome to redistribute 00007 * it under the terms of the GNU General Public License 00008 * (see LICENSE file for details) and the provision that 00009 * this notice remains intact. If you modify this file, please 00010 * note section 2a) of the GPLv2 states that: 00011 * 00012 * a) You must cause the modified files to carry prominent notices 00013 * stating that you changed the files and the date of any change. 00014 * 00015 * Copyright (C) 2011 James Wetter. All rights reserved. 00016 * Contact: wetter.j@gmail.com 00017 * 00018 ********************************************************************/ 00019 00028 #ifndef H_OFFSCREEN_H 00029 #define H_OFFSCREEN_H 00030 #include <GL/gl.h> 00031 00035 typedef struct _offscreen offscreen_t; 00036 00045 offscreen_t *offscreen_create (unsigned int width, unsigned int height); 00046 00052 void offscreen_destroy (offscreen_t * o); 00053 00061 unsigned int get_next_power_2 (unsigned int x); 00062 00070 GLuint offscreen_get_texture (offscreen_t * o); 00071 00079 GLint offscreen_get_texture_location (offscreen_t * o); 00080 00087 void offscreen_set_texture_location (offscreen_t * o, GLint loc); 00088 00089 void offscreen_load_texture (offscreen_t * o); 00090 00098 void offscreen_get_texture_size (offscreen_t * o, unsigned int *width, 00099 unsigned int *height); 00100 00106 void offscreen_start (offscreen_t * o); 00107 00113 void offscreen_stop (offscreen_t * o); 00114 #endif