Open source remastering of the Freespace 2 engine
gropengltexture.h File Reference

Go to the source code of this file.


struct  tcache_slot_opengl


typedef struct tcache_slot_opengl tcache_slot_opengl


void opengl_switch_arb (int unit, int state)
void opengl_tcache_init ()
void opengl_free_texture_slot (int n)
void opengl_tcache_flush ()
void opengl_tcache_shutdown ()
void opengl_tcache_frame ()
void opengl_set_additive_tex_env ()
void opengl_set_modulate_tex_env ()
void opengl_preload_init ()
GLfloat opengl_get_max_anisotropy ()
void opengl_kill_render_target (int slot)
int opengl_make_render_target (int handle, int slot, int *w, int *h, ubyte *bpp, int *mm_lvl, int flags)
int opengl_set_render_target (int slot, int face=-1, int is_static=0)
void gr_opengl_get_bitmap_from_texture (void *data_out, int bitmap_num)
int opengl_get_texture (GLenum target, GLenum pixel_format, GLenum data_format, int num_mipmaps, int width, int height, int bytes_per_pixel, void *image_data, int offset)
size_t opengl_export_render_target (int slot, int width, int height, int alpha, int num_mipmaps, ubyte *image_data)
void opengl_set_texture_target (GLenum target=GL_TEXTURE_2D)
void opengl_set_texture_face (GLenum face=GL_TEXTURE_2D)
int gr_opengl_tcache_set (int bitmap_handle, int bitmap_type, float *u_scale, float *v_scale, int stage=0)
int gr_opengl_preload (int bitmap_num, int is_aabitmap)
void gr_opengl_set_texture_panning (float u, float v, bool enable)
void gr_opengl_set_texture_addressing (int mode)
GLuint opengl_get_rtt_framebuffer ()
 Gets the current RTT framebuffer. More...


int GL_min_texture_width
GLint GL_max_texture_width
int GL_min_texture_height
GLint GL_max_texture_height
GLint GL_supported_texture_units
int GL_mipmap_filter
GLenum GL_texture_target
GLenum GL_texture_face
GLfloat GL_anisotropy
bool GL_rendering_to_texture
GLint GL_max_renderbuffer_size

Typedef Documentation

Function Documentation

void gr_opengl_get_bitmap_from_texture ( void data_out,
int  bitmap_num 

Definition at line 1201 of file gropengltexture.cpp.

int gr_opengl_preload ( int  bitmap_num,
int  is_aabitmap 

Definition at line 1122 of file gropengltexture.cpp.

void gr_opengl_set_texture_addressing ( int  mode)

Definition at line 1170 of file gropengltexture.cpp.

void gr_opengl_set_texture_panning ( float  u,
float  v,
bool  enable 

Definition at line 1145 of file gropengltexture.cpp.

int gr_opengl_tcache_set ( int  bitmap_handle,
int  bitmap_type,
float u_scale,
float v_scale,
int  stage = 0 

Definition at line 1088 of file gropengltexture.cpp.

size_t opengl_export_render_target ( int  slot,
int  width,
int  height,
int  alpha,
int  num_mipmaps,
ubyte image_data 

Sends a texture object out to "image_data"

Image_data should be memory which is already allocated. Function should only be used for uncompressed 24-bit or 32-bit (distiguished by "alpha" var) images

0 on failure
size of data on success

Definition at line 1256 of file gropengltexture.cpp.

void opengl_free_texture_slot ( int  n)

Definition at line 263 of file gropengltexture.cpp.

GLfloat opengl_get_max_anisotropy ( )

Definition at line 90 of file gropengltexture.cpp.

GLuint opengl_get_rtt_framebuffer ( )

Gets the current RTT framebuffer.

Gets the OpenGL framebuffer ID of the currently in use RTT framebuffer. If there is currently none such framebuffer in use then this function returns 0 so it can be used in any place where the framebuffer should be reset to the default drawing surface.

The current RTT FBO ID or 0 when not doing RTT.

Definition at line 1869 of file gropengltexture.cpp.

int opengl_get_texture ( GLenum  target,
GLenum  pixel_format,
GLenum  data_format,
int  num_mipmaps,
int  width,
int  height,
int  bytes_per_pixel,
void image_data,
int  offset 

Definition at line 1222 of file gropengltexture.cpp.

void opengl_kill_render_target ( int  slot)

Definition at line 1476 of file gropengltexture.cpp.

int opengl_make_render_target ( int  handle,
int  slot,
int w,
int h,
ubyte bpp,
int mm_lvl,
int  flags 

Definition at line 1628 of file gropengltexture.cpp.

void opengl_preload_init ( )

Definition at line 1114 of file gropengltexture.cpp.

void opengl_set_additive_tex_env ( )

Definition at line 62 of file gropengltexture.cpp.

void opengl_set_modulate_tex_env ( )

Definition at line 76 of file gropengltexture.cpp.

int opengl_set_render_target ( int  slot,
int  face = -1,
int  is_static = 0 

Definition at line 1542 of file gropengltexture.cpp.

void opengl_set_texture_face ( GLenum  face = GL_TEXTURE_2D)
void opengl_set_texture_target ( GLenum  target = GL_TEXTURE_2D)

Definition at line 106 of file gropengltexture.cpp.

void opengl_switch_arb ( int  unit,
int  state 
void opengl_tcache_flush ( )

Definition at line 215 of file gropengltexture.cpp.

void opengl_tcache_frame ( )

Definition at line 253 of file gropengltexture.cpp.

void opengl_tcache_init ( )

Definition at line 111 of file gropengltexture.cpp.

void opengl_tcache_shutdown ( )

Definition at line 233 of file gropengltexture.cpp.

Variable Documentation

GLfloat GL_anisotropy

Definition at line 39 of file gropengltexture.cpp.

GLint GL_max_renderbuffer_size

Definition at line 46 of file gropengltexture.cpp.

GLint GL_max_texture_height

Definition at line 32 of file gropengltexture.cpp.

GLint GL_max_texture_width

Definition at line 30 of file gropengltexture.cpp.

int GL_min_texture_height

Definition at line 31 of file gropengltexture.cpp.

int GL_min_texture_width

Definition at line 29 of file gropengltexture.cpp.

int GL_mipmap_filter

Definition at line 41 of file gropengltexture.cpp.

bool GL_rendering_to_texture

Definition at line 45 of file gropengltexture.cpp.

GLint GL_supported_texture_units

Definition at line 36 of file gropengltexture.cpp.

GLenum GL_texture_face

Definition at line 43 of file gropengltexture.cpp.

GLenum GL_texture_target

Definition at line 42 of file gropengltexture.cpp.