mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-28 07:48:20 +02:00
Minor header file changes to silence warnings.
Added _mesa_enable_sw_extensions(), called by software-only drivers to enable all s/w-supported GL extensions.
This commit is contained in:
parent
9e83e8c790
commit
5a9026c65d
12 changed files with 58 additions and 40 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: GLView.cpp,v 1.4 2000/11/14 17:51:15 brianp Exp $ */
|
||||
/* $Id: GLView.cpp,v 1.5 2000/11/17 21:01:26 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -27,6 +27,11 @@
|
|||
|
||||
/*
|
||||
* $Log: GLView.cpp,v $
|
||||
* Revision 1.5 2000/11/17 21:01:26 brianp
|
||||
* Minor header file changes to silence warnings.
|
||||
* Added _mesa_enable_sw_extensions(), called by software-only drivers
|
||||
* to enable all s/w-supported GL extensions.
|
||||
*
|
||||
* Revision 1.4 2000/11/14 17:51:15 brianp
|
||||
* more Driver.Color, Driver.Index updates
|
||||
*
|
||||
|
|
@ -71,6 +76,7 @@
|
|||
#include <stdio.h>
|
||||
#include <GLView.h>
|
||||
#include "../src/context.h"
|
||||
#include "extensions.h"
|
||||
|
||||
|
||||
// BeOS component ordering for B_RGBA32 bitmap format
|
||||
|
|
@ -1037,6 +1043,8 @@ BGLView::BGLView(BRect rect, char *name,
|
|||
const GLboolean direct = GL_TRUE;
|
||||
GLcontext *ctx = _mesa_create_context( visual, NULL, aux, direct );
|
||||
|
||||
_mesa_enable_sw_extensions(ctx);
|
||||
|
||||
aux->Init(this, ctx, visual, buffer );
|
||||
|
||||
// Hook aux data into BGLView object
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <ggi/mesa/ggimesa_int.h>
|
||||
#include <ggi/mesa/debug.h>
|
||||
#include "extensions.h"
|
||||
|
||||
#undef VIS
|
||||
#undef FLIP
|
||||
|
|
@ -319,6 +320,8 @@ GGIMesaContext GGIMesaCreateContext(void)
|
|||
if (!ctx->gl_ctx)
|
||||
return NULL;
|
||||
|
||||
_mesa_enable_sw_extensions(ctx->gl_ctx);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,22 +121,6 @@ static void fxDDBufferSize(GLcontext *ctx, GLuint *width, GLuint *height)
|
|||
}
|
||||
|
||||
|
||||
/* Set current drawing color */
|
||||
static void fxDDSetColor(GLcontext *ctx, GLubyte red, GLubyte green,
|
||||
GLubyte blue, GLubyte alpha )
|
||||
{
|
||||
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
|
||||
GLubyte col[4];
|
||||
ASSIGN_4V( col, red, green, blue, alpha );
|
||||
|
||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||
fprintf(stderr,"fxmesa: fxDDSetColor(%d,%d,%d,%d)\n",red,green,blue,alpha);
|
||||
}
|
||||
|
||||
fxMesa->color=FXCOLOR4(col);
|
||||
}
|
||||
|
||||
|
||||
/* Implements glClearColor() */
|
||||
static void fxDDClearColor(GLcontext *ctx, GLubyte red, GLubyte green,
|
||||
GLubyte blue, GLubyte alpha )
|
||||
|
|
@ -976,11 +960,6 @@ void fxSetupDDPointers(GLcontext *ctx)
|
|||
ctx->Driver.ClearColor=fxDDClearColor;
|
||||
ctx->Driver.Clear=fxDDClear;
|
||||
|
||||
#if 0
|
||||
ctx->Driver.Index=NULL;
|
||||
ctx->Driver.Color=fxDDSetColor;
|
||||
#endif
|
||||
|
||||
ctx->Driver.SetDrawBuffer=fxDDSetDrawBuffer;
|
||||
ctx->Driver.SetReadBuffer=fxDDSetReadBuffer;
|
||||
ctx->Driver.GetBufferSize=fxDDBufferSize;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: osmesa.c,v 1.31 2000/11/16 21:05:38 keithw Exp $ */
|
||||
/* $Id: osmesa.c,v 1.32 2000/11/17 21:01:40 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -53,6 +53,7 @@
|
|||
#include "swrast/s_depth.h"
|
||||
#include "swrast/s_lines.h"
|
||||
#include "swrast/s_triangle.h"
|
||||
#include "tnl/tnl.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -273,9 +274,8 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
|
|||
FREE(osmesa);
|
||||
return NULL;
|
||||
}
|
||||
gl_extensions_enable(&(osmesa->gl_ctx),"GL_HP_occlusion_test");
|
||||
gl_extensions_enable(&(osmesa->gl_ctx), "GL_ARB_texture_cube_map");
|
||||
gl_extensions_enable(&(osmesa->gl_ctx), "GL_EXT_texture_env_combine");
|
||||
|
||||
_mesa_enable_sw_extensions(&(osmesa->gl_ctx));
|
||||
|
||||
osmesa->gl_buffer = _mesa_create_framebuffer( osmesa->gl_visual,
|
||||
osmesa->gl_visual->DepthBits > 0,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: svgamesa.c,v 1.8 2000/11/16 21:05:39 keithw Exp $ */
|
||||
/* $Id: svgamesa.c,v 1.9 2000/11/17 21:01:44 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -39,12 +39,13 @@
|
|||
#else
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <vga.h>
|
||||
#include "GL/svgamesa.h"
|
||||
#include "context.h"
|
||||
#include "extensions.h"
|
||||
#include "matrix.h"
|
||||
#include "types.h"
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "svgapix.h"
|
||||
|
|
@ -418,6 +419,8 @@ SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer )
|
|||
NULL, /* share list context */
|
||||
(void *) ctx, GL_TRUE );
|
||||
|
||||
_mesa_enable_sw_extensions(ctx->gl_ctx);
|
||||
|
||||
ctx->gl_buffer = _mesa_create_framebuffer( ctx->gl_vis,
|
||||
ctx->gl_vis->DepthBits > 0,
|
||||
ctx->gl_vis->StencilBits > 0,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: wmesa.c,v 1.11 2000/11/14 17:40:15 brianp Exp $ */
|
||||
/* $Id: wmesa.c,v 1.12 2000/11/17 21:01:47 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Windows (Win32) device driver for Mesa 3.4
|
||||
|
|
@ -1284,6 +1284,8 @@ WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
_mesa_enable_sw_extensions(c->gl_ctx);
|
||||
|
||||
c->gl_buffer = _mesa_create_framebuffer( c->gl_visual,
|
||||
c->gl_visual->DepthBits > 0,
|
||||
c->gl_visual->StencilBits > 0,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: xm_api.c,v 1.8 2000/11/16 21:05:40 keithw Exp $ */
|
||||
/* $Id: xm_api.c,v 1.9 2000/11/17 21:01:48 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -1638,9 +1638,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
gl_extensions_enable(ctx, "GL_HP_occlusion_test");
|
||||
gl_extensions_enable(ctx, "GL_ARB_texture_cube_map");
|
||||
gl_extensions_enable(ctx, "GL_EXT_texture_env_combine");
|
||||
_mesa_enable_sw_extensions(ctx);
|
||||
|
||||
if (CHECK_BYTE_ORDER(v)) {
|
||||
c->swapbytes = GL_FALSE;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: extensions.c,v 1.40 2000/10/30 16:27:21 brianp Exp $ */
|
||||
/* $Id: extensions.c,v 1.41 2000/11/17 21:01:25 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -109,6 +109,21 @@ static struct {
|
|||
|
||||
|
||||
|
||||
/*
|
||||
* Enable all extensions suitable for a software-only renderer.
|
||||
* This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc.
|
||||
*/
|
||||
void
|
||||
_mesa_enable_sw_extensions(GLcontext *ctx)
|
||||
{
|
||||
gl_extensions_enable(ctx, "GL_ARB_texture_cube_map");
|
||||
gl_extensions_enable(ctx, "GL_EXT_bgra");
|
||||
gl_extensions_enable(ctx, "GL_EXT_texture_env_combine");
|
||||
gl_extensions_enable(ctx, "GL_HP_occlusion_test");
|
||||
gl_extensions_enable(ctx, "GL_NV_blend_square");
|
||||
}
|
||||
|
||||
|
||||
|
||||
int gl_extensions_add( GLcontext *ctx,
|
||||
GLboolean enabled,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: extensions.h,v 1.9 2000/10/30 13:32:00 keithw Exp $ */
|
||||
/* $Id: extensions.h,v 1.10 2000/11/17 21:01:25 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -31,6 +31,9 @@
|
|||
#include "types.h"
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_enable_sw_extensions(GLcontext *ctx);
|
||||
|
||||
|
||||
/* Return 0 on success.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: m_translate.h,v 1.1 2000/11/16 21:05:41 keithw Exp $ */
|
||||
/* $Id: m_translate.h,v 1.2 2000/11/17 21:01:49 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -28,6 +28,8 @@
|
|||
#ifndef _M_TRANSLATE_H_
|
||||
#define _M_TRANSLATE_H_
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
typedef void (*trans_1f_func)(GLfloat *to,
|
||||
CONST void *ptr,
|
||||
|
|
@ -86,7 +88,9 @@ extern trans_4ub_func gl_trans_4ub_tab[5][MAX_TYPES];
|
|||
extern trans_4f_func gl_trans_4f_tab[5][MAX_TYPES];
|
||||
|
||||
|
||||
extern void gl_init_translate( void );
|
||||
|
||||
extern void
|
||||
_math_init_translate( void );
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: m_xform.c,v 1.1 2000/11/16 21:05:41 keithw Exp $ */
|
||||
/* $Id: m_xform.c,v 1.2 2000/11/17 21:01:49 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -41,6 +41,7 @@
|
|||
#include "mmath.h"
|
||||
|
||||
#include "m_matrix.h"
|
||||
#include "m_translate.h"
|
||||
#include "m_xform.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: m_xform.h,v 1.1 2000/11/16 21:05:41 keithw Exp $ */
|
||||
/* $Id: m_xform.h,v 1.2 2000/11/17 21:01:49 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "glheader.h"
|
||||
#include "config.h"
|
||||
#include "math/math.h"
|
||||
#include "math/m_vector.h"
|
||||
#include "math/m_matrix.h"
|
||||
|
||||
|
|
@ -78,7 +79,8 @@ extern void gl_transform_vector( GLfloat u[4],
|
|||
const GLfloat m[16] );
|
||||
|
||||
|
||||
extern void gl_init_transformation( void );
|
||||
extern void
|
||||
_math_init_transformation( void );
|
||||
|
||||
|
||||
/* KW: Clip functions now do projective divide as well. The projected
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue