Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gl_PointSize and GLSL



Please ignore, sorry for the noise.  I found a previous response I
hadn't noticed before.
thanks,
wes

On 5/17/07, Wesley Smith <email@hidden> wrote:
I have a GLSL shader and I'm writing gl_PointSize in my vertex shader.
 To verify the value, I send it to my fragment shader and it has the
correct value, however, my points are all rendering according to
glPointSize() not gl_PointSize.  Any ideas?  OSX10.4.8 macintel radeon
x1600  Is there something I have to do aside from writing to the
value?  I have point sprites enabled when drawing the points.

thanks,
wes

varying vec2 texcoord0;
varying float size;

void main (void)
{

        // transform texcoords
        texcoord0 = vec2(gl_TextureMatrix[0] * gl_MultiTexCoord0);

        gl_PointSize = 10.;
        size = gl_PointSize;
        gl_Position = ftransform();
}


// texcoords varying vec2 texcoord0;

// samplers
uniform sampler2D tex0;

varying float size;

void main (void)
{
        vec4 color = texture2D(tex0, texcoord0);
        gl_FragColor = vec4(vec3(size/10.), 1.);
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >gl_PointSize and GLSL (From: "Wesley Smith" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.