engine: client: vgui: deprecate VGUI_CreateTexture and VGUI_UploadTextureBlock functions, as they never used by vgui_support module
* vgui_support used them in old engine for font cache, but we don't have that anymore.
This commit is contained in:
parent
08c2632c14
commit
ce4148f351
2 changed files with 6 additions and 29 deletions
|
@ -96,38 +96,15 @@ static void GAME_EXPORT VGUI_UploadTexture( int id, const char *buffer, int widt
|
||||||
|
|
||||||
static void GAME_EXPORT VGUI_CreateTexture( int id, int width, int height )
|
static void GAME_EXPORT VGUI_CreateTexture( int id, int width, int height )
|
||||||
{
|
{
|
||||||
rgbdata_t r_image = { 0 };
|
// nothing uses it, it can be removed
|
||||||
char texName[32];
|
Host_Error( "%s: deprecated\n", __func__ );
|
||||||
|
|
||||||
if( id <= 0 || id >= VGUI_MAX_TEXTURES )
|
|
||||||
{
|
|
||||||
Con_DPrintf( S_ERROR "%s: bad texture %i. Ignored\n", __func__, id );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_snprintf( texName, sizeof( texName ), "*vgui%i", id );
|
|
||||||
|
|
||||||
r_image.width = width;
|
|
||||||
r_image.height = height;
|
|
||||||
r_image.type = PF_RGBA_32;
|
|
||||||
r_image.size = width * height * 4;
|
|
||||||
r_image.flags = IMAGE_HAS_COLOR|IMAGE_HAS_ALPHA;
|
|
||||||
r_image.buffer = NULL;
|
|
||||||
|
|
||||||
vgui.textures[id] = GL_LoadTextureInternal( texName, &r_image, TF_IMAGE );
|
|
||||||
vgui.bound_texture = id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GAME_EXPORT VGUI_UploadTextureBlock( int id, int drawX, int drawY, const byte *rgba, int blockWidth, int blockHeight )
|
static void GAME_EXPORT VGUI_UploadTextureBlock( int id, int drawX, int drawY, const byte *rgba, int blockWidth, int blockHeight )
|
||||||
{
|
{
|
||||||
if( id <= 0 || id >= VGUI_MAX_TEXTURES || vgui.textures[id] == 0 )
|
// nothing uses it, it can be removed
|
||||||
{
|
Host_Error( "%s: deprecated\n", __func__ );
|
||||||
Con_DPrintf( S_ERROR "%s: bad texture %i. Ignored\n", __func__, id );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ref.dllFuncs.VGUI_UploadTextureBlock( drawX, drawY, rgba, blockWidth, blockHeight );
|
|
||||||
vgui.bound_texture = id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GAME_EXPORT VGUI_BindTexture( int id )
|
static void GAME_EXPORT VGUI_BindTexture( int id )
|
||||||
|
|
|
@ -170,9 +170,9 @@ typedef struct vguiapi_s
|
||||||
void (*SetupDrawingImage)( int *pColor );
|
void (*SetupDrawingImage)( int *pColor );
|
||||||
void (*BindTexture)( int id );
|
void (*BindTexture)( int id );
|
||||||
void (*EnableTexture)( qboolean enable );
|
void (*EnableTexture)( qboolean enable );
|
||||||
void (*CreateTexture)( int id, int width, int height );
|
void (*Reserved0)( int id, int width, int height );
|
||||||
void (*UploadTexture)( int id, const char *buffer, int width, int height );
|
void (*UploadTexture)( int id, const char *buffer, int width, int height );
|
||||||
void (*UploadTextureBlock)( int id, int drawX, int drawY, const byte *rgba, int blockWidth, int blockHeight );
|
void (*Reserved1)( int id, int drawX, int drawY, const byte *rgba, int blockWidth, int blockHeight );
|
||||||
void (*DrawQuad)( const vpoint_t *ul, const vpoint_t *lr );
|
void (*DrawQuad)( const vpoint_t *ul, const vpoint_t *lr );
|
||||||
void (*GetTextureSizes)( int *width, int *height );
|
void (*GetTextureSizes)( int *width, int *height );
|
||||||
int (*GenerateTexture)( void );
|
int (*GenerateTexture)( void );
|
||||||
|
|
Loading…
Add table
Reference in a new issue