Skip to content

Instantly share code, notes, and snippets.

@abma
Created May 2, 2012 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abma/2580827 to your computer and use it in GitHub Desktop.
Save abma/2580827 to your computer and use it in GitHub Desktop.
Lua widget that triggers a bug in spring (http://springrts.com/mantis/view.php?id=2116)
function widget:GetInfo()
return {
name = "ATI pointsize Fail",
desc = "ATI pointsize Fail",
author = "Masure",
date = "2010 Sept 14",
license = "GNU GPL, v2 or later",
layer = 1, -- after the normal widgets
enabled = false -- loaded by default?
}
end
local GL_POINTS = GL.POINTS
local glBeginEnd = gl.BeginEnd
local glColor = gl.Color
local glPointSize = gl.PointSize
local glVertex = gl.Vertex
local glPointParameter = gl.PointParameter
function widget:DrawScreen()
glPointParameter(1,1,1, 1,5,5)
glPointSize(10)
glColor({1,1,0} )
glBeginEnd(GL_POINTS, glVertex, 100, 100)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment