[mupen64plus-video-z64] 57/161: Imported Upstream version 1.99.5~hg20110828
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:20:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch master
in repository mupen64plus-video-z64.
commit ac4d258afe7d11bdb2273ce57856152bfd7d2076
Author: Sven Eckelmann <sven at narfation.org>
Date: Sun Aug 28 18:48:01 2011 +0200
Imported Upstream version 1.99.5~hg20110828
---
projects/unix/Makefile | 178 +++++++++++++++++++++++++++++--------------------
src/maingl.cpp | 34 +++++++++-
src/rdp.cpp | 3 +
src/rdp.h | 5 +-
src/rgl_debugger.cpp | 9 ---
src/rgl_geometry.cpp | 15 +----
src/rgl_osdep.cpp | 19 ------
src/rgl_rendermode.cpp | 14 ++--
8 files changed, 151 insertions(+), 126 deletions(-)
diff --git a/projects/unix/Makefile b/projects/unix/Makefile
index 983c265..30a3c2f 100644
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -50,6 +50,12 @@ ifeq ("$(UNAME)","FreeBSD")
SO_EXTENSION = so
SHARED = -shared
endif
+ifeq ("$(UNAME)","OpenBSD")
+ OS = FREEBSD
+ SO_EXTENSION = so
+ SHARED = -shared
+ $(warning OS type "$(UNAME)" not officially supported.')
+endif
ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
OS = LINUX
SO_EXTENSION = so
@@ -66,96 +72,118 @@ ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
CPU := X86
ifeq ("$(BITS)", "32")
ARCH_DETECTED := 64BITS_32
+ PIC ?= 0
else
ARCH_DETECTED := 64BITS
+ PIC ?= 1
endif
endif
ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
CPU := X86
ARCH_DETECTED := 32BITS
+ PIC ?= 0
+endif
+ifneq ("$(filter ppc powerpc,$(HOST_CPU))","")
+ CPU := PPC
+ ARCH_DETECTED := 32BITS
+ BIG_ENDIAN := 1
+ PIC ?= 1
+ NO_ASM := 1
+ $(warning Architecture "$(HOST_CPU)" not officially supported.')
+endif
+ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
+ CPU := PPC
+ ARCH_DETECTED := 64BITS
+ BIG_ENDIAN := 1
+ PIC ?= 1
+ NO_ASM := 1
+ $(warning Architecture "$(HOST_CPU)" not officially supported.')
endif
-# PPC doesn't work yet
-#ifneq ("$(filter ppc powerpc,$(HOST_CPU))","")
-# CPU := PPC
-# ARCH_DETECTED := 32BITS
-# NO_ASM := 1
-#endif
-#ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
-# CPU := PPC
-# ARCH_DETECTED := 64BITS
-# NO_ASM := 1
-#endif
ifeq ("$(CPU)","NONE")
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
endif
-# base CFLAGS, LIBS, and LDFLAGS
-CFLAGS += -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -fvisibility=hidden -I../../src
+# base CFLAGS, LDLIBS, and LDFLAGS
+OPTFLAGS ?= -O3
+CFLAGS += $(OPTFLAGS) -Wall -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src
CXXFLAGS += -fvisibility-inlines-hidden
-LDFLAGS += -ldl -lGLEW
+LDFLAGS += $(SHARED)
-# Since we are building a shared library, we must compile with -fPIC for x86_64 CPUs.
-# On 32-bit systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
-ifeq ($(ARCH_DETECTED), 64BITS)
- CFLAGS += -fpic -DPIC
+# Since we are building a shared library, we must compile with -fPIC on some architectures
+# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
+ifeq ($(PIC), 1)
+ CFLAGS += -fPIC
+ LDFLAGS += -fPIC
endif
+
+ifeq ($(BIG_ENDIAN), 1)
+ CFLAGS += -DM64P_BIG_ENDIAN
+endif
+
# tweak flags for 32-bit build on 64-bit system
ifeq ($(ARCH_DETECTED), 64BITS_32)
ifeq ($(OS), FREEBSD)
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
endif
CFLAGS += -m32
- LDFLAGS += -m32 -m elf_i386
+ LDFLAGS += -m32 -Wl,-m,elf_i386
endif
# set special flags per-system
-ifeq ($(OS),FREEBSD)
- LDFLAGS += -lGL
-endif
ifeq ($(OS), LINUX)
- LDFLAGS += -lGL
# only export api symbols
LDFLAGS += -Wl,-version-script,$(SRCDIR)/video_api_export.ver
- ifeq ($(CPU), X86)
- ifeq ($(ARCH_DETECTED), 64BITS)
- CFLAGS += -pipe -O3 -march=athlon64
- else
- CFLAGS += -pipe -O3 -mmmx -msse -march=i686 -mtune=pentium-m -fomit-frame-pointer
- endif
- endif
endif
ifeq ($(OS), OSX)
ifeq ($(CPU), X86)
ifeq ($(ARCH_DETECTED), 64BITS)
CFLAGS += -pipe -O3 -arch x86_64 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
LDFLAGS += -bundle -framework OpenGL -arch x86_64
+ LDLIBS += -ldl
else
CFLAGS += -pipe -O3 -mmmx -msse -fomit-frame-pointer -arch i686 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
LDFLAGS += -bundle -framework OpenGL -arch i686
+ LDLIBS += -ldl
endif
endif
endif
-ifeq ($(CPU), PPC)
- CFLAGS += -mcpu=powerpc
+ifeq ($(OS), LINUX)
+ LDLIBS += -ldl
+endif
+ifeq ($(OS), FREEBSD)
+ LDLIBS += -lc
endif
+# test for essential build dependencies
+ifeq ($(shell which pkg-config 2>/dev/null),)
+ $(error pkg-config not found)
+endif
+ifeq ($(shell pkg-config --modversion gl 2>/dev/null),)
+ $(error No OpenGL development libraries found!)
+endif
+ifeq ($(shell pkg-config --modversion glew 2>/dev/null),)
+ $(error No GLEW development libraries found!)
+endif
+CFLAGS += $(shell pkg-config --cflags gl glew)
+LDLIBS += $(shell pkg-config --libs gl glew)
+
# test for presence of SDL
ifeq ($(shell which sdl-config 2>/dev/null),)
$(error No SDL development libraries found!)
endif
ifeq ($(OS),FREEBSD)
- CFLAGS += `${SDL_CONFIG} --cflags`
- LDFLAGS += `${SDL_CONFIG} --libs`
+ CFLAGS += $(shell sdl-config --cflags)
+ LDLIBS += $(shell sdl-config --libs)
endif
ifeq ($(OS),OSX)
- CFLAGS += $(shell sdl-config --cflags) -DPIC
+ CFLAGS += $(shell sdl-config --cflags)
# sdl-config on mac screws up when we're trying to build a library and not an executable
# SDL 1.3 is supposed to fix that, if it's ever released
- LDFLAGS += -L/usr/local/lib -lSDL -Wl,-framework,Cocoa
+ LDLIBS += -L/usr/local/lib -lSDL -Wl,-framework,Cocoa
endif
ifeq ($(OS),LINUX)
CFLAGS += $(shell sdl-config --cflags)
- LDFLAGS += $(shell sdl-config --libs)
+ LDLIBS += $(shell sdl-config --libs)
endif
# set mupen64plus core API header path
@@ -180,20 +208,31 @@ else
endif
endif
-# set shell function names
-CC ?= gcc
-CXX ?= g++
-INSTALL ?= install
-ifeq ($(OS),OSX)
- STRIP ?= strip -x
-else
- STRIP ?= strip -s
+# reduced compile output when running make without V=1
+ifneq ($(findstring $(MAKEFLAGS),s),s)
+ifndef V
+ Q_CC = @echo ' CC '$@;
+ Q_CXX = @echo ' CXX '$@;
+ Q_LD = @echo ' LD '$@;
endif
+endif
+
+# set base program pointers and flags
+CC ?= gcc
+CXX ?= g++
+RM ?= rm -f
+INSTALL ?= install
+MKDIR ?= mkdir -p
+COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
+COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
+LINK.o = $(Q_LD)$(CXX) $(LDFLAGS) $(TARGET_ARCH)
# set special flags for given Makefile parameters
ifeq ($(DEBUG),1)
CFLAGS += -g
- STRIP = true # disable binary strip
+ INSTALL_STRIP_FLAG ?=
+else
+ INSTALL_STRIP_FLAG ?= -s
endif
# set installation options
@@ -204,7 +243,10 @@ ifeq ($(SHAREDIR),)
SHAREDIR := $(PREFIX)/share/mupen64plus
endif
ifeq ($(LIBDIR),)
- LIBDIR := $(PREFIX)/lib/mupen64plus
+ LIBDIR := $(PREFIX)/lib
+endif
+ifeq ($(PLUGINDIR),)
+ PLUGINDIR := $(LIBDIR)/mupen64plus
endif
SRCDIR = ../../src
@@ -229,7 +271,7 @@ SOURCE = \
OBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(filter %.c, $(SOURCE)))
OBJECTS += $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(filter %.cpp, $(SOURCE)))
OBJDIRS = $(dir $(OBJECTS))
-$(shell mkdir -p $(OBJDIRS))
+$(shell $(MKDIR) $(OBJDIRS))
# build targets
TARGET = mupen64plus-video-z64.$(SO_EXTENSION)
@@ -245,10 +287,13 @@ targets:
@echo " Options:"
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
+ @echo " OPTFLAGS=flag == compiler optimization (default: -O3)"
+ @echo " PIC=(1|0) == Force enable/disable of position independent code"
@echo " Install Options:"
@echo " PREFIX=path == install/uninstall prefix (default: /usr/local)"
@echo " SHAREDIR=path == path to install shared data files (default: PREFIX/share/mupen64plus)"
- @echo " LIBDIR=path == path to install plugin libraries (default: PREFIX/lib/mupen64plus)"
+ @echo " LIBDIR=path == library prefix (default: PREFIX/lib)"
+ @echo " PLUGINDIR=path == path to install plugin libraries (default: LIBDIR/mupen64plus)"
@echo " DESTDIR=path == path to prepend to all installation paths (only for packagers)"
@echo " Debugging Options:"
@echo " DEBUG=1 == add debugging symbols"
@@ -257,16 +302,15 @@ targets:
all: $(TARGET)
install: $(TARGET)
- $(INSTALL) -d -v "$(DESTDIR)$(LIBDIR)"
- $(INSTALL) -m 0644 $(TARGET) "$(DESTDIR)$(LIBDIR)"
- $(INSTALL) -d -v "$(DESTDIR)$(SHAREDIR)"
+ $(INSTALL) -d "$(DESTDIR)$(PLUGINDIR)"
+ $(INSTALL) -m 0644 $(TARGET) $(INSTALL_STRIP_FLAG) "$(DESTDIR)$(PLUGINDIR)"
+ $(INSTALL) -d "$(DESTDIR)$(SHAREDIR)"
uninstall:
- rm -f "$(DESTDIR)$(LIBDIR)/$(TARGET)"
+ $(RM) "$(DESTDIR)$(PLUGINDIR)/$(TARGET)"
clean:
- rm -rf ./_obj/* $(TARGET)
- rmdir ./_obj
+ $(RM) -r ./_obj $(TARGET)
rebuild: clean all
@@ -276,22 +320,14 @@ CFLAGS += -MD
CXXFLAGS += $(CFLAGS)
-# reduced compile output when running make without V=1
-ifneq ($(findstring $(MAKEFLAGS),s),s)
-ifndef V
- Q_CC = @echo ' CC '$@;
- Q_CXX = @echo ' CXX '$@;
- Q_LD = @echo ' LD '$@;
-endif
-endif
-
-# build rules
-$(TARGET): $(OBJECTS)
- $(Q_LD)$(CXX) $(SHARED) $^ $(LDFLAGS) -o $@
- $(STRIP) $@
-
+# standard build rules
$(OBJDIR)/%.o: $(SRCDIR)/%.c
- $(Q_CC)$(CC) -o $@ $(CFLAGS) -c $<
+ $(COMPILE.c) -o $@ $<
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
- $(Q_CXX)$(CXX) -o $@ $(CXXFLAGS) -c $<
+ $(COMPILE.cc) -o $@ $<
+
+$(TARGET): $(OBJECTS)
+ $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+.PHONY: all clean install uninstall targets
diff --git a/src/maingl.cpp b/src/maingl.cpp
index a143634..b17b7b8 100644
--- a/src/maingl.cpp
+++ b/src/maingl.cpp
@@ -26,6 +26,13 @@
#define THREADED
+#define PLUGIN_VERSION 0x016304
+#define VIDEO_PLUGIN_API_VERSION 0x020000
+#define CONFIG_API_VERSION 0x020000
+#define VIDEXT_API_VERSION 0x020000
+
+#define VERSION_PRINTF_SPLIT(x) (((x) >> 16) & 0xffff), (((x) >> 8) & 0xff), ((x) & 0xff)
+
GFX_INFO gfx;
void (*render_callback)() = NULL;
@@ -164,6 +171,29 @@ extern "C" {
return M64ERR_INCOMPATIBLE;
}
+ /* attach and call the CoreGetAPIVersions function, check Config and Video Extension API versions for compatibility */
+ ptr_CoreGetAPIVersions CoreAPIVersionFunc;
+ CoreAPIVersionFunc = (ptr_CoreGetAPIVersions) osal_dynlib_getproc(CoreLibHandle, "CoreGetAPIVersions");
+ if (CoreAPIVersionFunc == NULL)
+ {
+ rdp_log(M64MSG_ERROR, "Core emulator broken; no CoreAPIVersionFunc() function found.");
+ return M64ERR_INCOMPATIBLE;
+ }
+ int ConfigAPIVersion, DebugAPIVersion, VidextAPIVersion;
+ (*CoreAPIVersionFunc)(&ConfigAPIVersion, &DebugAPIVersion, &VidextAPIVersion, NULL);
+ if ((ConfigAPIVersion & 0xffff0000) != (CONFIG_API_VERSION & 0xffff0000))
+ {
+ rdp_log(M64MSG_ERROR, "Emulator core Config API (v%i.%i.%i) incompatible with plugin (v%i.%i.%i)",
+ VERSION_PRINTF_SPLIT(ConfigAPIVersion), VERSION_PRINTF_SPLIT(CONFIG_API_VERSION));
+ return M64ERR_INCOMPATIBLE;
+ }
+ if ((VidextAPIVersion & 0xffff0000) != (VIDEXT_API_VERSION & 0xffff0000))
+ {
+ rdp_log(M64MSG_ERROR, "Emulator core Video Extension API (v%i.%i.%i) incompatible with plugin (v%i.%i.%i)",
+ VERSION_PRINTF_SPLIT(VidextAPIVersion), VERSION_PRINTF_SPLIT(VIDEXT_API_VERSION));
+ return M64ERR_INCOMPATIBLE;
+ }
+
/* Get the core config function pointers from the library handle */
ConfigOpenSection = (ptr_ConfigOpenSection) osal_dynlib_getproc(CoreLibHandle, "ConfigOpenSection");
ConfigSetParameter = (ptr_ConfigSetParameter) osal_dynlib_getproc(CoreLibHandle, "ConfigSetParameter");
@@ -202,10 +232,10 @@ extern "C" {
*PluginType = M64PLUGIN_GFX;
if (PluginVersion != NULL)
- *PluginVersion = 0x016304;
+ *PluginVersion = PLUGIN_VERSION;
if (APIVersion != NULL)
- *APIVersion = PLUGIN_API_VERSION;
+ *APIVersion = VIDEO_PLUGIN_API_VERSION;
if (PluginNamePtr != NULL)
*PluginNamePtr = "Z64gl";
diff --git a/src/rdp.cpp b/src/rdp.cpp
index 2221f5e..a986e6c 100644
--- a/src/rdp.cpp
+++ b/src/rdp.cpp
@@ -24,6 +24,9 @@
#include <string.h>
+const char *rdpImageFormats[] =
+{ "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" };
+
rdpState_t rdpState;
uint32_t rdpChanged;
//rdpColor_t rdpTlut[1024];
diff --git a/src/rdp.h b/src/rdp.h
index e663107..bbad3fd 100644
--- a/src/rdp.h
+++ b/src/rdp.h
@@ -27,7 +27,9 @@
#include <stdlib.h>
#include <string.h>
+#define M64P_PLUGIN_PROTOTYPES 1
#include "m64p_types.h"
+#include "m64p_common.h"
#include "m64p_plugin.h"
#include "m64p_vidext.h"
#include "m64p_config.h"
@@ -84,8 +86,7 @@ struct rdpTexRect_t {
int16_t dsdx, dtdy; // 5.10 fixed-point
};
-static const char *rdpImageFormats[] =
-{ "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" };
+extern const char *rdpImageFormats[];
// TODO put ct ... palette in a bitfield
struct rdpTile_t {
diff --git a/src/rgl_debugger.cpp b/src/rgl_debugger.cpp
index 9f871a4..3a55ea2 100644
--- a/src/rgl_debugger.cpp
+++ b/src/rgl_debugger.cpp
@@ -30,14 +30,6 @@ static const char *saRGBText[] =
"0", "0", "0", "0"
};
-static const char *sbRGBText[] =
-{
- "PREV", "TEXEL0", "TEXEL1", "PRIM",
- "SHADE", "ENV", "CENTER", "K4",
- "0", "0", "0", "0",
- "0", "0", "0", "0"
-};
-
static const char *mRGBText[] =
{
"PREV", "TEXEL0", "TEXEL1", "PRIM",
@@ -87,7 +79,6 @@ const static char * bAText[2][4] = { {"PREVA", "FOGA", "SHADEA", "0"},
char * rglCombiner2String(rdpState_t & state)
{
rdpOtherModes_t om = state.otherModes;
- rdpCombineModes_t cm = state.combineModes;
int cycle = RDP_GETOM_CYCLE_TYPE(om);
static char res[256];
char * p = res;
diff --git a/src/rgl_geometry.cpp b/src/rgl_geometry.cpp
index c72e35c..4ffe43e 100644
--- a/src/rgl_geometry.cpp
+++ b/src/rgl_geometry.cpp
@@ -257,9 +257,7 @@ void rglTriangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
int xleft, xright, xleft_inc, xright_inc;
//int xstart, xend;
int r, g, b, a, z, s, t, w;
- int dr, dg, db, da;
int drdx = 0, dgdx = 0, dbdx = 0, dadx = 0, dzdx = 0, dsdx = 0, dtdx = 0, dwdx = 0;
- int drdy = 0, dgdy = 0, dbdy = 0, dady = 0, dzdy = 0, dsdy = 0, dtdy = 0, dwdy = 0;
int drde = 0, dgde = 0, dbde = 0, dade = 0, dzde = 0, dsde = 0, dtde = 0, dwde = 0;
int flip = (w1 & 0x800000) ? 1 : 0;
@@ -317,7 +315,6 @@ void rglTriangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
yh &= ~3;
r = 0xff; g = 0xff; b = 0xff; a = 0xff; z = 0xffff0000; s = 0; t = 0; w = 0x30000;
- dr = 0; dg = 0; db = 0; da = 0;
if (shade)
{
@@ -333,10 +330,6 @@ void rglTriangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
dgde = ((shade_base[8 ] << 16) & 0xffff0000) | (shade_base[12] & 0x0000ffff);
dbde = (shade_base[9 ] & 0xffff0000) | ((shade_base[13] >> 16) & 0x0000ffff);
dade = ((shade_base[9 ] << 16) & 0xffff0000) | (shade_base[13] & 0x0000ffff);
- drdy = (shade_base[10] & 0xffff0000) | ((shade_base[14] >> 16) & 0x0000ffff);
- dgdy = ((shade_base[10] << 16) & 0xffff0000) | (shade_base[14] & 0x0000ffff);
- dbdy = (shade_base[11] & 0xffff0000) | ((shade_base[15] >> 16) & 0x0000ffff);
- dady = ((shade_base[11] << 16) & 0xffff0000) | (shade_base[15] & 0x0000ffff);
}
if (texture)
{
@@ -349,9 +342,6 @@ void rglTriangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
dsde = (texture_base[8 ] & 0xffff0000) | ((texture_base[12] >> 16) & 0x0000ffff);
dtde = ((texture_base[8 ] << 16) & 0xffff0000) | (texture_base[12] & 0x0000ffff);
dwde = (texture_base[9 ] & 0xffff0000) | ((texture_base[13] >> 16) & 0x0000ffff);
- dsdy = (texture_base[10] & 0xffff0000) | ((texture_base[14] >> 16) & 0x0000ffff);
- dtdy = ((texture_base[10] << 16) & 0xffff0000) | (texture_base[14] & 0x0000ffff);
- dwdy = (texture_base[11] & 0xffff0000) | ((texture_base[15] >> 16) & 0x0000ffff);
}
if (zbuffer)
{
@@ -360,14 +350,13 @@ void rglTriangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
z = zbuffer_base[0];
dzdx = zbuffer_base[1];
dzde = zbuffer_base[2];
- dzdy = zbuffer_base[3];
}
xh <<= 2; xm <<= 2; xl <<= 2;
r <<= 2; g <<= 2; b <<= 2; a <<= 2;
dsde >>= 2; dtde >>= 2; dsdx >>= 2; dtdx >>= 2;
- dzdx >>= 2; dzde >>= 2; dzdy >>= 2;
- dwdx >>= 2; dwde >>= 2; dwdy >>= 2;
+ dzdx >>= 2; dzde >>= 2;
+ dwdx >>= 2; dwde >>= 2;
// #define tile rdpTiles[tilenum]
diff --git a/src/rgl_osdep.cpp b/src/rgl_osdep.cpp
index c5d3437..3dea9be 100644
--- a/src/rgl_osdep.cpp
+++ b/src/rgl_osdep.cpp
@@ -93,22 +93,3 @@ void rglCloseScreen()
rglClose();
CoreVideo_Quit();
}
-
-EXPORT void CALL ChangeWindow (void)
-{
- if (rglNextStatus == RGL_STATUS_CLOSED || rglStatus == RGL_STATUS_CLOSED)
- return;
- switch (rglStatus) {
- case RGL_STATUS_WINDOWED:
- rglNextStatus = RGL_STATUS_FULLSCREEN;
- break;
- case RGL_STATUS_FULLSCREEN:
- rglNextStatus = RGL_STATUS_WINDOWED;
- break;
- }
- // wanted_fullscreen = !fullscreen;
- // rglCloseScreen();
- // fullscreen = !fullscreen;
- // rglOpenScreen();
-}
-
diff --git a/src/rgl_rendermode.cpp b/src/rgl_rendermode.cpp
index 0c9bf4e..651c127 100644
--- a/src/rgl_rendermode.cpp
+++ b/src/rgl_rendermode.cpp
@@ -167,13 +167,6 @@ void rglSetCombiner(rglRenderChunk_t & chunk, int format)
"0.0", "0.0", "0.0", "0.0"
};
- static const char *sbRGB[] = {
- "c", t1, t2, "p/*PRIM*/",
- "gl_Color", "e", "0.5/*CENTER*/", "t1/*K4*/",
- "0.0", "0.0", "0.0", "0.0",
- "0.0", "0.0", "0.0", "0.0"
- };
-
static const char *mRGB[] = {
"c", t1, t2, "p/*PRIM*/",
"gl_Color/*SHADE*/","e", "0.0/*SCALE*/", "c.a/*COMBINED_A*/",
@@ -214,7 +207,7 @@ void rglSetCombiner(rglRenderChunk_t & chunk, int format)
{ "c/*PREV*/", "f", "b", "fog/*FOG*/" };
const static char * bA[2][4] =
{ {"c.a/*PREVA*/", "fog.a/*FOGA*/", "gl_Color.a/*SHADEA*/", "0.0/*ZERO*/"},
- {_1ma/*"(1.0-c.a/*PREVA)"*/, "0.0/*f.a*//*FRAGA*/", "1.0", "0.0"}}; // need clamping on 1-alpha ?
+ {_1ma/*"(1.0-c.a/ *PREVA)"*/, "0.0/*f.a*//*FRAGA*/", "1.0", "0.0"}}; // need clamping on 1-alpha ?
rdpState_t & state = chunk.rdpState;
@@ -529,9 +522,10 @@ case RGL_COMB_IN1_DEPTH:
const char * blender;
- const char * noblender;
blender = "c = vec4(float(%s)*vec3(%s) + float(%s)*vec3(%s), 1.0); \n";
- noblender = "c.a = 1.0;\n";
+#ifdef RGL_EXACT_BLEND
+ const char * noblender = "c.a = 1.0;\n";
+#endif
int m1b, m1a, m2b, m2a;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-z64.git
More information about the Pkg-games-commits
mailing list