Page 1 of 1

ATI lua draw point bug

Posted: 13 Sep 2010, 22:11
by Masure
I never wanted to have an ATI cause of OpenGL issues I can read all over the forum. As I got a great deal, I finaly bought a 5870 and here is the result :
ATIvsOGL.jpg
(133.91 KiB) Downloaded 2 times
I first disabled clouds and shorewaves to avoid instant crashing. And then this is what I get with smooth scroll and widget redrawing minimap. Transparency looks to fail.

Tried catalyst 10.9, 10.8, 10.7, 10.4, atihacks (dunnow what this does) but it's a no go.

What can I do except waiting for drivers that work and fail along versions ?

Summary :

- Lua using GL_POINT is failing in this way
- The size you define doesn't work, it's always the same size drawn
- A C++ hellogl app gave me good results with Gl_POINTS. The point size worked

Maybe something brakes the LUA GL context and always give the same point size. But this only happens with my ATI. Weird

Re: ATI 2D lua draw bug

Posted: 13 Sep 2010, 22:38
by Lampe
Workaround: Disable Red Minimap

After the game started, those start points will be removed and with them those huge bubbles. That aint nice actually, but tbh i never had use for the benefits of Red Minimap anyway, so *I* can live with it. If you can is up to you ofc.

Re: ATI 2D lua draw bug

Posted: 13 Sep 2010, 22:41
by Masure
"don't play spring" would have been the same

Re: ATI 2D lua draw bug

Posted: 13 Sep 2010, 22:54
by Lampe
not happy? cant live without red minimap? well, maybe try the rage in 3d bugfix presented at http://www.youtube.com/watch?v=qQURVhEaZhs...

Re: ATI 2D lua draw bug

Posted: 13 Sep 2010, 23:31
by aegis
lol the ipad keyboard is still showing when it's bent and the glass is totally totally cracked

Re: ATI 2D lua draw bug

Posted: 14 Sep 2010, 18:53
by Masure
GL_POINTS fails as it doesn't take glPointSize into account.

Code: Select all

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

function widget:DrawScreen()
	glPointSize(10)
	glColor({1,1,0} )
	glBeginEnd(GL_POINTS, glVertex, 100, 100)
end
I tried different point sizes but the point is always the same. Moreover, if I disable smoothpoint in springsettings, my whole screen is filled by the point.

Re: ATI lua draw point bug

Posted: 15 Sep 2010, 13:52
by Masure
These tests were made on WIN7 64 and catalyst 10.8.

Tested with Win XP 32 and catalyst 10.8 and the point size is now always 1px whatever io try.

Re: ATI lua draw point bug

Posted: 15 Sep 2010, 17:17
by Masure
It seems it has to do with GL_SMOOTH_POINT_SIZE_RANGE but not sure.

Re: ATI lua draw point bug

Posted: 15 Sep 2010, 20:47
by Masure
I tried GL_POINTS in an "hello gl" project and it displays points with the right size. It should have something to do with spring.

Re: ATI lua draw point bug

Posted: 03 Nov 2010, 12:44
by Licho
Can anyone comment on this? Why it works outside spring?

Re: ATI lua draw point bug

Posted: 03 Nov 2010, 12:54
by Kloot
Three possibilities:

1) ATI drivers require a very-specific-and-probably-undocumented GL state for GL_POINTS and Spring does not set all of it to ATI's wishes (glhf finding out which part and where), while Nvidia drivers are less strict
2) There is a bug in Spring that is being masked by (all of) Nvidia's drivers while ATI's strictly follow the GL specifications and trip over it
3) ATI drivers are bugged

One of these has greater precedent than the others.

Re: ATI lua draw point bug

Posted: 03 Nov 2010, 13:47
by Licho
Well for me it stopped working on one of 0.82 releases, before that it worked fine (I didn't change drivers).

I don't dispute its driver bug, but perhaps there is something that can be done to avoid it.

Re: ATI lua draw point bug

Posted: 03 Nov 2010, 13:50
by hoijui
i guess, if you have ATI, you could try to set the different states before the code that draws the points, or try to find documentation that says how the state has to be to draw points.

Re: ATI lua draw point bug

Posted: 03 Nov 2010, 13:52
by Masure