From 3931cccd08d6753f86fc3ec9467dad722b99a9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 6 May 2012 13:42:35 +0200 Subject: [PATCH] Added Mesh::setProgramPointSize(). --- src/Mesh.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Mesh.h b/src/Mesh.h index 614955131..cfcd475b0 100644 --- a/src/Mesh.h +++ b/src/Mesh.h @@ -121,11 +121,26 @@ class MAGNUM_EXPORT Mesh { glLineWidth(width); } - /** @brief Set point size */ + /** + * @brief Set point size + * + * @see setProgramPointSize() + */ inline static void setPointSize(GLfloat size) { glPointSize(size); } + /** + * @brief Enable/disable programmable point size + * + * If enabled, the point size is taken from vertex/geometry shader + * builtin `gl_PointSize`. + * @see setPointSize() + */ + inline static void setProgramPointSize(bool enabled) { + enabled ? glEnable(GL_PROGRAM_POINT_SIZE) : glDisable(GL_PROGRAM_POINT_SIZE); + } + /** * @brief Implicit constructor * @param primitive Primitive type