26 #define BMPMAN_INTERNAL
31 static inline int is_power_of_two(
int w,
int h)
53 return (levels > 1) ? levels : 1;
136 if ( (flags & BMP_FLAG_CUBEMAP) && (*width != *height) ) {
137 MIN(*width, *height) =
MAX(*width, *height);
143 Assert( is_power_of_two(*width, *height) );
#define OGL_EXT_FRAMEBUFFER_OBJECT
int get_num_mipmap_levels(int w, int h)
GLfloat GLfloat GLfloat GLfloat h
size_t mem_taken
How much memory does this bitmap use? - UnknownPlayer.
ubyte true_bpp
The image's actual bitdepth.
ubyte flags
Various texture type flags.
bitmap_entry bm_bitmaps[MAX_BITMAPS]
BM_TYPE type
PCX, USER, ANI, etc.
void bm_clean_slot(int n)
#define OGL_SGIS_GENERATE_MIPMAP
short h
Height, in number of pixels.
int opengl_set_render_target(int slot, int face, int is_static)
GLenum GLuint GLint GLenum face
int gr_opengl_bm_set_render_target(int n, int face)
int GL_min_texture_height
void gr_opengl_bm_free_data(int n, bool release)
#define BMP_FLAG_CUBEMAP
Texture is a cubemap.
size_t opengl_export_render_target(int slot, int width, int height, int alpha, int num_mipmaps, ubyte *image_data)
short w
Width, in number of pixels.
void gr_opengl_bm_page_in_start()
#define OGL_ARB_TEXTURE_CUBE_MAP
void opengl_kill_render_target(int slot)
#define Is_Extension_Enabled(x)
bool gr_opengl_bm_data(int n, bitmap *bm)
24/32 bit setup internally as a dynamic render target
bool opengl_texture_slot_valid(int n, int handle)
void opengl_free_texture_slot(int n)
int gr_opengl_bm_make_render_target(int n, int *width, int *height, ubyte *bpp, int *mm_lvl, int flags)
GLint GLsizei GLsizei height
GLubyte GLubyte GLubyte GLubyte w
#define OGL_ARB_TEXTURE_NON_POWER_OF_TWO
24/32 bit setup internally as a static render target
ptr_u data
Pointer to data, or maybe offset into VRAM.
int num_mipmaps
number of mipmap levels, we need to read all of them
void opengl_preload_init()
#define MAX_BITMAPS
How many bitmaps the game can handle.
int opengl_make_render_target(int handle, int slot, int *w, int *h, ubyte *bpp, int *mm_lvl, int flags)
void gr_opengl_bm_create(int n)
int Cmdline_save_render_targets
void gr_opengl_bm_save_render_target(int n)
void dds_save_image(int width, int height, int bpp, int num_mipmaps, ubyte *data, int cubemap, const char *filename)
void gr_opengl_bm_init(int n)