ATTN: do NOT use GL_LINES and immediate mode
Moderator: Moderators
Re: ATTN: do NOT use GL_LINES and immediate mode
got more fixes done. turns out /water 1 and /water 3 were leaking texture memory - glBindTexture(GL_TEXTURE_2D, 0) fixed them. removed immediate mode from there for great justice.
moral: clean up after yourself...
edit: i guess i'll have to change the topic - from 'do not' to 'avoid if possible because they can leak but not always do and i don't know when it happens'.
moral: clean up after yourself...
edit: i guess i'll have to change the topic - from 'do not' to 'avoid if possible because they can leak but not always do and i don't know when it happens'.
Re: ATTN: do NOT use GL_LINES and immediate mode
they up required system specs of their games.
Re: ATTN: do NOT use GL_LINES and immediate mode
I just tested CA's customformations2... it doesn't draw anything. I am kinda scratching my head- the Widget's working, just nothing happens when it goes through DrawWorld, etc. This is on nVidia hardware. My stuff with GroundCircles works atm, but I'm wondering if I should remove the stipples, etc. to avoid crashes with ATi or not.
Re: ATTN: do NOT use GL_LINES and immediate mode
lemme check that out. edit: master+ca 6796 (stable) works for me.
Re: ATTN: do NOT use GL_LINES and immediate mode
That's bad news for me, then. I haven't the foggiest what could be breaking it.
Had another thought- instead of using LINES, we could use QUAD_STRIP and use a shader to move the texture coordinates every draw frame. That's probably what the pros are doing.
[EDIT]Tested with latest version from CA... it draws in the minimap, but nothing shows up in DrawWorld.[/EDIT]
Had another thought- instead of using LINES, we could use QUAD_STRIP and use a shader to move the texture coordinates every draw frame. That's probably what the pros are doing.
[EDIT]Tested with latest version from CA... it draws in the minimap, but nothing shows up in DrawWorld.[/EDIT]
Re: ATTN: do NOT use GL_LINES and immediate mode
Moving the draw call to DrawWorldPreUnit() fixed the not-drawing issue over here. Probably some screwup on my part.
Hmm. Here's another thought. May be useless, but... has anybody tried explicitly declaring gl.Texture(0,false) as a safety precaution before invoking GL.LINES? Maybe ATi's drivers are just being really picky about attempting to texture lines... sorry if that sounds crazy, but in all my "fun" experiences with ATi's drivers, it mainly seems like their engineers are obsessed with adhering to the strict letter of the specifications, whereas nVidia's a little more... understanding about these things.
Hmm. Here's another thought. May be useless, but... has anybody tried explicitly declaring gl.Texture(0,false) as a safety precaution before invoking GL.LINES? Maybe ATi's drivers are just being really picky about attempting to texture lines... sorry if that sounds crazy, but in all my "fun" experiences with ATi's drivers, it mainly seems like their engineers are obsessed with adhering to the strict letter of the specifications, whereas nVidia's a little more... understanding about these things.
Re: ATTN: do NOT use GL_LINES and immediate mode
i think you may be onto something. haven't tried it though.
Re: ATTN: do NOT use GL_LINES and immediate mode
it seems catalyst 10.2 fixed this problem. need independent confirmation.
Re: ATTN: do NOT use GL_LINES and immediate mode
Even so... you know how people are about drivers... it'd be safer to just make sure that the behavior can't happen, tbh.
Re: ATTN: do NOT use GL_LINES and immediate mode
I can confirm that.imbaczek wrote:it seems catalyst 10.2 fixed this problem. need independent confirmation.
Re: ATTN: do NOT use GL_LINES and immediate mode
absolutely, engine fixes for both command lines and water are in master.Argh wrote:Even so... you know how people are about drivers... it'd be safer to just make sure that the behavior can't happen, tbh.
Re: ATTN: do NOT use GL_LINES and immediate mode
Wow, that was fast! GJ people!
Re: ATTN: do NOT use GL_LINES and immediate mode
baczek had the idea before you mentioned that on the forum.
... somehow even ... finished it before you mentioned it!
(time travel involved?!?)
... somehow even ... finished it before you mentioned it!

(time travel involved?!?)
Re: ATTN: do NOT use GL_LINES and immediate mode
You could emulate immediate mode to some extent in engine (for Lua), by storing all the attributes into an array and drawing it on glEnd. The inconvenient part is determining what attributes are actually used (this could be how driver itself screws up. I've a suspicion the immediate mode is emulated like this in the driver). You could simply allow just the colour attribute and nothing else.
This could be made optional just for the ATI.
This could be made optional just for the ATI.
Re: ATTN: do NOT use GL_LINES and immediate mode
there are even libraries for that, specifically targeting opengl es implementations.
Re: ATTN: do NOT use GL_LINES and immediate mode
There is no replacement in lua? Why can't it use a display list?
Re: ATTN: do NOT use GL_LINES and immediate mode
Because display lists are not suited as a replacement for IM (being immutable).