Permalink
Browse files

(hint-points) sets point size from vertex shader

  • Loading branch information...
1 parent 7e8b5cd commit 4593a68c53d3d7a943bf879fd0c7961bb00c5e5d @gaborpapp gaborpapp committed May 13, 2011
Showing with 11 additions and 1 deletion.
  1. +11 −1 libfluxus/src/State.cpp
View
@@ -124,8 +124,11 @@ void State::Apply()
TexturePainter::Get()->SetCurrent(Textures,TextureStates);
- if (Shader!=NULL)
+ if (Shader != NULL)
{
+ if (Hints & HINT_POINTS)
+ glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
+
Shader->Apply();
}
else GLSLShader::Unapply();
@@ -135,8 +138,15 @@ void State::Unapply()
{
if (Hints & HINT_NORMALISE)
glDisable(GL_NORMALIZE);
+
if (Hints & HINT_NOZWRITE)
glDepthMask(true);
+
+ if (Shader != NULL)
+ {
+ if (Hints & HINT_POINTS)
+ glDisable(GL_VERTEX_PROGRAM_POINT_SIZE);
+ }
}
void State::Spew()

0 comments on commit 4593a68

Please sign in to comment.