Sfoglia il codice sorgente

swrast: fix point rendering function selection

Need to clamp default point size to min/max range before checking if it's one.
Fixes glean pointAtten test.
tags/mesa_7_5_rc1
Brian Paul 16 anni fa
parent
commit
228f20e324
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4
    1
      src/mesa/swrast/s_points.c

+ 4
- 1
src/mesa/swrast/s_points.c Vedi File

@@ -570,6 +570,9 @@ void
_swrast_choose_point(GLcontext *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLfloat size = CLAMP(ctx->Point.Size,
ctx->Point.MinSize,
ctx->Point.MaxSize);

if (ctx->RenderMode == GL_RENDER) {
if (ctx->Point.PointSprite) {
@@ -578,7 +581,7 @@ _swrast_choose_point(GLcontext *ctx)
else if (ctx->Point.SmoothFlag) {
swrast->Point = smooth_point;
}
else if (ctx->Point.Size > 1.0 ||
else if (size > 1.0 ||
ctx->Point._Attenuated ||
ctx->VertexProgram.PointSizeEnabled) {
swrast->Point = large_point;

Loading…
Annulla
Salva