Skip to content
Snippets Groups Projects
Commit 3c58ffac authored by slevy's avatar slevy
Browse files

Rename my_context and MAXGLCTX to non-texture-specific

get_dsp_context ad MAXDSPCTX.
parent d53d60fb
No related branches found
No related tags found
No related merge requests found
......@@ -19,12 +19,12 @@
extern int mg_inhaletexture( Texture *tx, int rgba );
int my_txcontext(void)
int get_dsp_context(void)
{
#if CAVE
/* assume virdir */
int id = CAT_get_display_slot();
if(id < 0 || id >= MAXGLCTX) id = MAXGLCTX-1;
if(id < 0 || id >= MAXDSPCTX) id = MAXDSPCTX-1;
return id;
#else /* stand-alone -- single GLX context */
return 0;
......@@ -59,7 +59,7 @@ int txbind( Texture *tx, int *enabled )
}
if(ctx < 0)
ctx = my_txcontext();
ctx = get_dsp_context();
mustload = (tx->txid[ctx] == 0);
......
......@@ -19,7 +19,9 @@ int txaddentry( Texture ***tp, int *ntextures, char *fromfile,
void txpurge( Texture *tx );
#define MAXGLCTX 8
int get_my_context(void);
#define MAXDSPCTX 16
struct Texture {
char *filename; /* ppm or pgm (.Z) file */
......@@ -33,7 +35,7 @@ struct Texture {
int qualflags; /* APF_TX{MIPMAP,MIPINTERP,LINEAR}: if loaded, how? */
ColorA background; /* background color: outside of clamped texture */
Matrix tfm; /* texture-coord transformation */
int txid[MAXGLCTX]; /* OpenGL texture-object id's */
int txid[MAXDSPCTX]; /* OpenGL texture-object id's */
struct Texture *next; /* Link in list of all loaded textures */
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment