hannesh's picture

Point sprite distance attenuation.

Hi!

I'm trying to get my point sprites to get smaller in the distance, in C I can do this with

glPointParameterfvSGIS(GL_DISTANCE_ATTENUATION_SGIS, quad);

So in OpenTK I tried

GL.PointParameter(PointParameterName.PointDistanceAttenuation, (int)All.QuadraticAttenuation);

This causes an InvalidEnum error though.

What am I doing wrong?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
JTalton's picture

GL_POINT_DISTANCE_ATTENUATION
params is an array of three floating-point values that specify the coefficients used for scaling the computed point size. The default values are { 1,0,0 }

float[] quad = new float[] { 0.25f, 0.0f, 1 / 60.0f };
GL.PointParameter(PointParameterName.PointDistanceAttenuation, quad);
hannesh's picture

Argh, I should've seen that one.
Thanks.