mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-23 11:50:55 +00:00
Multitexture for GLX, sortof. It's useless to you unless you've got
SGIS_multitexture (I assure you, unless you're on IRIX, you don't have it!) Added a Sbar_Changed () to fix the sbar overbright for a few people and the very beginnings of ARB_multitexture are now in glquake.h
This commit is contained in:
parent
6c2ae3cb47
commit
9a348350df
4 changed files with 38 additions and 3 deletions
|
@ -164,6 +164,14 @@ AC_CHECK_FUNCS(
|
||||||
getnameinfo
|
getnameinfo
|
||||||
)
|
)
|
||||||
|
|
||||||
|
DL_LIBS=""
|
||||||
|
if test "x$ac_cv_func_dlopen" != "xyes"; then
|
||||||
|
AC_CHECK_LIB(dl, dlopen,
|
||||||
|
AC_DEFINE(HAVE_DLOPEN) DL_LIBS="-ldl"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
AC_SUBST(DL_LIBS)
|
||||||
|
|
||||||
dnl Checks for stricmp/strcasecmp
|
dnl Checks for stricmp/strcasecmp
|
||||||
AC_CHECK_FUNC(stricmp,,
|
AC_CHECK_FUNC(stricmp,,
|
||||||
AC_CHECK_FUNC(strcasecmp, AC_DEFINE(stricmp,strcasecmp)))
|
AC_CHECK_FUNC(strcasecmp, AC_DEFINE(stricmp,strcasecmp)))
|
||||||
|
|
|
@ -238,6 +238,8 @@ void GL_Bind (int texnum);
|
||||||
// Multitexture
|
// Multitexture
|
||||||
#define TEXTURE0_SGIS 0x835E
|
#define TEXTURE0_SGIS 0x835E
|
||||||
#define TEXTURE1_SGIS 0x835F
|
#define TEXTURE1_SGIS 0x835F
|
||||||
|
#define GL_TEXTURE0_ARB 0x84C0
|
||||||
|
#define GL_TEXTURE1_ARB 0x84C1
|
||||||
|
|
||||||
typedef void (GLAPIENTRY *lpMTexFUNC) (GLenum, GLfloat, GLfloat);
|
typedef void (GLAPIENTRY *lpMTexFUNC) (GLenum, GLfloat, GLfloat);
|
||||||
typedef void (GLAPIENTRY *lpSelTexFUNC) (GLenum);
|
typedef void (GLAPIENTRY *lpSelTexFUNC) (GLenum);
|
||||||
|
@ -245,6 +247,8 @@ extern lpMTexFUNC qglMTexCoord2fSGIS;
|
||||||
extern lpSelTexFUNC qglSelectTextureSGIS;
|
extern lpSelTexFUNC qglSelectTextureSGIS;
|
||||||
|
|
||||||
extern qboolean gl_mtexable;
|
extern qboolean gl_mtexable;
|
||||||
|
extern qboolean gl_arb_mtex;
|
||||||
|
extern int gl_mtex_enum;
|
||||||
|
|
||||||
void GL_DisableMultitexture(void);
|
void GL_DisableMultitexture(void);
|
||||||
void GL_EnableMultitexture(void);
|
void GL_EnableMultitexture(void);
|
||||||
|
@ -308,3 +312,4 @@ void GL_BuildLightmaps (void);
|
||||||
void R_NetGraph (void);
|
void R_NetGraph (void);
|
||||||
|
|
||||||
#endif // _GLQUAKE_H
|
#endif // _GLQUAKE_H
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ qf_client_mgl_LDADD= $(MGL_LIBS) $(CLIENT_LIBS)
|
||||||
qf_client_ggi_LDADD= $(GGI_LIBS) $(CLIENT_LIBS)
|
qf_client_ggi_LDADD= $(GGI_LIBS) $(CLIENT_LIBS)
|
||||||
qf_client_svga_LDADD= $(SVGA_LIBS) $(CLIENT_LIBS)
|
qf_client_svga_LDADD= $(SVGA_LIBS) $(CLIENT_LIBS)
|
||||||
qf_client_x11_LDADD= $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB) $(CLIENT_LIBS)
|
qf_client_x11_LDADD= $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB) $(CLIENT_LIBS)
|
||||||
qf_client_glx_LDADD= $(GLX_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(CLIENT_LIBS)
|
qf_client_glx_LDADD= $(GLX_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(CLIENT_LIBS) $(DL_LIBS)
|
||||||
qf_client_wgl_LDADD= $(CLIENT_LIBS)
|
qf_client_wgl_LDADD= $(CLIENT_LIBS)
|
||||||
|
|
||||||
qf_server_DEPENDENCIES=libqfsys_sv.a
|
qf_server_DEPENDENCIES=libqfsys_sv.a
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
|
#include "sbar.h"
|
||||||
#include "context_x11.h"
|
#include "context_x11.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -291,7 +292,27 @@ void VID_SetPalette (unsigned char *palette)
|
||||||
void
|
void
|
||||||
CheckMultiTextureExtensions ( void )
|
CheckMultiTextureExtensions ( void )
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_DLOPEN
|
||||||
|
dlhand = dlopen (NULL, RTLD_LAZY);
|
||||||
|
if (dlhand)
|
||||||
|
{
|
||||||
|
if (strstr(gl_extensions, "GL_SGIS_multitexture ") && !COM_CheckParm("-nomtex"))
|
||||||
|
{
|
||||||
|
Con_Printf("Multitexture extensions found.\n");
|
||||||
|
qglMTexCoord2fSGIS = (void *)dlsym(dlhand, "glMTexCoord2fSGIS");
|
||||||
|
qglSelectTextureSGIS = (void *)dlsym(dlhand, "glSelectTextureSGIS");
|
||||||
|
gl_mtexable = true;
|
||||||
|
} else {
|
||||||
|
Con_Printf ("Not using multitexture extensions.\n");
|
||||||
|
}
|
||||||
|
dlclose(dlhand);
|
||||||
|
dlhand = NULL;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
#else
|
||||||
gl_mtexable = false;
|
gl_mtexable = false;
|
||||||
|
Con_Printf ("No dlopen\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -363,6 +384,7 @@ void GL_EndRendering (void)
|
||||||
{
|
{
|
||||||
glFlush();
|
glFlush();
|
||||||
glXSwapBuffers(x_disp, x_win);
|
glXSwapBuffers(x_disp, x_win);
|
||||||
|
Sbar_Changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean VID_Is8bit(void)
|
qboolean VID_Is8bit(void)
|
||||||
|
|
Loading…
Reference in a new issue