geWBitmap

Description: Creates geBitmaps from the data in the BSP, that are used to render

Source file: ...\genesis3d\OpenSource\Source\World\WBitmap.h

Contents:

Functions: Create, Destroy, GetWBitmapCount, GetWBitmapByBitmap, GetWBitmapByIndex, GetBitmapByIndex, GetBitmapByName, CreateAllWBitmaps, DestroyAllWBitmaps, GetFlags, GetBitmap, GetVisFrame, SetVisFrame

Types: geWBitmap, geWBitmap_Pool

Constants: view

Changes for Genesis3D v1.6: Pool_GetWNameByBitmap

Constants:

#define  TEXTURE_SKYBOX    (1<<0)    // This is a skybox texture
// TexInfo Flags (Global shared info about each surface)
#define  TEXINFO_MIRROR     (1<<0)
#define  TEXINFO_FULLBRIGHT    (1<<1)    // No lightmap/fullbright
#define  TEXINFO_SKY      (1<<2)    // Sky face
#define  TEXINFO_LIGHT     (1<<3)    // Face produces light
#define  TEXINFO_TRANS     (1<<4)    // Face has transparency
#define  TEXINFO_GOURAUD     (1<<5)
#define  TEXINFO_FLAT     (1<<6)
#define  TEXINFO_NO_LIGHTMAP    (1<<15)
#define  WBITMAP_SKYBOX    (1<<0)    // This is a skybox wbitmap
Return to Contents

Types:

typedef struct geWBitmap geWBitmap;

NOTE: The contents of this structure have been intentionally left out of the interface, by the designers of this module. Think of this as a handle only.

Notes from WBitmap.c:

// WBitmap is the original owner of all the bitmaps in the .BSP file. They are kind of a hack right now.
// Right now, the textures are raw data in the .BSP. This module, takes that data, and creates geBitmaps
// for each texture in the.BSP file. The faces are then referred to these geBitmaps, and NOT the texture data.
// The texture data can then be freed.
// The way it really should eventually work, is that the bitmaps will be in the .BSP upon load time!!!

Return to Contents

 

typedef struct geWBitmap_Pool  geWBitmap_Pool;

NOTE: The contents of this structure have been intentionally left out of the interface, by the designers of this module. Think of this as a handle only.

Notes from WBitmap.c:

geWBitmap_Pool contains a linear array of WBitmaps created when the Pool was created

Return to Contents

Functions:

 

geWBitmap_Pool* geWBitmap_Pool_Create(GBSP_BSPData* BSPData);

 

Return to Contents

void geWBitmap_Pool_Destroy(geWBitmap_Pool* Pool);

 

Return to Contents

int32 geWBitmap_Pool_GetWBitmapCount(geWBitmap_Pool* Pool);

 

Return to Contents

geWBitmap* geWBitmap_Pool_GetWBitmapByBitmap(geWBitmap_Pool* Pool, const geBitmap* Bitmap);

 

Return to Contents

geWBitmap* geWBitmap_Pool_GetWBitmapByIndex(geWBitmap_Pool* Pool, int32 Index);

 

Return to Contents

geBitmap* geWBitmap_Pool_GetBitmapByIndex(geWBitmap_Pool* Pool, int32 Index);

 

Return to Contents

geBitmap* geWBitmap_Pool_GetBitmapByName(geWBitmap_Pool* Pool, const char * BitmapName);

 

Return to Contents

geBoolean geWBitmap_Pool_CreateAllWBitmaps(geWBitmap_Pool* Pool, GBSP_BSPData* BSPData);

 

Return to Contents

void geWBitmap_Pool_DestroyAllWBitmaps(geWBitmap_Pool* Pool);

 

Return to Contents

uint32 geWBitmap_GetFlags(geWBitmap* WBitmap);

 

Return to Contents

geBitmap* geWBitmap_GetBitmap(geWBitmap* WBitmap);

 

Return to Contents

int32 geWBitmap_GetVisFrame(geWBitmap* WBitmap);

 

Return to Contents

geBoolean geWBitmap_SetVisFrame(geWBitmap* WBitmap, int32 VisFrame);

 
Return to Contents

char* geWBitmap_Pool_GetWNameByBitmap(geWBitmap_Pool* Pool, const geBitmap* Bitmap);

Added for Genesis3D v1.6

Notes: comments from the code indicate that the purpose of this function is to "// change texture name."

The code itself searches through Pool, and if a geBitmap is found matching Bitmap, returns a pointer to the geBitmap's name. If no matching geBitmap found, NULL is returned.

Return to Contents