arch/ogl/include/ogl_init.h File Reference

#include <GL/gl.h>
#include "gr.h"
#include "palette.h"
#include "types.h"
#include "3d.h"

Classes

struct  _ogl_texture

Defines

#define OGL_TEXTURE_LIST_SIZE   20000
#define ogl_arb_multitexture_ok   0
#define ogl_sgis_multitexture_ok   0
#define OGL_ENABLE2(a, f)   {if (a ## _enabled!=1) {f;a ## _enabled=1;}}
#define OGL_DISABLE2(a, f)   {if (a ## _enabled!=0) {f;a ## _enabled=0;}}
#define OGL_ENABLE(a)   OGL_ENABLE2(GL_ ## a,glEnable(GL_ ## a))
#define OGL_DISABLE(a)   OGL_DISABLE2(GL_ ## a,glDisable(GL_ ## a))
#define OGL_VIEWPORT(x, y, w, h)   {if (w!=last_width || h!=last_height){glViewport(x,grd_curscreen->sc_canvas.cv_bitmap.bm_h-y-h,w,h);last_width=w;last_height=h;}}
#define OGLTEXBUFSIZE   (2048*2048*4)
#define CPAL2Tr(c)   ((gr_current_pal[c*3])/63.0)
#define CPAL2Tg(c)   ((gr_current_pal[c*3+1])/63.0)
#define CPAL2Tb(c)   ((gr_current_pal[c*3+2])/63.0)
#define PAL2Tr(c)   ((ogl_pal[c*3])/63.0)
#define PAL2Tg(c)   ((ogl_pal[c*3+1])/63.0)
#define PAL2Tb(c)   ((ogl_pal[c*3+2])/63.0)

Typedefs

typedef _ogl_texture ogl_texture

Functions

ogl_textureogl_get_free_texture (void)
void ogl_init_texture (ogl_texture *t)
void ogl_init_texture_list_internal (void)
void ogl_smash_texture_list_internal (void)
void ogl_vivify_texture_list_internal (void)
void ogl_do_fullscreen_internal (void)
void ogl_swap_buffers_internal (void)
int ogl_init_window (int x, int y)
void ogl_destroy_window (void)
void ogl_init (void)
void ogl_close (void)
void ogl_filltexbuf (unsigned char *data, GLubyte *texp, int truewidth, int width, int height, int dxo, int dyo, int twidth, int theight, int type, int transp)
void ogl_loadbmtexture_m (grs_bitmap *bm, int domipmap)
void ogl_loadbmtexture (grs_bitmap *bm)
void ogl_loadtexture (unsigned char *data, int dxo, int dyo, ogl_texture *tex, int transp)
void ogl_freetexture (ogl_texture *gltexture)
void ogl_freebmtexture (grs_bitmap *bm)
void ogl_do_palfx (void)
void ogl_start_offscreen_render (int x, int y, int w, int h)
void ogl_end_offscreen_render (void)
void ogl_start_frame (void)
void ogl_end_frame (void)
void ogl_swap_buffers (void)
void ogl_set_screen_mode (void)
void ogl_cache_level_textures (void)
void ogl_urect (int left, int top, int right, int bot)
bool ogl_ubitmapm_c (int x, int y, grs_bitmap *bm, int c)
bool ogl_ubitmapm_cs (int x, int y, int dw, int dh, grs_bitmap *bm, int c, int scale, int orient)
bool ogl_ubitmapm_cf (int x, int y, int dw, int dh, grs_bitmap *bm, int c, int scale)
bool ogl_ubitmapm (int x, int y, grs_bitmap *bm)
bool ogl_ubitblt_i (int dw, int dh, int dx, int dy, int sw, int sh, int sx, int sy, grs_bitmap *src, grs_bitmap *dest, int transp)
bool ogl_ubitblt (int w, int h, int dx, int dy, int sx, int sy, grs_bitmap *src, grs_bitmap *dest)
bool ogl_ubitblt_tolinear (int w, int h, int dx, int dy, int sx, int sy, grs_bitmap *src, grs_bitmap *dest)
bool ogl_ubitblt_copy (int w, int h, int dx, int dy, int sx, int sy, grs_bitmap *src, grs_bitmap *dest)
void ogl_upixelc (int x, int y, int c)
void ogl_ulinec (int left, int top, int right, int bot, int c)
bool g3_draw_tmap_2 (int nv, g3s_point **pointlist, g3s_uvl *uvl_list, grs_bitmap *bmbot, grs_bitmap *bm, int orient)
void ogl_draw_reticle (int cross, int primary, int secondary)

Variables

ogl_texture ogl_texture_list [OGL_TEXTURE_LIST_SIZE]
int ogl_mem_target
int ogl_fullscreen
int ogl_voodoohack
int ogl_alttexmerge
int ogl_rgba_format
int ogl_intensity4_ok
int ogl_luminance4_alpha4_ok
int ogl_rgba2_ok
int ogl_readpixels_ok
int ogl_gettexlevelparam_ok
int gl_initialized
int GL_texmagfilt
int GL_texminfilt
int GL_needmipmaps
int gl_reticle
int GL_TEXTURE_2D_enabled
int last_width
int last_height
GLubyte texbuf [OGLTEXBUFSIZE]
unsigned char * ogl_pal

Define Documentation

#define CPAL2Tb  )     ((gr_current_pal[c*3+2])/63.0)
 

#define CPAL2Tg  )     ((gr_current_pal[c*3+1])/63.0)
 

#define CPAL2Tr  )     ((gr_current_pal[c*3])/63.0)
 

#define ogl_arb_multitexture_ok   0
 

