diff options
author | Brian Paul <[email protected]> | 2002-03-23 02:34:07 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-03-23 02:34:07 +0000 |
commit | e69bfe74d7f887fb516f300f575d43b9903d9ab3 (patch) | |
tree | 87e79df2f9aaaba93074607a084a67ea4c872c05 /src/mesa | |
parent | 6211144e056954f5b7a2d5c29f5a337154895217 (diff) |
DOS/Mesa driver updates (Daniel Borca)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dos/dmesa.c | 9 | ||||
-rw-r--r-- | src/mesa/drivers/dos/video.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dos/video.h | 4 | ||||
-rw-r--r-- | src/mesa/main/Makefile.DJ | 20 |
4 files changed, 26 insertions, 15 deletions
diff --git a/src/mesa/drivers/dos/dmesa.c b/src/mesa/drivers/dos/dmesa.c index d150cdca5ac..454b891c08b 100644 --- a/src/mesa/drivers/dos/dmesa.c +++ b/src/mesa/drivers/dos/dmesa.c @@ -540,13 +540,8 @@ static GLboolean set_draw_buffer (GLcontext *ctx, GLenum mode) * If anything special has to been done when the buffer/window is
* resized, do it now.
*/
-static void get_buffer_size (GLframebuffer *buffer, GLuint *width, GLuint *height)
+static void get_buffer_size (GLcontext *ctx, GLuint *width, GLuint *height)
{
- /* XXX this may not be right. We should query the size of the DOS window
- * associated with <buffer>. This function should work whether or
- * not there is a current context.
- */
- GET_CURRENT_CONTEXT(ctx);
DMesaContext c = (DMesaContext)ctx->DriverCtx;
*width = c->Buffer->width;
@@ -641,7 +636,7 @@ void dmesa_init_pointers (GLcontext *ctx) ctx->Driver.Accum = _swrast_Accum;
ctx->Driver.Bitmap = _swrast_Bitmap;
ctx->Driver.Clear = clear;
- ctx->Driver.ResizeBuffers = _swrast_alloc_buffers;
+ ctx->Driver.ResizeBuffersMESA = _swrast_alloc_buffers;
ctx->Driver.CopyPixels = _swrast_CopyPixels;
ctx->Driver.DrawPixels = _swrast_DrawPixels;
ctx->Driver.ReadPixels = _swrast_ReadPixels;
diff --git a/src/mesa/drivers/dos/video.c b/src/mesa/drivers/dos/video.c index 5c2c84a84f7..9d50952c527 100644 --- a/src/mesa/drivers/dos/video.c +++ b/src/mesa/drivers/dos/video.c @@ -23,7 +23,7 @@ */
/*
- * DOS/DJGPP device driver v0.3 for Mesa 4.0
+ * DOS/DJGPP device driver v0.4 for Mesa 4.0
*
* Copyright (C) 2002 - Borca Daniel
* Email : [email protected]
@@ -180,9 +180,9 @@ void vl_rect (void *buffer, int x, int y, int width, int height, int color) /*
* virtual dumping:
*/
-void *(*vl_flip) (void *buffer, int width, int height);
+void (*vl_flip) (void *buffer, int width, int height);
-extern void *b_dump_virtual (void *buffer, int width, int height);
+extern void b_dump_virtual (void *buffer, int width, int height);
__asm__("\n\
.text \n\
.balign 4 \n\
@@ -242,7 +242,7 @@ _b_dump_virtual: \n\ popl %esi \n\
popl %ebx \n\
ret");
-extern void *l_dump_virtual (void *buffer, int width, int height);
+extern void l_dump_virtual (void *buffer, int width, int height);
__asm__("\n\
.text \n\
.balign 4 \n\
diff --git a/src/mesa/drivers/dos/video.h b/src/mesa/drivers/dos/video.h index ff81ac9d2e9..c806aa7c885 100644 --- a/src/mesa/drivers/dos/video.h +++ b/src/mesa/drivers/dos/video.h @@ -23,7 +23,7 @@ */
/*
- * DOS/DJGPP device driver v0.3 for Mesa 4.0
+ * DOS/DJGPP device driver v0.4 for Mesa 4.0
*
* Copyright (C) 2002 - Borca Daniel
* Email : [email protected]
@@ -42,7 +42,7 @@ void *vl_sync_buffer (void *buffer, int x, int y, int width, int height); extern void (*vl_clear) (void *buffer, int len, int color);
void vl_rect (void *buffer, int x, int y, int width, int height, int color);
-void *(*vl_flip) (void *buffer, int width, int height);
+void (*vl_flip) (void *buffer, int width, int height);
extern int (*vl_mixrgba) (const unsigned char rgba[]);
extern int (*vl_mixrgb) (const unsigned char rgb[]);
diff --git a/src/mesa/main/Makefile.DJ b/src/mesa/main/Makefile.DJ index 214882d1cfa..fc540dc60bb 100644 --- a/src/mesa/main/Makefile.DJ +++ b/src/mesa/main/Makefile.DJ @@ -20,7 +20,7 @@ # 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 core makefile v0.2 for Mesa 4.0
+# DOS/DJGPP core makefile v0.4 for Mesa 4.0
#
# Copyright (C) 2002 - Borca Daniel
# Email : [email protected]
@@ -36,7 +36,15 @@ AR = ar ARFLAGS = ruv
LIBDIR = $(TOP)/lib
+ifeq ($(wildcard $(DJDIR)/lib/dxe2.ld),)
+DXE2GEN =
+else
+DXE2GEN = $(wildcard $(addsuffix /dxe2gen.exe,$(subst ;, ,$(PATH))))
+endif
+
GL_LIB = libgl.a
+GL_DXE = gl.dxe
+GL_IMP = libigl.a
CORE_SOURCES = \
swrast_setup/ss_context.c \
@@ -166,11 +174,19 @@ OBJECTS = $(SOURCES:.c=.o) .c.o:
gcc -o $@ -c $(CFLAGS) $<
-all: $(LIBDIR)/$(GL_LIB)
+all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP)
$(LIBDIR)/$(GL_LIB): $(OBJECTS)
$(AR) $(ARFLAGS) $(LIBDIR)/$(GL_LIB) $(OBJECTS)
+$(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS)
+ifeq ($(DXE2GEN),)
+ @echo Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN
+ @echo somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.
+else
+ dxe2gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) $(OBJECTS) -D "DOS Mesa" -U
+endif
+
clean:
-$(RM) *.o
-$(RM) DOS\*.o
|