DOS updates for new tree (Daniel Borca)
This commit is contained in:
108
Makefile.DJ
Normal file
108
Makefile.DJ
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# Mesa 3-D graphics library
|
||||||
|
# Version: 4.0
|
||||||
|
#
|
||||||
|
# Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
# DOS/DJGPP makefile v1.4 for Mesa
|
||||||
|
#
|
||||||
|
# Copyright (C) 2002 - Borca Daniel
|
||||||
|
# Email : dborca@yahoo.com
|
||||||
|
# Web : http://www.geocities.com/dborca
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Available options:
|
||||||
|
#
|
||||||
|
# Environment variables:
|
||||||
|
# CPU optimize for the given processor.
|
||||||
|
# default = k6
|
||||||
|
# GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++)
|
||||||
|
# or `mesa'.
|
||||||
|
# default = mesa
|
||||||
|
# GLIDE path to Glide3 SDK include files; used with FX.
|
||||||
|
# default = $(TOP)/include/glide3
|
||||||
|
# FX=1 build for 3dfx Glide3. Note that this disables
|
||||||
|
# compilation of most DMesa code and requires fxMesa.
|
||||||
|
# As a consequence, you'll need the DJGPP Glide3
|
||||||
|
# library to build any application.
|
||||||
|
# default = no
|
||||||
|
# MATROX=1 build for Matrox Millennium I (MGA2064W) cards.
|
||||||
|
# This is experimental and not intensively tested.
|
||||||
|
# default = no
|
||||||
|
# HAVE_X86=1 optimize for i386.
|
||||||
|
# default = no
|
||||||
|
# HAVE_MMX=1 allow MMX specializations, provided your assembler
|
||||||
|
# supports MMX instruction set. However, the true CPU
|
||||||
|
# capabilities are checked at run-time to avoid crashes.
|
||||||
|
# default = no
|
||||||
|
# HAVE_SSE=1 (see HAVE_MMX)
|
||||||
|
# default = no
|
||||||
|
# HAVE_3DNOW=1 (see HAVE_MMX)
|
||||||
|
# default = no
|
||||||
|
#
|
||||||
|
# Targets:
|
||||||
|
# all: build everything
|
||||||
|
# libgl: build GL
|
||||||
|
# libglu: build GLU
|
||||||
|
# libglut: build GLUT
|
||||||
|
# clean: remove object files
|
||||||
|
# realclean: remove all generated files
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY : all libgl libglu libglut clean realclean
|
||||||
|
|
||||||
|
CPU ?= k6
|
||||||
|
|
||||||
|
GLU ?= mesa
|
||||||
|
|
||||||
|
CFLAGS = -Wall -W -pedantic
|
||||||
|
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
|
||||||
|
|
||||||
|
export CFLAGS
|
||||||
|
|
||||||
|
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||||
|
UNLINK = del $(subst /,\,$(1))
|
||||||
|
else
|
||||||
|
UNLINK = $(RM) $(1)
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: libgl libglu libglut
|
||||||
|
|
||||||
|
libgl: lib
|
||||||
|
$(MAKE) -f Makefile.DJ -C src/mesa
|
||||||
|
libglu: lib
|
||||||
|
$(MAKE) -f Makefile.DJ -C src/glu/$(GLU)
|
||||||
|
libglut: lib
|
||||||
|
$(MAKE) -f Makefile.DJ -C src/glut/dos
|
||||||
|
|
||||||
|
lib:
|
||||||
|
mkdir lib
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) -f Makefile.DJ clean -C src/mesa
|
||||||
|
$(MAKE) -f Makefile.DJ clean -C src/glu/mesa
|
||||||
|
$(MAKE) -f Makefile.DJ clean -C src/glu/sgi
|
||||||
|
$(MAKE) -f Makefile.DJ clean -C src/glut/dos
|
||||||
|
|
||||||
|
realclean: clean
|
||||||
|
-$(call UNLINK,lib/*.a)
|
||||||
|
-$(call UNLINK,lib/*.dxe)
|
@@ -1,4 +1,4 @@
|
|||||||
Mesa 5.0.1 DOS/DJGPP Port v1.3
|
Mesa 5.0.1 DOS/DJGPP Port v1.4
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@@ -32,9 +32,9 @@ Available options:
|
|||||||
Environment variables:
|
Environment variables:
|
||||||
CPU optimize for the given processor.
|
CPU optimize for the given processor.
|
||||||
default = k6
|
default = k6
|
||||||
GLU=[src|si] specify GLU directory; can be `src' (src-glu = Mesa)
|
GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++)
|
||||||
or `si' (si-glu = SGI's GLU -- requires GNU/C++).
|
or `mesa'.
|
||||||
default = src
|
default = mesa
|
||||||
GLIDE path to Glide3 SDK include files; used with FX.
|
GLIDE path to Glide3 SDK include files; used with FX.
|
||||||
default = $(TOP)/include/glide3
|
default = $(TOP)/include/glide3
|
||||||
FX=1 build for 3dfx Glide3. Note that this disables
|
FX=1 build for 3dfx Glide3. Note that this disables
|
||||||
@@ -67,11 +67,11 @@ Available options:
|
|||||||
|
|
||||||
|
|
||||||
Tested on:
|
Tested on:
|
||||||
CPU: K6-2 (CXT) @500(412.5) MHz
|
CPU: AMD Duron @800 MHz
|
||||||
Mainboard: ViA Apollo VP2/97 w/ 128 MB SDRAM
|
Mainboard: EP-8KTA3 w/ 128 MB SDRAM
|
||||||
Video card: PowerColor EvilKing3 (Voodoo3 3000 PCI) w/ 16 MB SDRAM
|
Video card: Voodoo5 5500 AGP w/ 64 MB SDRAM
|
||||||
DJGPP: djdev 2.04 + gcc v3.2.2 + make v3.79.1
|
DJGPP: djdev 2.04 + gcc v3.2.2 + make v3.79.1
|
||||||
OS: DOS and Win9x
|
OS: DOS and Win98SE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -97,19 +97,17 @@ FAQ:
|
|||||||
Q) `make' complains about DXE3 or something, yet it builds the libraries.
|
Q) `make' complains about DXE3 or something, yet it builds the libraries.
|
||||||
A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest
|
A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest
|
||||||
DJGPP distro, or download the separate package from my web page. Read the
|
DJGPP distro, or download the separate package from my web page. Read the
|
||||||
DXE3 documentation on how to use them. Hint: build your export object
|
DXE3 documentation on how to use them.
|
||||||
file; then link it with your application. For example:
|
A) When compiling for Glide (FX=1), make sure `glid3.dxe' can be found in
|
||||||
dxe3res -o dxe3tbl.c gl.dxe glu.dxe glut.dxe
|
LD_LIBRARY_PATH (or top `lib' directory).
|
||||||
gcc -o dxe3tbl.o -c dxe3tbl.c
|
|
||||||
gcc -o OUT.exe dxe3tbl.o IN.c -liglut -liglu -ligl -ldl
|
|
||||||
|
|
||||||
2. Using Mesa for DJGPP
|
2. Using Mesa for DJGPP
|
||||||
|
|
||||||
Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better...
|
Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better...
|
||||||
A) Is that a question? If you have a Voodoo3/Banshee card, you're lucky (the
|
A) Is that a question? If you have a 3dfx Voodoo Banshee or higher card,
|
||||||
Glide port is on my web page). If you have a Matrox Millennium I card,
|
you're lucky (check http://sourceforge.net/projects/glide for the DJGPP
|
||||||
you just MIGHT be lucky... If you haven't, sorry; everything is done in
|
port). If you have a Matrox Millennium I card, you just MIGHT be lucky...
|
||||||
software. Suggestions?
|
If you haven't, sorry; everything is done in software. Suggestions?
|
||||||
|
|
||||||
Q) I tried to set refresh rate w/ DMesa, but without success.
|
Q) I tried to set refresh rate w/ DMesa, but without success.
|
||||||
A) Refresh rate control works only for VESA 3.0. If you were compiling for
|
A) Refresh rate control works only for VESA 3.0. If you were compiling for
|
||||||
@@ -215,6 +213,9 @@ v1.3 (mar-2003)
|
|||||||
* revamped GLUT
|
* revamped GLUT
|
||||||
* switched to DXE3
|
* switched to DXE3
|
||||||
|
|
||||||
|
v1.4 (jun-2003)
|
||||||
|
* accomodated makefiles with the new sourcetree
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Contact:
|
Contact:
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
# DOS/DJGPP samples makefile v1.3 for Mesa
|
# DOS/DJGPP samples makefile v1.4 for Mesa
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002 - Borca Daniel
|
# Copyright (C) 2002 - Borca Daniel
|
||||||
# Email : dborca@yahoo.com
|
# Email : dborca@yahoo.com
|
||||||
@@ -40,9 +40,7 @@
|
|||||||
# As a consequence, you'll need the DJGPP Glide3
|
# As a consequence, you'll need the DJGPP Glide3
|
||||||
# library to build any application.
|
# library to build any application.
|
||||||
# default = no
|
# default = no
|
||||||
# DXE=1 use DXE modules. The resolution object file must be
|
# DXE=1 use DXE modules (see README.DJ for details).
|
||||||
# present in the `lib' directory in order to use this
|
|
||||||
# option (see README.DJ for details).
|
|
||||||
# default = no
|
# default = no
|
||||||
#
|
#
|
||||||
# Targets:
|
# Targets:
|
||||||
@@ -54,21 +52,20 @@
|
|||||||
.PHONY : all
|
.PHONY : all
|
||||||
.SUFFIXES : .c .o .exe
|
.SUFFIXES : .c .o .exe
|
||||||
|
|
||||||
TOP = ..
|
TOP = ../..
|
||||||
CPU ?= k6
|
CPU ?= k6
|
||||||
GLIDE ?= $(TOP)/lib/glide3
|
GLIDE ?= $(TOP)/lib/glide3
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -Wall -W -pedantic
|
CFLAGS = -Wall -W -pedantic
|
||||||
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
|
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
|
||||||
CFLAGS += -I$(TOP)/include
|
CFLAGS += -I$(TOP)/include -I../util
|
||||||
|
|
||||||
LD = gxx
|
LD = gxx
|
||||||
LDFLAGS = -s -L$(TOP)/lib
|
LDFLAGS = -s -L$(TOP)/lib
|
||||||
|
|
||||||
ifeq ($(DXE),1)
|
ifeq ($(DXE),1)
|
||||||
DXE3TABLE = $(TOP)/lib/dxe3tbl.o
|
LDLIBS += -liglut -liglu -ligl
|
||||||
LDLIBS += -liglut -liglu -ligl -ldl
|
|
||||||
else
|
else
|
||||||
LDLIBS = -lglut -lglu -lgl
|
LDLIBS = -lglut -lglu -lgl
|
||||||
ifeq ($(FX),1)
|
ifeq ($(FX),1)
|
||||||
@@ -80,7 +77,7 @@ endif
|
|||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -o $@ $(CFLAGS) -c $<
|
$(CC) -o $@ $(CFLAGS) -c $<
|
||||||
.o.exe:
|
.o.exe:
|
||||||
$(LD) -o $@ $(LDFLAGS) $(DXE3TABLE) $< $(LDLIBS)
|
$(LD) -o $@ $(LDFLAGS) $< $(LDLIBS)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(error Must specify <filename.exe> to build)
|
$(error Must specify <filename.exe> to build)
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
# DOS/DJGPP glu makefile v1.3 for Mesa
|
# DOS/DJGPP glu makefile v1.4 for Mesa
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002 - Borca Daniel
|
# Copyright (C) 2002 - Borca Daniel
|
||||||
# Email : dborca@yahoo.com
|
# Email : dborca@yahoo.com
|
||||||
@@ -42,12 +42,14 @@
|
|||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
TOP = ..
|
TOP = ../../..
|
||||||
LIBDIR = $(TOP)/lib
|
LIBDIR = $(TOP)/lib
|
||||||
GLU_LIB = libglu.a
|
GLU_LIB = libglu.a
|
||||||
GLU_DXE = glu.dxe
|
GLU_DXE = glu.dxe
|
||||||
GLU_IMP = libiglu.a
|
GLU_IMP = libiglu.a
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS += -I$(TOP)/include
|
CFLAGS += -I$(TOP)/include
|
||||||
|
|
||||||
@@ -91,7 +93,7 @@ $(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP): $(OBJECTS)
|
|||||||
ifeq ($(HAVEDXE3),)
|
ifeq ($(HAVEDXE3),)
|
||||||
$(warning Missing DXE3 package... Skipping $(GLU_DXE))
|
$(warning Missing DXE3 package... Skipping $(GLU_DXE))
|
||||||
else
|
else
|
||||||
-dxe3gen -o $(LIBDIR)/$(GLU_DXE) -I $(LIBDIR)/$(GLU_IMP) -D "MesaGLU DJGPP" -E _glu -P gl.dxe -U $(OBJECTS)
|
-dxe3gen -o $(LIBDIR)/$(GLU_DXE) -Y $(LIBDIR)/$(GLU_IMP) -D "MesaGLU DJGPP" -E _glu -P gl.dxe -U $(OBJECTS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
# DOS/DJGPP glu makefile v1.3 for Mesa
|
# DOS/DJGPP glu makefile v1.4 for Mesa
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002 - Borca Daniel
|
# Copyright (C) 2002 - Borca Daniel
|
||||||
# Email : dborca@yahoo.com
|
# Email : dborca@yahoo.com
|
||||||
@@ -42,12 +42,14 @@
|
|||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
TOP = ..
|
TOP = ../../..
|
||||||
LIBDIR = $(TOP)/lib
|
LIBDIR = $(TOP)/lib
|
||||||
GLU_LIB = libglu.a
|
GLU_LIB = libglu.a
|
||||||
GLU_DXE = glu.dxe
|
GLU_DXE = glu.dxe
|
||||||
GLU_IMP = libiglu.a
|
GLU_IMP = libiglu.a
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -Iinclude
|
CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -Iinclude
|
||||||
CXX = gpp
|
CXX = gpp
|
||||||
@@ -175,7 +177,7 @@ $(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP): $(OBJECTS)
|
|||||||
ifeq ($(HAVEDXE3),)
|
ifeq ($(HAVEDXE3),)
|
||||||
$(warning Missing DXE3 package... Skipping $(GLU_DXE))
|
$(warning Missing DXE3 package... Skipping $(GLU_DXE))
|
||||||
else
|
else
|
||||||
-dxe3gen -o $(LIBDIR)/$(GLU_DXE) -I $(LIBDIR)/$(GLU_IMP) -D "MesaGLU/SGI DJGPP" -E _glu -P gl.dxe -U $(OBJECTS)
|
-dxe3gen -o $(LIBDIR)/$(GLU_DXE) -Y $(LIBDIR)/$(GLU_IMP) -D "MesaGLU/SGI DJGPP" -E _glu -P gl.dxe -U $(OBJECTS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
# DOS/DJGPP glut makefile v1.3 for Mesa
|
# DOS/DJGPP glut makefile v1.4 for Mesa
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002 - Borca Daniel
|
# Copyright (C) 2002 - Borca Daniel
|
||||||
# Email : dborca@yahoo.com
|
# Email : dborca@yahoo.com
|
||||||
@@ -45,14 +45,16 @@
|
|||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
TOP = ..
|
TOP = ../../..
|
||||||
GLIDE ?= $(TOP)/include/glide3
|
GLIDE ?= $(TOP)/include/glide3
|
||||||
MKGLUT ?= $(TOP)/src-glut
|
MKGLUT ?= $(TOP)/src/glut/glx
|
||||||
LIBDIR = $(TOP)/lib
|
LIBDIR = $(TOP)/lib
|
||||||
GLUT_LIB = libglut.a
|
GLUT_LIB = libglut.a
|
||||||
GLUT_DXE = glut.dxe
|
GLUT_DXE = glut.dxe
|
||||||
GLUT_IMP = libiglut.a
|
GLUT_IMP = libiglut.a
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS += -I- -I$(TOP)/include -I. -I$(MKGLUT) -IPC_HW
|
CFLAGS += -I- -I$(TOP)/include -I. -I$(MKGLUT) -IPC_HW
|
||||||
|
|
||||||
@@ -123,7 +125,7 @@ $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS)
|
|||||||
ifeq ($(HAVEDXE3),)
|
ifeq ($(HAVEDXE3),)
|
||||||
$(warning Missing DXE3 package... Skipping $(GLUT_DXE))
|
$(warning Missing DXE3 package... Skipping $(GLUT_DXE))
|
||||||
else
|
else
|
||||||
-dxe3gen -o $(LIBDIR)/$(GLUT_DXE) -I $(LIBDIR)/$(GLUT_IMP) -D "MesaGLUT DJGPP" -E _glut -P gl.dxe -P glu.dxe -U $(OBJECTS)
|
-dxe3gen -o $(LIBDIR)/$(GLUT_DXE) -Y $(LIBDIR)/$(GLUT_IMP) -D "MesaGLUT DJGPP" -E _glut -P gl.dxe -P glu.dxe -U $(OBJECTS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
# DOS/DJGPP core makefile v1.3 for Mesa
|
# DOS/DJGPP core makefile v1.4 for Mesa
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002 - Borca Daniel
|
# Copyright (C) 2002 - Borca Daniel
|
||||||
# Email : dborca@yahoo.com
|
# Email : dborca@yahoo.com
|
||||||
@@ -62,17 +62,19 @@
|
|||||||
|
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
.INTERMEDIATE: X86/gen_matypes.exe
|
.INTERMEDIATE: x86/gen_matypes.exe
|
||||||
|
|
||||||
TOP = ..
|
TOP = ../..
|
||||||
GLIDE ?= $(TOP)/include/glide3
|
GLIDE ?= $(TOP)/include/glide3
|
||||||
LIBDIR = $(TOP)/lib
|
LIBDIR = $(TOP)/lib
|
||||||
GL_LIB = libgl.a
|
GL_LIB = libgl.a
|
||||||
GL_DXE = gl.dxe
|
GL_DXE = gl.dxe
|
||||||
GL_IMP = libigl.a
|
GL_IMP = libigl.a
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS += -I$(TOP)/include -I.
|
CFLAGS += -I$(TOP)/include -I. -Imain -Iglapi
|
||||||
ifeq ($(FX),1)
|
ifeq ($(FX),1)
|
||||||
CFLAGS += -D__DOS__ -DH3
|
CFLAGS += -D__DOS__ -DH3
|
||||||
CFLAGS += -I$(GLIDE) -DFX -DFX_GLIDE3 -DFXMESA_USE_ARGB
|
CFLAGS += -I$(GLIDE) -DFX -DFX_GLIDE3 -DFXMESA_USE_ARGB
|
||||||
@@ -97,62 +99,67 @@ else
|
|||||||
UNLINK = $(RM) $(1)
|
UNLINK = $(RM) $(1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CORE_SOURCES = \
|
MAIN_SOURCES = \
|
||||||
api_arrayelt.c \
|
main/api_arrayelt.c \
|
||||||
api_loopback.c \
|
main/api_loopback.c \
|
||||||
api_noop.c \
|
main/api_noop.c \
|
||||||
api_validate.c \
|
main/api_validate.c \
|
||||||
accum.c \
|
main/accum.c \
|
||||||
arbprogram.c \
|
main/arbprogram.c \
|
||||||
attrib.c \
|
main/attrib.c \
|
||||||
blend.c \
|
main/blend.c \
|
||||||
bufferobj.c \
|
main/bufferobj.c \
|
||||||
buffers.c \
|
main/buffers.c \
|
||||||
clip.c \
|
main/clip.c \
|
||||||
colortab.c \
|
main/colortab.c \
|
||||||
context.c \
|
main/context.c \
|
||||||
convolve.c \
|
main/convolve.c \
|
||||||
debug.c \
|
main/debug.c \
|
||||||
depth.c \
|
main/depth.c \
|
||||||
dispatch.c \
|
main/dispatch.c \
|
||||||
dlist.c \
|
main/dlist.c \
|
||||||
drawpix.c \
|
main/drawpix.c \
|
||||||
enable.c \
|
main/enable.c \
|
||||||
enums.c \
|
main/enums.c \
|
||||||
eval.c \
|
main/eval.c \
|
||||||
extensions.c \
|
main/extensions.c \
|
||||||
feedback.c \
|
main/feedback.c \
|
||||||
fog.c \
|
main/fog.c \
|
||||||
get.c \
|
main/get.c \
|
||||||
glapi.c \
|
main/hash.c \
|
||||||
glthread.c \
|
main/hint.c \
|
||||||
hash.c \
|
main/histogram.c \
|
||||||
hint.c \
|
main/image.c \
|
||||||
histogram.c \
|
main/imports.c \
|
||||||
image.c \
|
main/light.c \
|
||||||
imports.c \
|
main/lines.c \
|
||||||
light.c \
|
main/matrix.c \
|
||||||
lines.c \
|
main/nvprogram.c \
|
||||||
matrix.c \
|
main/nvfragparse.c \
|
||||||
mmath.c \
|
main/nvvertexec.c \
|
||||||
pixel.c \
|
main/nvvertparse.c \
|
||||||
points.c \
|
main/occlude.c \
|
||||||
polygon.c \
|
main/pixel.c \
|
||||||
rastpos.c \
|
main/points.c \
|
||||||
state.c \
|
main/polygon.c \
|
||||||
stencil.c \
|
main/rastpos.c \
|
||||||
texcompress.c \
|
main/state.c \
|
||||||
texformat.c \
|
main/stencil.c \
|
||||||
teximage.c \
|
main/texcompress.c \
|
||||||
texobj.c \
|
main/texformat.c \
|
||||||
texstate.c \
|
main/teximage.c \
|
||||||
texstore.c \
|
main/texobj.c \
|
||||||
texutil.c \
|
main/texstate.c \
|
||||||
varray.c \
|
main/texstore.c \
|
||||||
vpexec.c \
|
main/texutil.c \
|
||||||
vpparse.c \
|
main/varray.c \
|
||||||
vpstate.c \
|
main/vtxfmt.c
|
||||||
vtxfmt.c \
|
|
||||||
|
GLAPI_SOURCES = \
|
||||||
|
glapi/glapi.c \
|
||||||
|
glapi/glthread.c
|
||||||
|
|
||||||
|
MATH_SOURCES = \
|
||||||
math/m_debug_clip.c \
|
math/m_debug_clip.c \
|
||||||
math/m_debug_norm.c \
|
math/m_debug_norm.c \
|
||||||
math/m_debug_xform.c \
|
math/m_debug_xform.c \
|
||||||
@@ -160,9 +167,13 @@ CORE_SOURCES = \
|
|||||||
math/m_matrix.c \
|
math/m_matrix.c \
|
||||||
math/m_translate.c \
|
math/m_translate.c \
|
||||||
math/m_vector.c \
|
math/m_vector.c \
|
||||||
math/m_xform.c \
|
math/m_xform.c
|
||||||
|
|
||||||
|
ARRAY_CACHE_SOURCES = \
|
||||||
array_cache/ac_context.c \
|
array_cache/ac_context.c \
|
||||||
array_cache/ac_import.c \
|
array_cache/ac_import.c
|
||||||
|
|
||||||
|
SWRAST_SOURCES = \
|
||||||
swrast/s_aaline.c \
|
swrast/s_aaline.c \
|
||||||
swrast/s_aatriangle.c \
|
swrast/s_aatriangle.c \
|
||||||
swrast/s_accum.c \
|
swrast/s_accum.c \
|
||||||
@@ -177,11 +188,11 @@ CORE_SOURCES = \
|
|||||||
swrast/s_drawpix.c \
|
swrast/s_drawpix.c \
|
||||||
swrast/s_feedback.c \
|
swrast/s_feedback.c \
|
||||||
swrast/s_fog.c \
|
swrast/s_fog.c \
|
||||||
swrast/s_histogram.c \
|
|
||||||
swrast/s_imaging.c \
|
swrast/s_imaging.c \
|
||||||
swrast/s_lines.c \
|
swrast/s_lines.c \
|
||||||
swrast/s_logic.c \
|
swrast/s_logic.c \
|
||||||
swrast/s_masking.c \
|
swrast/s_masking.c \
|
||||||
|
swrast/s_nvfragprog.c \
|
||||||
swrast/s_pixeltex.c \
|
swrast/s_pixeltex.c \
|
||||||
swrast/s_points.c \
|
swrast/s_points.c \
|
||||||
swrast/s_readpix.c \
|
swrast/s_readpix.c \
|
||||||
@@ -190,10 +201,14 @@ CORE_SOURCES = \
|
|||||||
swrast/s_texture.c \
|
swrast/s_texture.c \
|
||||||
swrast/s_texstore.c \
|
swrast/s_texstore.c \
|
||||||
swrast/s_triangle.c \
|
swrast/s_triangle.c \
|
||||||
swrast/s_zoom.c \
|
swrast/s_zoom.c
|
||||||
|
|
||||||
|
SWRAST_SETUP_SOURCES = \
|
||||||
swrast_setup/ss_context.c \
|
swrast_setup/ss_context.c \
|
||||||
swrast_setup/ss_triangle.c \
|
swrast_setup/ss_triangle.c \
|
||||||
swrast_setup/ss_vb.c \
|
swrast_setup/ss_vb.c
|
||||||
|
|
||||||
|
TNL_SOURCES = \
|
||||||
tnl/t_array_api.c \
|
tnl/t_array_api.c \
|
||||||
tnl/t_array_import.c \
|
tnl/t_array_import.c \
|
||||||
tnl/t_context.c \
|
tnl/t_context.c \
|
||||||
@@ -218,31 +233,40 @@ CORE_SOURCES = \
|
|||||||
tnl/t_vb_vertex.c
|
tnl/t_vb_vertex.c
|
||||||
|
|
||||||
X86_SOURCES = \
|
X86_SOURCES = \
|
||||||
X86/x86.c \
|
x86/x86.c \
|
||||||
X86/glapi_x86.S \
|
x86/glapi_x86.S \
|
||||||
X86/common_x86.c \
|
x86/common_x86.c \
|
||||||
X86/common_x86_asm.S \
|
x86/common_x86_asm.S \
|
||||||
X86/x86_xform2.S \
|
x86/x86_xform2.S \
|
||||||
X86/x86_xform3.S \
|
x86/x86_xform3.S \
|
||||||
X86/x86_xform4.S \
|
x86/x86_xform4.S \
|
||||||
X86/x86_cliptest.S
|
x86/x86_cliptest.S
|
||||||
|
|
||||||
MMX_SOURCES = \
|
MMX_SOURCES = \
|
||||||
X86/mmx_blend.S
|
x86/mmx_blend.S
|
||||||
|
|
||||||
SSE_SOURCES = \
|
SSE_SOURCES = \
|
||||||
X86/sse.c \
|
x86/sse.c \
|
||||||
X86/sse_xform2.S \
|
x86/sse_xform2.S \
|
||||||
X86/sse_xform3.S \
|
x86/sse_xform3.S \
|
||||||
X86/sse_xform4.S \
|
x86/sse_xform4.S \
|
||||||
X86/sse_normal.S
|
x86/sse_normal.S
|
||||||
|
|
||||||
K3D_SOURCES = \
|
K3D_SOURCES = \
|
||||||
X86/3dnow.c \
|
x86/3dnow.c \
|
||||||
X86/3dnow_xform2.S \
|
x86/3dnow_xform2.S \
|
||||||
X86/3dnow_xform3.S \
|
x86/3dnow_xform3.S \
|
||||||
X86/3dnow_xform4.S \
|
x86/3dnow_xform4.S \
|
||||||
X86/3dnow_normal.S
|
x86/3dnow_normal.S
|
||||||
|
|
||||||
|
CORE_SOURCES = \
|
||||||
|
$(MAIN_SOURCES) \
|
||||||
|
$(GLAPI_SOURCES) \
|
||||||
|
$(MATH_SOURCES) \
|
||||||
|
$(ARRAY_CACHE_SOURCES) \
|
||||||
|
$(SWRAST_SOURCES) \
|
||||||
|
$(SWRAST_SETUP_SOURCES) \
|
||||||
|
$(TNL_SOURCES)
|
||||||
|
|
||||||
ifeq ($(HAVE_MMX),1)
|
ifeq ($(HAVE_MMX),1)
|
||||||
X86_SOURCES += $(MMX_SOURCES)
|
X86_SOURCES += $(MMX_SOURCES)
|
||||||
@@ -266,33 +290,33 @@ X86_SOURCES =
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
DRIVER_SOURCES = \
|
DRIVER_SOURCES = \
|
||||||
DOS/dmesa.c
|
drivers/dos/dmesa.c
|
||||||
ifeq ($(FX),1)
|
ifeq ($(FX),1)
|
||||||
DRIVER_SOURCES += \
|
DRIVER_SOURCES += \
|
||||||
FX/fxapi.c \
|
drivers/glide/fxapi.c \
|
||||||
FX/fxdd.c \
|
drivers/glide/fxdd.c \
|
||||||
FX/fxddspan.c \
|
drivers/glide/fxddspan.c \
|
||||||
FX/fxddtex.c \
|
drivers/glide/fxddtex.c \
|
||||||
FX/fxsetup.c \
|
drivers/glide/fxsetup.c \
|
||||||
FX/fxtexman.c \
|
drivers/glide/fxtexman.c \
|
||||||
FX/fxtris.c \
|
drivers/glide/fxtris.c \
|
||||||
FX/fxvb.c \
|
drivers/glide/fxvb.c \
|
||||||
FX/fxglidew.c
|
drivers/glide/fxglidew.c
|
||||||
else
|
else
|
||||||
ifeq ($(MATROX),1)
|
ifeq ($(MATROX),1)
|
||||||
DRIVER_SOURCES += \
|
DRIVER_SOURCES += \
|
||||||
DOS/mga/mga.c \
|
drivers/dos/mga/mga.c \
|
||||||
DOS/mga/mga_hw.c \
|
drivers/dos/mga/mga_hw.c \
|
||||||
DOS/mga/mga_mode.c \
|
drivers/dos/mga/mga_mode.c \
|
||||||
DOS/dpmi.c
|
drivers/dos/dpmi.c
|
||||||
else
|
else
|
||||||
DRIVER_SOURCES += \
|
DRIVER_SOURCES += \
|
||||||
DOS/video.c \
|
drivers/dos/video.c \
|
||||||
DOS/virtual.S \
|
drivers/dos/virtual.S \
|
||||||
DOS/vesa.c \
|
drivers/dos/vesa.c \
|
||||||
DOS/blit.S \
|
drivers/dos/blit.S \
|
||||||
DOS/vga.c \
|
drivers/dos/vga.c \
|
||||||
DOS/dpmi.c
|
drivers/dos/dpmi.c
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -319,30 +343,31 @@ ifeq ($(HAVEDXE3),)
|
|||||||
$(warning Missing DXE3 package... Skipping $(GL_DXE))
|
$(warning Missing DXE3 package... Skipping $(GL_DXE))
|
||||||
else
|
else
|
||||||
ifeq ($(FX),1)
|
ifeq ($(FX),1)
|
||||||
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glid3.dxe -U $(OBJECTS)
|
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glid3.dxe -U $(OBJECTS)
|
||||||
else
|
else
|
||||||
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $(OBJECTS)
|
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $(OBJECTS)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(X86_OBJECTS): X86/matypes.h
|
$(X86_OBJECTS): x86/matypes.h
|
||||||
|
|
||||||
X86/matypes.h: X86/gen_matypes.exe
|
x86/matypes.h: x86/gen_matypes.exe
|
||||||
$< > $@
|
$< > $@
|
||||||
|
|
||||||
X86/gen_matypes.exe: X86/gen_matypes.c
|
x86/gen_matypes.exe: x86/gen_matypes.c
|
||||||
$(CC) -o $@ $(CFLAGS) -s $<
|
$(CC) -o $@ $(CFLAGS) -s $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-$(call UNLINK,*.o)
|
|
||||||
-$(call UNLINK,array_cache/*.o)
|
-$(call UNLINK,array_cache/*.o)
|
||||||
|
-$(call UNLINK,glapi/*.o)
|
||||||
|
-$(call UNLINK,main/*.o)
|
||||||
-$(call UNLINK,math/*.o)
|
-$(call UNLINK,math/*.o)
|
||||||
-$(call UNLINK,swrast/*.o)
|
-$(call UNLINK,swrast/*.o)
|
||||||
-$(call UNLINK,swrast_setup/*.o)
|
-$(call UNLINK,swrast_setup/*.o)
|
||||||
-$(call UNLINK,tnl/*.o)
|
-$(call UNLINK,tnl/*.o)
|
||||||
-$(call UNLINK,X86/*.o)
|
-$(call UNLINK,x86/*.o)
|
||||||
-$(call UNLINK,DOS/*.o)
|
-$(call UNLINK,drivers/dos/*.o)
|
||||||
-$(call UNLINK,DOS/mga/*.o)
|
-$(call UNLINK,drivers/dos/mga/*.o)
|
||||||
-$(call UNLINK,FX/*.o)
|
-$(call UNLINK,drivers/glide/*.o)
|
||||||
|
|
||||||
-include depend
|
-include depend
|
@@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DOS/DJGPP device driver v1.3 for Mesa
|
* DOS/DJGPP device driver v1.4 for Mesa
|
||||||
*
|
*
|
||||||
* Copyright (c) 2003 - Borca Daniel
|
* Copyright (c) 2003 - Borca Daniel
|
||||||
* Email : dborca@yahoo.com
|
* Email : dborca@yahoo.com
|
||||||
@@ -37,15 +37,16 @@
|
|||||||
#include "extensions.h"
|
#include "extensions.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "mmath.h"
|
#include "mtypes.h"
|
||||||
#include "texformat.h"
|
#include "texformat.h"
|
||||||
|
#include "teximage.h"
|
||||||
#include "texstore.h"
|
#include "texstore.h"
|
||||||
|
#include "imports.h"
|
||||||
#include "array_cache/acache.h"
|
#include "array_cache/acache.h"
|
||||||
#include "swrast/s_context.h"
|
#include "swrast/s_context.h"
|
||||||
#include "swrast/s_depth.h"
|
#include "swrast/s_depth.h"
|
||||||
#include "swrast/s_lines.h"
|
#include "swrast/s_lines.h"
|
||||||
#include "swrast/s_triangle.h"
|
#include "swrast/s_triangle.h"
|
||||||
#include "swrast/s_trispan.h"
|
|
||||||
#include "swrast/swrast.h"
|
#include "swrast/swrast.h"
|
||||||
#include "swrast_setup/swrast_setup.h"
|
#include "swrast_setup/swrast_setup.h"
|
||||||
#include "tnl/tnl.h"
|
#include "tnl/tnl.h"
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
#include "mga/mga.h"
|
#include "mga/mga.h"
|
||||||
#endif /* MATROX */
|
#endif /* MATROX */
|
||||||
#else /* FX */
|
#else /* FX */
|
||||||
#include "../FX/fxdrv.h"
|
#include "../glide/fxdrv.h"
|
||||||
#endif /* FX */
|
#endif /* FX */
|
||||||
|
|
||||||
#include "GL/dmesa.h"
|
#include "GL/dmesa.h"
|
||||||
@@ -568,17 +569,15 @@ static void read_depth_pixels (GLcontext *ctx, GLuint n,
|
|||||||
/*
|
/*
|
||||||
* NON-depth-buffered flat triangle.
|
* NON-depth-buffered flat triangle.
|
||||||
*/
|
*/
|
||||||
static void tri_rgb_flat (GLcontext *ctx,
|
|
||||||
const SWvertex *v0,
|
|
||||||
const SWvertex *v1,
|
|
||||||
const SWvertex *v2)
|
|
||||||
{
|
|
||||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
|
||||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
|
||||||
#ifndef MATROX
|
#ifndef MATROX
|
||||||
GLuint _w_ = dmesa->Buffer->width;
|
|
||||||
|
|
||||||
#define SETUP_CODE GLuint rgb = vl_mixrgb(v2->color);
|
#define NAME tri_rgb_flat
|
||||||
|
|
||||||
|
#define SETUP_CODE \
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||||
|
GLuint _w_ = dmesa->Buffer->width; \
|
||||||
|
GLuint rgb = vl_mixrgb(v2->color);
|
||||||
|
|
||||||
#define RENDER_SPAN(span) \
|
#define RENDER_SPAN(span) \
|
||||||
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
||||||
@@ -587,7 +586,16 @@ static void tri_rgb_flat (GLcontext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "swrast/s_tritemp.h"
|
#include "swrast/s_tritemp.h"
|
||||||
|
|
||||||
#else /* MATROX */
|
#else /* MATROX */
|
||||||
|
|
||||||
|
static void tri_rgb_flat (GLcontext *ctx,
|
||||||
|
const SWvertex *v0,
|
||||||
|
const SWvertex *v1,
|
||||||
|
const SWvertex *v2)
|
||||||
|
{
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||||
MGAvertex m0, m1, m2;
|
MGAvertex m0, m1, m2;
|
||||||
m0.win[0] = v0->win[0];
|
m0.win[0] = v0->win[0];
|
||||||
m0.win[1] = FLIP2(v0->win[1]);
|
m0.win[1] = FLIP2(v0->win[1]);
|
||||||
@@ -597,27 +605,26 @@ static void tri_rgb_flat (GLcontext *ctx,
|
|||||||
m2.win[1] = FLIP2(v2->win[1]);
|
m2.win[1] = FLIP2(v2->win[1]);
|
||||||
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
||||||
mga_draw_tri_rgb_flat((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
mga_draw_tri_rgb_flat((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
||||||
#endif /* MATROX */
|
|
||||||
}
|
}
|
||||||
|
#endif /* MATROX */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Z-less flat triangle.
|
* Z-less flat triangle.
|
||||||
*/
|
*/
|
||||||
static void tri_rgb_flat_zless (GLcontext *ctx,
|
|
||||||
const SWvertex *v0,
|
|
||||||
const SWvertex *v1,
|
|
||||||
const SWvertex *v2)
|
|
||||||
{
|
|
||||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
|
||||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
|
||||||
#ifndef MATROX
|
#ifndef MATROX
|
||||||
GLuint _w_ = dmesa->Buffer->width;
|
|
||||||
|
#define NAME tri_rgb_flat_zless
|
||||||
|
|
||||||
#define INTERP_Z 1
|
#define INTERP_Z 1
|
||||||
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
||||||
#define SETUP_CODE GLuint rgb = vl_mixrgb(v2->color);
|
|
||||||
|
#define SETUP_CODE \
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||||
|
GLuint _w_ = dmesa->Buffer->width; \
|
||||||
|
GLuint rgb = vl_mixrgb(v2->color);
|
||||||
|
|
||||||
#define RENDER_SPAN(span) \
|
#define RENDER_SPAN(span) \
|
||||||
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
||||||
@@ -631,7 +638,16 @@ static void tri_rgb_flat_zless (GLcontext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "swrast/s_tritemp.h"
|
#include "swrast/s_tritemp.h"
|
||||||
|
|
||||||
#else /* MATROX */
|
#else /* MATROX */
|
||||||
|
|
||||||
|
static void tri_rgb_flat_zless (GLcontext *ctx,
|
||||||
|
const SWvertex *v0,
|
||||||
|
const SWvertex *v1,
|
||||||
|
const SWvertex *v2)
|
||||||
|
{
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||||
MGAvertex m0, m1, m2;
|
MGAvertex m0, m1, m2;
|
||||||
m0.win[0] = v0->win[0];
|
m0.win[0] = v0->win[0];
|
||||||
m0.win[1] = FLIP2(v0->win[1]);
|
m0.win[1] = FLIP2(v0->win[1]);
|
||||||
@@ -644,25 +660,25 @@ static void tri_rgb_flat_zless (GLcontext *ctx,
|
|||||||
m2.win[2] = v2->win[2];
|
m2.win[2] = v2->win[2];
|
||||||
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
||||||
mga_draw_tri_rgb_flat_zless((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
mga_draw_tri_rgb_flat_zless((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
||||||
#endif /* MATROX */
|
|
||||||
}
|
}
|
||||||
|
#endif /* MATROX */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NON-depth-buffered iterated triangle.
|
* NON-depth-buffered iterated triangle.
|
||||||
*/
|
*/
|
||||||
static void tri_rgb_iter (GLcontext *ctx,
|
|
||||||
const SWvertex *v0,
|
|
||||||
const SWvertex *v1,
|
|
||||||
const SWvertex *v2)
|
|
||||||
{
|
|
||||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
|
||||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
|
||||||
#ifndef MATROX
|
#ifndef MATROX
|
||||||
GLuint _w_ = dmesa->Buffer->width;
|
|
||||||
|
#define NAME tri_rgb_iter
|
||||||
|
|
||||||
#define INTERP_RGB 1
|
#define INTERP_RGB 1
|
||||||
|
|
||||||
|
#define SETUP_CODE \
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||||
|
GLuint _w_ = dmesa->Buffer->width;
|
||||||
|
|
||||||
#define RENDER_SPAN(span) \
|
#define RENDER_SPAN(span) \
|
||||||
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
||||||
for (i = 0; i < span.end; i++, offset++) { \
|
for (i = 0; i < span.end; i++, offset++) { \
|
||||||
@@ -673,7 +689,16 @@ static void tri_rgb_iter (GLcontext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "swrast/s_tritemp.h"
|
#include "swrast/s_tritemp.h"
|
||||||
|
|
||||||
#else /* MATROX */
|
#else /* MATROX */
|
||||||
|
|
||||||
|
static void tri_rgb_iter (GLcontext *ctx,
|
||||||
|
const SWvertex *v0,
|
||||||
|
const SWvertex *v1,
|
||||||
|
const SWvertex *v2)
|
||||||
|
{
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||||
MGAvertex m0, m1, m2;
|
MGAvertex m0, m1, m2;
|
||||||
m0.win[0] = v0->win[0];
|
m0.win[0] = v0->win[0];
|
||||||
m0.win[1] = FLIP2(v0->win[1]);
|
m0.win[1] = FLIP2(v0->win[1]);
|
||||||
@@ -685,28 +710,27 @@ static void tri_rgb_iter (GLcontext *ctx,
|
|||||||
*(unsigned long *)m1.color = *(unsigned long *)v1->color;
|
*(unsigned long *)m1.color = *(unsigned long *)v1->color;
|
||||||
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
||||||
mga_draw_tri_rgb_iter((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
mga_draw_tri_rgb_iter((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
||||||
#endif /* MATROX */
|
|
||||||
}
|
}
|
||||||
|
#endif /* MATROX */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Z-less iterated triangle.
|
* Z-less iterated triangle.
|
||||||
*/
|
*/
|
||||||
static void tri_rgb_iter_zless (GLcontext *ctx,
|
|
||||||
const SWvertex *v0,
|
|
||||||
const SWvertex *v1,
|
|
||||||
const SWvertex *v2)
|
|
||||||
{
|
|
||||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
|
||||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
|
||||||
#ifndef MATROX
|
#ifndef MATROX
|
||||||
GLuint _w_ = dmesa->Buffer->width;
|
|
||||||
|
#define NAME tri_rgb_iter_zless
|
||||||
|
|
||||||
#define INTERP_Z 1
|
#define INTERP_Z 1
|
||||||
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
||||||
#define INTERP_RGB 1
|
#define INTERP_RGB 1
|
||||||
|
|
||||||
|
#define SETUP_CODE \
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||||
|
GLuint _w_ = dmesa->Buffer->width;
|
||||||
|
|
||||||
#define RENDER_SPAN(span) \
|
#define RENDER_SPAN(span) \
|
||||||
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
||||||
for (i = 0; i < span.end; i++, offset++) { \
|
for (i = 0; i < span.end; i++, offset++) { \
|
||||||
@@ -722,7 +746,16 @@ static void tri_rgb_iter_zless (GLcontext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "swrast/s_tritemp.h"
|
#include "swrast/s_tritemp.h"
|
||||||
|
|
||||||
#else /* MATROX */
|
#else /* MATROX */
|
||||||
|
|
||||||
|
static void tri_rgb_iter_zless (GLcontext *ctx,
|
||||||
|
const SWvertex *v0,
|
||||||
|
const SWvertex *v1,
|
||||||
|
const SWvertex *v2)
|
||||||
|
{
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||||
MGAvertex m0, m1, m2;
|
MGAvertex m0, m1, m2;
|
||||||
m0.win[0] = v0->win[0];
|
m0.win[0] = v0->win[0];
|
||||||
m0.win[1] = FLIP2(v0->win[1]);
|
m0.win[1] = FLIP2(v0->win[1]);
|
||||||
@@ -737,8 +770,8 @@ static void tri_rgb_iter_zless (GLcontext *ctx,
|
|||||||
*(unsigned long *)m1.color = *(unsigned long *)v1->color;
|
*(unsigned long *)m1.color = *(unsigned long *)v1->color;
|
||||||
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
||||||
mga_draw_tri_rgb_iter_zless((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
mga_draw_tri_rgb_iter_zless((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
||||||
#endif /* MATROX */
|
|
||||||
}
|
}
|
||||||
|
#endif /* MATROX */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -826,48 +859,58 @@ static __inline void matrox_line_clip_hack (GLcontext *ctx, int _b_, MGAvertex *
|
|||||||
/*
|
/*
|
||||||
* NON-depth-buffered flat line.
|
* NON-depth-buffered flat line.
|
||||||
*/
|
*/
|
||||||
|
#ifndef MATROX
|
||||||
|
|
||||||
|
#define NAME line_rgb_flat
|
||||||
|
|
||||||
|
#define INTERP_XY 1
|
||||||
|
#define CLIP_HACK 1
|
||||||
|
|
||||||
|
#define SETUP_CODE \
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||||
|
GLuint _w_ = dmesa->Buffer->width; \
|
||||||
|
GLuint rgb = vl_mixrgb(vert1->color);
|
||||||
|
|
||||||
|
#define PLOT(X,Y) vl_putpixel(FLIP2(Y) * _w_ + X, rgb);
|
||||||
|
|
||||||
|
#include "swrast/s_linetemp.h"
|
||||||
|
|
||||||
|
#else /* MATROX */
|
||||||
|
|
||||||
static void line_rgb_flat (GLcontext *ctx,
|
static void line_rgb_flat (GLcontext *ctx,
|
||||||
const SWvertex *vert0,
|
const SWvertex *vert0,
|
||||||
const SWvertex *vert1)
|
const SWvertex *vert1)
|
||||||
{
|
{
|
||||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||||
#ifndef MATROX
|
|
||||||
GLuint _w_ = dmesa->Buffer->width;
|
|
||||||
GLuint rgb = vl_mixrgb(vert1->color);
|
|
||||||
|
|
||||||
#define INTERP_XY 1
|
|
||||||
#define CLIP_HACK 1
|
|
||||||
#define PLOT(X,Y) vl_putpixel(FLIP2(Y) * _w_ + X, rgb);
|
|
||||||
|
|
||||||
#include "swrast/s_linetemp.h"
|
|
||||||
#else
|
|
||||||
MGAvertex m0, m1;
|
MGAvertex m0, m1;
|
||||||
matrox_line_clip_hack(ctx, _b_, &m0, vert0, &m1, vert1);
|
matrox_line_clip_hack(ctx, _b_, &m0, vert0, &m1, vert1);
|
||||||
*(unsigned long *)m1.color = *(unsigned long *)vert1->color;
|
*(unsigned long *)m1.color = *(unsigned long *)vert1->color;
|
||||||
mga_draw_line_rgb_flat(&m0, &m1);
|
mga_draw_line_rgb_flat(&m0, &m1);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* MATROX */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Z-less flat line.
|
* Z-less flat line.
|
||||||
*/
|
*/
|
||||||
static void line_rgb_flat_zless (GLcontext *ctx,
|
|
||||||
const SWvertex *vert0,
|
|
||||||
const SWvertex *vert1)
|
|
||||||
{
|
|
||||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
|
||||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
|
||||||
#ifndef MATROX
|
#ifndef MATROX
|
||||||
GLuint _w_ = dmesa->Buffer->width;
|
|
||||||
GLuint rgb = vl_mixrgb(vert1->color);
|
#define NAME line_rgb_flat_zless
|
||||||
|
|
||||||
#define INTERP_XY 1
|
#define INTERP_XY 1
|
||||||
#define INTERP_Z 1
|
#define INTERP_Z 1
|
||||||
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
||||||
#define CLIP_HACK 1
|
#define CLIP_HACK 1
|
||||||
|
|
||||||
|
#define SETUP_CODE \
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||||
|
GLuint _w_ = dmesa->Buffer->width; \
|
||||||
|
GLuint rgb = vl_mixrgb(vert1->color);
|
||||||
|
|
||||||
#define PLOT(X,Y) \
|
#define PLOT(X,Y) \
|
||||||
if (Z < *zPtr) { \
|
if (Z < *zPtr) { \
|
||||||
*zPtr = Z; \
|
*zPtr = Z; \
|
||||||
@@ -875,15 +918,23 @@ static void line_rgb_flat_zless (GLcontext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "swrast/s_linetemp.h"
|
#include "swrast/s_linetemp.h"
|
||||||
#else
|
|
||||||
|
#else /* MATROX */
|
||||||
|
|
||||||
|
static void line_rgb_flat_zless (GLcontext *ctx,
|
||||||
|
const SWvertex *vert0,
|
||||||
|
const SWvertex *vert1)
|
||||||
|
{
|
||||||
|
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||||
|
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||||
MGAvertex m0, m1;
|
MGAvertex m0, m1;
|
||||||
matrox_line_clip_hack(ctx, _b_, &m0, vert0, &m1, vert1);
|
matrox_line_clip_hack(ctx, _b_, &m0, vert0, &m1, vert1);
|
||||||
m0.win[2] = vert0->win[2];
|
m0.win[2] = vert0->win[2];
|
||||||
m1.win[2] = vert1->win[2];
|
m1.win[2] = vert1->win[2];
|
||||||
*(unsigned long *)m1.color = *(unsigned long *)vert1->color;
|
*(unsigned long *)m1.color = *(unsigned long *)vert1->color;
|
||||||
mga_draw_line_rgb_flat_zless(&m0, &m1);
|
mga_draw_line_rgb_flat_zless(&m0, &m1);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* MATROX */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DOS/DJGPP device driver v1.3 for Mesa
|
* DOS/DJGPP device driver v1.4 for Mesa
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 - Borca Daniel
|
* Copyright (C) 2002 - Borca Daniel
|
||||||
* Email : dborca@yahoo.com
|
* Email : dborca@yahoo.com
|
||||||
@@ -140,8 +140,8 @@ void _remove_selector (int *segment)
|
|||||||
int _can_mmx (void)
|
int _can_mmx (void)
|
||||||
{
|
{
|
||||||
#ifdef USE_MMX_ASM
|
#ifdef USE_MMX_ASM
|
||||||
extern int _mesa_identify_x86_cpu_features (void);
|
extern int _mesa_x86_cpu_features;
|
||||||
return (_mesa_identify_x86_cpu_features() & 0x00800000);
|
return (_mesa_x86_cpu_features & 0x00800000);
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DOS/DJGPP device driver v1.3 for Mesa
|
* DOS/DJGPP device driver v1.4 for Mesa
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 - Borca Daniel
|
* Copyright (C) 2002 - Borca Daniel
|
||||||
* Email : dborca@yahoo.com
|
* Email : dborca@yahoo.com
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
#ifndef INTERNAL_H_included
|
#ifndef INTERNAL_H_included
|
||||||
#define INTERNAL_H_included
|
#define INTERNAL_H_included
|
||||||
|
|
||||||
#include "../mmath.h"
|
#include "../main/mtypes.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* general purpose defines, etc.
|
* general purpose defines, etc.
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DOS/DJGPP device driver v1.3 for Mesa -- MGA2064W HW mapping
|
* DOS/DJGPP device driver v1.4 for Mesa -- MGA2064W HW mapping
|
||||||
*
|
*
|
||||||
* Copyright (c) 2003 - Borca Daniel
|
* Copyright (c) 2003 - Borca Daniel
|
||||||
* Email : dborca@yahoo.com
|
* Email : dborca@yahoo.com
|
||||||
@@ -248,7 +248,7 @@ int mga_hw_init (unsigned long *vram, int *interleave, char *name)
|
|||||||
dirty = FALSE;
|
dirty = FALSE;
|
||||||
} else {
|
} else {
|
||||||
if (__djgpp_nearptr_enable() == 0)
|
if (__djgpp_nearptr_enable() == 0)
|
||||||
return NULL;
|
return 0;
|
||||||
|
|
||||||
dirty = TRUE;
|
dirty = TRUE;
|
||||||
}
|
}
|
||||||
@@ -298,7 +298,7 @@ int mga_hw_init (unsigned long *vram, int *interleave, char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!linear_base || !io_mem_base[0])
|
if (!linear_base || !io_mem_base[0])
|
||||||
return NULL;
|
return 0;
|
||||||
|
|
||||||
/* deal with the memory mapping crap */
|
/* deal with the memory mapping crap */
|
||||||
io_mem_size[0] = 0x4000;
|
io_mem_size[0] = 0x4000;
|
||||||
@@ -307,7 +307,7 @@ int mga_hw_init (unsigned long *vram, int *interleave, char *name)
|
|||||||
if (io_mem_base[i]) {
|
if (io_mem_base[i]) {
|
||||||
if (_create_mmap(&mgaptr.io_mem_map[i], io_mem_base[i], io_mem_size[i])) {
|
if (_create_mmap(&mgaptr.io_mem_map[i], io_mem_base[i], io_mem_size[i])) {
|
||||||
mga_hw_fini();
|
mga_hw_fini();
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -316,7 +316,7 @@ int mga_hw_init (unsigned long *vram, int *interleave, char *name)
|
|||||||
|
|
||||||
if (_create_mmap(&mgaptr.linear_map, linear_base, linear_size)) {
|
if (_create_mmap(&mgaptr.linear_map, linear_base, linear_size)) {
|
||||||
mga_hw_fini();
|
mga_hw_fini();
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fill in user data */
|
/* fill in user data */
|
||||||
|
Reference in New Issue
Block a user