#define OGL_DISABLE  )     OGL_DISABLE2(GL_ ## a,glDisable(GL_ ## a))
 

#define OGL_DISABLE2 a,
 )     {if (a ## _enabled!=0) {f;a ## _enabled=0;}}
 

#define OGL_ENABLE  )     OGL_ENABLE2(GL_ ## a,glEnable(GL_ ## a))
 

#define OGL_ENABLE2 a,
 )     {if (a ## _enabled!=1) {f;a ## _enabled=1;}}
 

#define ogl_sgis_multitexture_ok   0
 

#define OGL_TEXTURE_LIST_SIZE   20000
 

#define OGL_VIEWPORT x,
y,
w,
 )     {if (w!=last_width || h!=last_height){glViewport(x,grd_curscreen->sc_canvas.cv_bitmap.bm_h-y-h,w,h);last_width=w;last_height=h;}}
 

#define OGLTEXBUFSIZE   (2048*2048*4)
 

#define PAL2Tb  )     ((ogl_pal[c*3+2])/63.0)
 

#define PAL2Tg  )     ((ogl_pal[c*3+1])/63.0)
 

#define PAL2Tr  )     ((ogl_pal[c*3])/63.0)
 


Typedef Documentation

typedef struct _ogl_texture ogl_texture
 


Function Documentation

bool g3_draw_tmap_2 int  nv,
g3s_point **  pointlist,
g3s_uvl uvl_list,
grs_bitmap bmbot,
grs_bitmap bm,
int  orient
 

void ogl_cache_level_textures void   ) 
 

void ogl_close void   ) 
 

void ogl_destroy_window void   ) 
 

void ogl_do_fullscreen_internal void   ) 
 

void ogl_do_palfx void   ) 
 

void ogl_draw_reticle int  cross,
int  primary,
int  secondary
 

void ogl_end_frame void   ) 
 

void ogl_end_offscreen_render void   ) 
 

void ogl_filltexbuf unsigned char *  data,
GLubyte *  texp,
int  truewidth,
int  width,
int  height,
int  dxo,
int  dyo,
int  twidth,
int  theight,
int  type,
int  transp
 

void ogl_freebmtexture grs_bitmap bm  ) 
 

void ogl_freetexture ogl_texture gltexture  ) 
 

ogl_texture* ogl_get_free_texture void   ) 
 

void ogl_init void   ) 
 

void ogl_init_texture ogl_texture t  ) 
 

void ogl_init_texture_list_internal void   ) 
 

int ogl_init_window int  x,
int  y
 

void ogl_loadbmtexture grs_bitmap bm  ) 
 

void ogl_loadbmtexture_m grs_bitmap bm,
int  domipmap
 

void ogl_loadtexture unsigned char *  data,
int  dxo,
int  dyo,
ogl_texture tex,
int  transp
 

void ogl_set_screen_mode void   ) 
 

void ogl_smash_texture_list_internal void   ) 
 

void ogl_start_frame void   ) 
 

void ogl_start_offscreen_render int  x,
int  y,
int  w,
int  h
 

void ogl_swap_buffers void   ) 
 

void ogl_swap_buffers_internal void   )  [inline]
 

bool ogl_ubitblt int  w,
int  h,
int  dx,
int  dy,
int  sx,
int  sy,
grs_bitmap src,
grs_bitmap dest
 

bool ogl_ubitblt_copy int  w,
int  h,
int  dx,
int  dy,
int  sx,
int  sy,
grs_bitmap src,
grs_bitmap dest
 

bool ogl_ubitblt_i int  dw,
int  dh,
int  dx,
int  dy,
int  sw,
int  sh,
int  sx,
int  sy,
grs_bitmap src,
grs_bitmap dest,
int  transp
 

bool ogl_ubitblt_tolinear int  w,
int  h,
int  dx,
int  dy,
int  sx,
int  sy,
grs_bitmap src,
grs_bitmap dest
 

bool ogl_ubitmapm int  x,
int  y,
grs_bitmap bm
 

bool ogl_ubitmapm_c int  x,
int  y,
grs_bitmap bm,
int  c
 

bool ogl_ubitmapm_cf int  x,
int  y,
int  dw,
int  dh,
grs_bitmap bm,
int  c,
int  scale
 

bool ogl_ubitmapm_cs int  x,
int  y,
int  dw,
int  dh,
grs_bitmap bm,
int  c,
int  scale,
int  orient
 

void ogl_ulinec int  left,
int  top,
int  right,
int  bot,
int  c
 

void ogl_upixelc int  x,
int  y,
int  c
 

void ogl_urect int  left,
int  top,
int  right,
int  bot
 

void ogl_vivify_texture_list_internal void   ) 
 


Variable Documentation

int gl_initialized
 

int GL_needmipmaps
 

int gl_reticle
 

int GL_texmagfilt
 

int GL_texminfilt
 

int GL_TEXTURE_2D_enabled
 

int last_height
 

int last_width
 

int ogl_alttexmerge
 

int ogl_fullscreen
 

int ogl_gettexlevelparam_ok
 

int ogl_intensity4_ok
 

int ogl_luminance4_alpha4_ok
 

int ogl_mem_target
 

unsigned char* ogl_pal
 

int ogl_readpixels_ok
 

int ogl_rgba2_ok
 

int ogl_rgba_format
 

ogl_texture ogl_texture_list[OGL_TEXTURE_LIST_SIZE]
 

int ogl_voodoohack
 

GLubyte texbuf[OGLTEXBUFSIZE]
 


Generated on Mon Aug 28 20:55:30 2006 for D1X-Rebirth by  doxygen 1.4.6