mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
make -3dfx compile again, may need fixing for mesa specific functions listed in vid_3dfxsvga.c
This commit is contained in:
parent
1e6fc51421
commit
85d2176bb6
5 changed files with 29 additions and 52 deletions
45
configure.in
45
configure.in
|
@ -497,6 +497,8 @@ AC_ARG_WITH(glide,
|
|||
[ --with-glide=DIR use the GLIDE 2.x SDK found in DIR],
|
||||
HAVE_GLIDE=$withval, HAVE_GLIDE=auto)
|
||||
if test "x$HAVE_GLIDE" != xno; then
|
||||
AC_CHECK_LIB(glide, grGammaCorrectionValue, GLIDE_LIBS="-lglide",
|
||||
AC_CHECK_LIB(glide2x, grGammaCorrectionValue, GLIDE_LIBS="-lglide2x",GLIDE_LIBS=""))
|
||||
if test "x$HAVE_GLIDE" != xauto; then
|
||||
GLIDE_CFLAGS="$GLIDE_CFLAGS -I$withval/include"
|
||||
GLIDE_LIBS="$GLIDE_LIBS -L$withval/lib"
|
||||
|
@ -531,47 +533,6 @@ if test "x$enable_sdl" != xno; then
|
|||
AC_SUBST(HAVE_SGL)
|
||||
fi
|
||||
|
||||
# 3Dfx stuff..
|
||||
|
||||
# First we see if we can use mesa with glide support..
|
||||
# if not then try the MiniGL..
|
||||
|
||||
TDFXGL_NAME=""
|
||||
AC_ARG_WITH(3dfx,
|
||||
[ --with-3dfx[=NAME] support 3Dfx output for the V1/V2. If NAME is
|
||||
specified, it will be used as the GL wrapper lib
|
||||
for Glide.],
|
||||
HAVE_3dfx=$withval, HAVE_3dfx=auto)
|
||||
|
||||
if test "x$HAVE_3dfx" != "xno" -a "x$HAVE_SVGA" != "xno" \
|
||||
-a "x$HAVE_GLIDE" != "xno"; then
|
||||
if test "x$HAVE_3dfx" != "xauto" -a "x$HAVE_3dfx" != "xyes"; then
|
||||
TDFXGL_NAME="$HAVE_3dfx"
|
||||
fi
|
||||
if test -z "$TDFXGL_NAME"; then
|
||||
TDFXGL_NAME="$OGL_NAME"
|
||||
TDFXGL_LIBS="$GLIDE_LIBS -l$TDFXGL_NAME"
|
||||
fi
|
||||
HAVE_3dfx=no
|
||||
AC_CHECK_LIB($TDFXGL_NAME, fxMesaCreateContext, HAVE_3dfx=yes,,
|
||||
[$GLIDE_LIBS $TDFXGL_LIBS])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for 3Dfx support)
|
||||
if test "x$HAVE_3dfx" = "xyes"; then
|
||||
TDFXGL_CFLAGS="$GLIDE_CFLAGS"
|
||||
TDFXGL_LIBS="$GLIDE_LIBS -l$TDFXGL_NAME"
|
||||
HAVE_TDFXGL="yes"
|
||||
AC_MSG_RESULT(yes (using $TDFXGL_NAME))
|
||||
else
|
||||
TDFXGL_CFLAGS=""
|
||||
TDFXGL_NAME=""
|
||||
TDFXGL_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_SUBST(TDFXGL_CFLAGS)
|
||||
AC_SUBST(TDFXGL_LIBS)
|
||||
|
||||
dnl ==================================================================
|
||||
dnl Checks for system type
|
||||
dnl ==================================================================
|
||||
|
@ -1260,7 +1221,7 @@ SND_PLUGIN_TARGETS="libsound_null.la libsound_disk.la"
|
|||
VID_TARGETS=""
|
||||
BUILD_GL=no
|
||||
BUILD_SW=no
|
||||
if test "x$HAVE_TDFXGL" = xyes -a "x$ENABLE_3DFX" = xyes; then
|
||||
if test "x$HAVE_GLIDE" = xyes -a "x$ENABLE_3DFX" = xyes; then
|
||||
QW_TARGETS="$QW_TARGETS qw-client-3dfx\$(EXEEXT)"
|
||||
NQ_TARGETS="$NQ_TARGETS nq-3dfx\$(EXEEXT)"
|
||||
CL_TARGETS="$CL_TARGETS 3dfx"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
INCLUDES= -I$(top_srcdir)/include $(GGI_CFLAGS) $(MGL_CFLAGS) $(SDL_CFLAGS) $(SVGA_CFLAGS) $(X_CFLAGS) $(TDFXGL_CFLAGS)
|
||||
INCLUDES= -I$(top_srcdir)/include $(GGI_CFLAGS) $(MGL_CFLAGS) $(SDL_CFLAGS) $(SVGA_CFLAGS) $(X_CFLAGS) $(GLIDE_CFLAGS)
|
||||
|
||||
lib_LTLIBRARIES = @VID_TARGETS@
|
||||
|
||||
EXTRA_LTLIBRARIES = libQFjs.la libQFfbdev.la libQFsvga.la libQFx11.la libQFglx.la libQFsdl.la libQFsgl.la libQFtdfx.la libQFwgl.la libQFmgl.la
|
||||
|
||||
if ASM_ARCH
|
||||
|
@ -79,8 +80,9 @@ libQFsvga.la: $(libQFsvga_la_OBJECTS) $(libQFsvga_la_DEPENDENCIES)
|
|||
|
||||
libQFtdfx_la_LDFLAGS= -version-info 1:0:0
|
||||
libQFtdfx_la_SOURCES= in_common.c in_svgalib.c qfgl_ext.c vid.c vid_common_gl.c vid_3dfxsvga.c
|
||||
TDFX_LIBS = $(LIBS) -lGL
|
||||
libQFtdfx.la: $(libQFtdfx_la_OBJECTS) $(libQFtdfx_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libQFtdfx_la_LDFLAGS) $(libQFtdfx_la_OBJECTS) $(libQFtdfx_la_LIBADD) $(LIBS)
|
||||
$(LINK) -rpath $(libdir) $(libQFtdfx_la_LDFLAGS) $(libQFtdfx_la_OBJECTS) $(libQFtdfx_la_LIBADD) $(TDFX_LIBS)
|
||||
|
||||
|
||||
libQFwgl_la_LDFLAGS= -version-info 1:0:0
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <GL/fxmesa.h>
|
||||
#include <glide/glide.h>
|
||||
#include <glide/sst1vid.h>
|
||||
#include <sys/signal.h>
|
||||
|
@ -46,11 +45,11 @@
|
|||
#include "compat.h"
|
||||
#include "QF/console.h"
|
||||
#include "QF/cvar.h"
|
||||
#include "glquake.h"
|
||||
#include "QF/qargs.h"
|
||||
#include "QF/qendian.h"
|
||||
#include "qfgl_ext.h"
|
||||
#include "sbar.h"
|
||||
#include "QF/GL/extensions.h"
|
||||
#include "QF/GL/funcs.h"
|
||||
#include "QF/sys.h"
|
||||
#include "QF/va.h"
|
||||
#include "QF/vid.h"
|
||||
|
@ -58,6 +57,23 @@
|
|||
#define WARP_WIDTH 320
|
||||
#define WARP_HEIGHT 200
|
||||
|
||||
#define GLAPI extern
|
||||
#define GLAPIENTRY
|
||||
|
||||
#define FXMESA_NONE 0 /* to terminate attribList */
|
||||
#define FXMESA_DOUBLEBUFFER 10
|
||||
#define FXMESA_ALPHA_SIZE 11 /* followed by an integer */
|
||||
#define FXMESA_DEPTH_SIZE 12 /* followed by an integer */
|
||||
|
||||
#define GL_DITHER 0x0BD0
|
||||
|
||||
typedef struct tfxMesaContext *fxMesaContext;
|
||||
|
||||
GLAPI void GLAPIENTRY fxMesaDestroyContext(fxMesaContext ctx);
|
||||
GLAPI void GLAPIENTRY fxMesaSwapBuffers(void);
|
||||
GLAPI fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]);
|
||||
GLAPI void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext ctx);
|
||||
|
||||
// FIXME!!!!! This belongs in include/qfgl_ext.h -- deek
|
||||
typedef void (GLAPIENTRY * QF_3DfxSetDitherModeEXT) (GrDitherMode_t mode);
|
||||
|
||||
|
@ -349,10 +365,7 @@ VID_SetCaption (char *text)
|
|||
qboolean
|
||||
VID_SetGamma (double gamma)
|
||||
{
|
||||
// FIXME: Need function for HW gamma correction
|
||||
// return X11_SetGamma (gamma);
|
||||
grGammaCorrectionValue((float) gamma);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ ogl_SOURCES= gl_view.c
|
|||
|
||||
# ... 3Dfx Voodoo 1 and 2 SVGAlib-based console GL
|
||||
nq_3dfx_SOURCES= $(combined_SOURCES) $(ogl_SOURCES)
|
||||
nq_3dfx_LDADD= ../../libs/video/renderer/libQFrenderer_gl.la ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFtdfx.la $(client_LIBS) $(TDFXGL_LIBS) $(SVGA_LIBS) $(DL_LIBS)
|
||||
nq_3dfx_LDADD= ../../libs/video/renderer/libQFrenderer_gl.la ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFtdfx.la $(client_LIBS) $(GLIDE_LIBS) $(SVGA_LIBS) $(DL_LIBS)
|
||||
nq_3dfx_LDFLAGS= $(common_ldflags)
|
||||
nq_3dfx_DEPENDENCIES=../../libs/video/renderer/libQFrenderer_gl.la ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFtdfx.la $(client_LIB_DEPS)
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ AUTOMAKE_OPTIONS= foreign
|
|||
INCLUDES= -I$(top_srcdir)/include -I$(top_srcdir)/qw/include
|
||||
|
||||
bin_PROGRAMS= @QW_TARGETS@
|
||||
GLIDE_LIBS= @GLIDE_LIBS@
|
||||
|
||||
EXTRA_PROGRAMS= qw-client-3dfx qw-client-fbdev \
|
||||
qw-client-glx qw-client-mgl qw-client-sdl \
|
||||
|
@ -155,7 +156,7 @@ ogl_SOURCES= gl_view.c
|
|||
|
||||
# ... 3Dfx Voodoo 1 and 2 SVGAlib-based console GL
|
||||
qw_client_3dfx_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES)
|
||||
qw_client_3dfx_LDADD= ../../libs/video/renderer/libQFrenderer_gl.la ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFtdfx.la $(client_LIBS) $(TDFXGL_LIBS) $(SVGA_LIBS) $(DL_LIBS)
|
||||
qw_client_3dfx_LDADD= ../../libs/video/renderer/libQFrenderer_gl.la ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFtdfx.la $(client_LIBS) $(GLIDE_LIBS) $(SVGA_LIBS) $(DL_LIBS)
|
||||
qw_client_3dfx_LDFLAGS= $(common_ldflags)
|
||||
qw_client_3dfx_DEPENDENCIES=../../libs/video/renderer/libQFrenderer_gl.la ../../libs/models/libQFmodels_gl.la ../../libs/video/targets/libQFtdfx.la $(client_LIB_DEPS)
|
||||
|
||||
|
|
Loading…
Reference in a new issue