summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200/r200_context.c
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger@gmx.ch>2006-10-13 22:10:05 +0000
committerRoland Scheidegger <rscheidegger@gmx.ch>2006-10-13 22:10:05 +0000
commitcb977ae5f4c9fab5753c04bfdd8736978ad4feee (patch)
tree1f38b694427bb1021da66f6dee020af67b880c3d /src/mesa/drivers/dri/r200/r200_context.c
parent40b88fd1f3dedd0137b170a7272854e2bf4c3210 (diff)
implement ARB_point_parameters and ARB_point_sprite on r200. The code is nearly the same as outlined in bug #4707, except it disables perspective correction for point sprites to make them actually work. And, separate the state atom into two as the tcl parameters would overwrite vertex program parameters when active. Also implement the GL_VERTEX_PROGRAM_POINT_SIZE_ARB option to make vertex programs outputting a point size work correctly (untested). Smooth points will still always be size 1. While here, enable gouraud shading for fog when using fog coord.
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_context.c')
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 37abaa38de..2e55ac1f50 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -75,6 +75,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_EXT_blend_equation_separate
#define need_GL_EXT_blend_func_separate
#define need_GL_NV_vertex_program
+#define need_GL_ARB_point_parameters
#include "extension_helper.h"
#define DRIVER_DATE "20060602"
@@ -170,7 +171,7 @@ const struct dri_extension blend_extensions[] = {
{ "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions },
{ NULL, NULL }
};
-
+
const struct dri_extension ARB_vp_extension[] = {
{ "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }
};
@@ -183,6 +184,12 @@ const struct dri_extension ATI_fs_extension[] = {
{ "GL_ATI_fragment_shader", GL_ATI_fragment_shader_functions }
};
+const struct dri_extension point_extensions[] = {
+ { "GL_ARB_point_sprite", NULL },
+ { "GL_ARB_point_parameters", GL_ARB_point_parameters_functions },
+ { NULL, NULL }
+};
+
extern const struct tnl_pipeline_stage _r200_render_stage;
extern const struct tnl_pipeline_stage _r200_tcl_stage;
@@ -200,9 +207,9 @@ static const struct tnl_pipeline_stage *r200_pipeline[] = {
&_tnl_fog_coordinate_stage,
&_tnl_texgen_stage,
&_tnl_texture_transform_stage,
+ &_tnl_point_attenuation_stage,
&_tnl_arb_vertex_program_stage,
&_tnl_vertex_program_stage,
-
/* Try again to go to tcl?
* - no good for asymmetric-twoside (do with multipass)
* - no good for asymmetric-unfilled (do with multipass)
@@ -485,6 +492,8 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
if ((ctx->Const.MaxTextureUnits == 6) && rmesa->r200Screen->drmSupportsFragShader)
driInitSingleExtension( ctx, ATI_fs_extension );
+ if (rmesa->r200Screen->drmSupportsPointSprites)
+ driInitExtensions( ctx, point_extensions, GL_FALSE );
#if 0
r200InitDriverFuncs( ctx );
r200InitIoctlFuncs( ctx );