#include "imports.h"
#ifndef FX
#include "bufferobj.h"
+#include "buffers.h"
#include "extensions.h"
#include "macros.h"
#include "matrix.h"
#include "GL/dmesa.h"
-#define SWTC 1 /* SW texture compression */
+#define SWTC 0 /* SW texture compression */
/*
}
+static void
+viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+{
+ /* poll for window size change and realloc software Z/stencil/etc if needed */
+ _mesa_ResizeBuffersMESA();
+}
+
+
static const GLubyte *
get_string (GLcontext *ctx, GLenum name)
{
driver->UpdateState = dmesa_update_state;
driver->GetString = get_string;
driver->GetBufferSize = get_buffer_size;
+ driver->Viewport = viewport;
driver->Flush = flush;
driver->Finish = finish;
driver->Clear = clear;
c->buffer = b;
_mesa_make_current((GLcontext *)c, (GLframebuffer *)b);
- if (((GLcontext *)c)->Viewport.Width == 0) {
- /* initialize viewport to window size */
- _mesa_Viewport(0, 0, b->width, b->height);
- }
- } else {
+ }
+ else {
/* Detach */
_mesa_make_current(NULL, NULL);
}
}
-void *
+DMesaProc
DMesaGetProcAddress (const char *name)
{
- void *p = (void *)_glapi_get_proc_address(name);
+ DMesaProc p = (DMesaProc)_glapi_get_proc_address(name);
/* TODO: handle DMesa* namespace
if (p == NULL) {
}
-#if (((__DJGPP__ << 8) | __DJGPP_MINOR__) >= 0x204) && USE_EXTERNAL_DXTN_LIB
+#if SWTC && (((__DJGPP__ << 8) | __DJGPP_MINOR__) >= 0x204)
#include <sys/dxe.h>
extern_asm(___dj_assert);