From 7ce3368e918b085ef8894fb7aa68e36b07984b1d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 21 Jan 2024 03:04:57 +0000 Subject: Use symbol GL_MAX_GEOMETRY_OUTPUT_VERTICES to lookup the implementation limit at runtime --- gfx/gl/shaders/networkCurve.gs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gfx/gl/shaders') diff --git a/gfx/gl/shaders/networkCurve.gs b/gfx/gl/shaders/networkCurve.gs index d373c0c..326e8b6 100644 --- a/gfx/gl/shaders/networkCurve.gs +++ b/gfx/gl/shaders/networkCurve.gs @@ -9,7 +9,7 @@ flat in float bangle[]; flat in float radius[]; layout(points) in; -layout(triangle_strip, max_vertices = 255) out; +layout(triangle_strip, max_vertices = GL_MAX_GEOMETRY_OUTPUT_VERTICES) out; const mat2 rot = mat2(1); @@ -24,7 +24,7 @@ getRot(float angle) void main() { - float segs = floor(255 / (profile.length() * 2)); + float segs = floor(GL_MAX_GEOMETRY_OUTPUT_VERTICES / (profile.length() * 2)); vec3 arcstep = vec3((bangle[0] - aangle[0]), // angle reps[0], // texture (bpos[0].z - apos[0].z)) // height -- cgit v1.2.3