mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
initial code for render-to-texture
This commit is contained in:
parent
e1e446bf77
commit
3c5bfac63b
4 changed files with 100 additions and 12 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: fakeglx.c,v 1.77 2002/11/18 15:11:49 brianp Exp $ */
|
||||
/* $Id: fakeglx.c,v 1.78 2003/01/14 04:49:07 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -81,7 +81,8 @@
|
|||
"GLX_EXT_visual_rating " \
|
||||
"GLX_SGI_video_sync " \
|
||||
"GLX_SGIX_fbconfig " \
|
||||
"GLX_SGIX_pbuffer"
|
||||
"GLX_SGIX_pbuffer" \
|
||||
"GLX_ARB_render_texture"
|
||||
|
||||
|
||||
/* Silence compiler warnings */
|
||||
|
|
@ -2615,7 +2616,7 @@ Fake_glXSet3DfxModeMESA( int mode )
|
|||
|
||||
|
||||
|
||||
/*** AGP memory allocation ***/
|
||||
/*** GLX_NV_vertex_array range ***/
|
||||
static void *
|
||||
Fake_glXAllocateMemoryNV( GLsizei size,
|
||||
GLfloat readFrequency,
|
||||
|
|
@ -2637,7 +2638,7 @@ Fake_glXFreeMemoryNV( GLvoid *pointer )
|
|||
}
|
||||
|
||||
|
||||
/*** GLX_MESA_agp_offset */
|
||||
/*** GLX_MESA_agp_offset ***/
|
||||
|
||||
static GLuint
|
||||
Fake_glXGetAGPOffsetMESA( const GLvoid *pointer )
|
||||
|
|
@ -2647,6 +2648,29 @@ Fake_glXGetAGPOffsetMESA( const GLvoid *pointer )
|
|||
}
|
||||
|
||||
|
||||
/*** GLX_ARB_render_texture ***/
|
||||
|
||||
static Bool
|
||||
Fake_glXBindTexImageARB( Display *dpy, GLXPbuffer pbuffer, int buffer )
|
||||
{
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
Fake_glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer )
|
||||
{
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
Fake_glXDrawableAttribARB( Display *dpy, GLXDrawable draw, const int *attribList )
|
||||
{
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void);
|
||||
struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
|
||||
|
|
@ -2792,5 +2816,10 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
|
|||
/*** GLX_MESA_agp_offset ***/
|
||||
glx.GetAGPOffsetMESA = Fake_glXGetAGPOffsetMESA;
|
||||
|
||||
/*** GLX_ARB_render_texture ***/
|
||||
glx.BindTexImageARB = Fake_glXBindTexImageARB;
|
||||
glx.ReleaseTexImageARB = Fake_glXReleaseTexImageARB;
|
||||
glx.DrawableAttribARB = Fake_glXDrawableAttribARB;
|
||||
|
||||
return &glx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: glxapi.c,v 1.31 2002/11/18 15:11:52 brianp Exp $ */
|
||||
/* $Id: glxapi.c,v 1.32 2003/01/14 04:49:07 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -988,7 +988,6 @@ Bool glXSet3DfxModeMESA(int mode)
|
|||
|
||||
|
||||
|
||||
|
||||
/*** GLX_NV_vertex_array_range ***/
|
||||
|
||||
void *
|
||||
|
|
@ -1032,6 +1031,42 @@ glXGetAGPOffsetMESA( const GLvoid *pointer )
|
|||
}
|
||||
|
||||
|
||||
/*** GLX_ARB_render_Texture ***/
|
||||
|
||||
Bool
|
||||
glXBindTexImageARB( Display *dpy, GLXPbuffer pbuffer, int buffer )
|
||||
{
|
||||
struct _glxapi_table *t;
|
||||
GET_DISPATCH(dpy, t);
|
||||
if (!t)
|
||||
return False;
|
||||
return (t->BindTexImageARB)(dpy, pbuffer, buffer);
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer )
|
||||
{
|
||||
struct _glxapi_table *t;
|
||||
GET_DISPATCH(dpy, t);
|
||||
if (!t)
|
||||
return False;
|
||||
return (t->ReleaseTexImageARB)(dpy, pbuffer, buffer);
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
glXDrawableAttribARB( Display *dpy, GLXDrawable draw, const int *attribList )
|
||||
{
|
||||
struct _glxapi_table *t;
|
||||
GET_DISPATCH(dpy, t);
|
||||
if (!t)
|
||||
return False;
|
||||
return (t->DrawableAttribARB)(dpy, draw, attribList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
/* GLX API management functions */
|
||||
/**********************************************************************/
|
||||
|
|
@ -1068,6 +1103,15 @@ _glxapi_get_extensions(void)
|
|||
#endif
|
||||
#ifdef GLX_MESA_set_3dfx_mode
|
||||
"GLX_MESA_set_3dfx_mode",
|
||||
#endif
|
||||
#ifdef GLX_SGIX_fbconfig
|
||||
"GLX_SGIX_fbconfig",
|
||||
#endif
|
||||
#ifdef GLX_SGIX_pbuffer
|
||||
"GLX_SGIX_pbuffer",
|
||||
#endif
|
||||
#ifdef GLX_ARB_render_texture
|
||||
"GLX_ARB_render_texture",
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
|
@ -1248,6 +1292,11 @@ static struct name_address_pair GLX_functions[] = {
|
|||
/*** GLX_MESA_agp_offset ***/
|
||||
{ "glXGetAGPOffsetMESA", (GLvoid *) glXGetAGPOffsetMESA },
|
||||
|
||||
/*** GLX_ARB_render_texture ***/
|
||||
{ "glXBindTexImageARB", (GLvoid *) glXBindTexImageARB },
|
||||
{ "glXReleaseTexImageARB", (GLvoid *) glXReleaseTexImageARB },
|
||||
{ "glXDrawableAttribARB", (GLvoid *) glXDrawableAttribARB },
|
||||
|
||||
{ NULL, NULL } /* end of list */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: glxapi.h,v 1.14 2002/10/08 23:16:26 brianp Exp $ */
|
||||
/* $Id: glxapi.h,v 1.15 2003/01/14 04:49:07 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 4.0.2
|
||||
* Version: 5.1
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2002 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"),
|
||||
|
|
@ -205,6 +205,11 @@ struct _glxapi_table {
|
|||
|
||||
/*** GLX_MESA_agp_offset ***/
|
||||
GLuint (*GetAGPOffsetMESA)( const GLvoid *pointer );
|
||||
|
||||
/*** GLX_ARB_render_texture ***/
|
||||
Bool (*BindTexImageARB)(Display *dpy, GLXPbuffer pbuffer, int buffer);
|
||||
Bool (*ReleaseTexImageARB)(Display *dpy, GLXPbuffer pbuffer, int buffer);
|
||||
Bool (*DrawableAttribARB)(Display *dpy, GLXDrawable draw, const int *attribList);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: realglx.c,v 1.6 2002/10/08 23:16:27 brianp Exp $ */
|
||||
/* $Id: realglx.c,v 1.7 2003/01/14 04:49:07 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
* Version: 5.1
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2002 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"),
|
||||
|
|
@ -177,5 +177,10 @@ _real_GetGLXDispatchTable(void)
|
|||
/*** GLX_MESA_agp_offset ***/
|
||||
glx.GetAGPOffsetMESA = _real_glXGetAGPOffsetMESA;
|
||||
|
||||
/*** GLX_ARB_render_texture ***/
|
||||
glx.BindTexImageARB = _real_glXBindTexImageARB;
|
||||
glx.ReleaseTexImageARB = _real_glXReleaseTexImageARB;
|
||||
glx.DrawableAttribARB = _real_glXDrawableAttribARB;
|
||||
|
||||
return &glx;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue