Re: [Warzone-dev] Menu /subtitle Gfx corruption?

2007-02-20 Thread Dennis Schridde
Am Mittwoch, 21. Februar 2007 schrieb Giel van Schijndel:
> Dennis Schridde schreef:
> > Am Dienstag, 20. Februar 2007 schrieb Giel van Schijndel:
> >> Giel van Schijndel schreef:
> >>> [EMAIL PROTECTED] schreef:
>  Using latest svn, I notice that on menu screen, where you pick
>  map/player for  multiplayer/skirmish games, on right side where
>  show version, it get corrupted if you hover mouse over one of the
>  options like power, and it displays low/medium/high, the version is
>  then replaced with corruption.
> 
>  Same also happen when play mission, and first see mission text, it
>  is also corrupted.
> 
>  Anyone else see this?
> 
>  I can post pictures if need.
> >>>
> >>> Filed a bugreport: https://gna.org/bugs/index.php?8514
> >>>
> >>> I'm guessing that ^ is what you're describing with "Same also happen
> >>> when play mission, and first see mission text, it is also corrupted."?
> >>>
> >>> As for the version text cluttering in the Skirmish set-up screen. I
> >>> haven't been able to reproduce that with r717. With HEAD I am however
> >>> able to reproduce that, so I'm guessing it are two separately
> >>> introduced bugs. Although they seem to be related because of their
> >>> similarities
> >>
> >> Ok, scratch that last part.
> >> I am able to reproduce the text cluttering in the Skirmish set-up screen
> >> with r717.
> >>
> >> I probably just didn't look hard enough for it.
> >
> > I am very certain that the ability to reproduce this directly related to
> > the result of "rand()%2 == 0". ;)
> >
> > For those who don't get it immediately: If my theory is correct that the
> > RGBA nature of the PNGs (JPEGs are just RGB) and a broken drawing order
> > in the menu is responsible for this, then the above chunk of code decides
> > whether a PNG or a JPEG is loaded and thus whether the bug is exposed or
> > not.
>
> Nope, I actually found the culprit.
>
> The problem seems to be an excess call to `glDisable(GL_TEXTURE_2D);` by
> pie_SetTexturePage in lib/ivis_opengl/piestate.c due to a removed call
> to pie_SetTexturePage(-1);
>
> The first call (to pie_SetTexturePage) with -1 as param actually calls
> glDisable and makes sure the second call with -1 as param *won't* call
> glDisable. This second call issued somewhere else in the source actually
> caused glDisable(GL_TEXTURE_2D) to be called (because without the first
> call, which has been removed in r717 it becomes the first).
>
> Whatever glDisable(GL_TEXTURE_2D) does I don't know. I'm no OpenGL
> expert. I do know however that if it is called the text cluttering
> problem appears and that it disappears if it isn't called.
>
> Anyway a fix is provided in r794.
> Whether it is a good/real fix or just a hack that works is something I
> leave up to those more experienced with OpenGL.

glDisable(GL_TEXTURE_2D) disables texturing.
I guess when you try to texture something while texturing is disabled, you get 
those artifacts? (No GL expert either.)

So it seems that the code tricks itself in thinking that texturing is 
disabled, while it really is not. (It sets texpage to -1 and manually enables 
texturing again.)
I guess this is because at the moment it wants to draw the backdrop, it has 
the fonts bound. When it sets texpage to -1 WZ knows the fonts are not bound 
anymore, so it will reload them next time. When I removed the call to 
pie_SetTexturePage(-1) WZ though that the fonts were still bound while they 
really were not (the backdrop was bound instead). So it drew the text with 
the backdrop texture instead of the font texture.

Well, we are all learning... Me mostly the hard way...

--Dennis


pgphmBJf7kZof.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Menu /subtitle Gfx corruption?

2007-02-20 Thread Giel van Schijndel


Dennis Schridde schreef:
> Am Dienstag, 20. Februar 2007 schrieb Giel van Schijndel:
>   
>> Giel van Schijndel schreef:
>> 
>>> [EMAIL PROTECTED] schreef:
>>>   
 Using latest svn, I notice that on menu screen, where you pick
 map/player for  multiplayer/skirmish games, on right side where
 show version, it get corrupted if you hover mouse over one of the
 options like power, and it displays low/medium/high, the version is
 then replaced with corruption.

 Same also happen when play mission, and first see mission text, it
 is also corrupted.

 Anyone else see this?

 I can post pictures if need.
 
>>> Filed a bugreport: https://gna.org/bugs/index.php?8514
>>>
>>> I'm guessing that ^ is what you're describing with "Same also happen
>>> when play mission, and first see mission text, it is also corrupted."?
>>>
>>> As for the version text cluttering in the Skirmish set-up screen. I
>>> haven't been able to reproduce that with r717. With HEAD I am however
>>> able to reproduce that, so I'm guessing it are two separately introduced
>>> bugs. Although they seem to be related because of their similarities
>>>   
>> Ok, scratch that last part.
>> I am able to reproduce the text cluttering in the Skirmish set-up screen
>> with r717.
>>
>> I probably just didn't look hard enough for it.
>> 
> I am very certain that the ability to reproduce this directly related to the 
> result of "rand()%2 == 0". ;)
>
> For those who don't get it immediately: If my theory is correct that the RGBA 
> nature of the PNGs (JPEGs are just RGB) and a broken drawing order in the 
> menu is responsible for this, then the above chunk of code decides whether a 
> PNG or a JPEG is loaded and thus whether the bug is exposed or not.
>   
Nope, I actually found the culprit.

The problem seems to be an excess call to `glDisable(GL_TEXTURE_2D);` by
pie_SetTexturePage in lib/ivis_opengl/piestate.c due to a removed call
to pie_SetTexturePage(-1);

The first call (to pie_SetTexturePage) with -1 as param actually calls
glDisable and makes sure the second call with -1 as param *won't* call
glDisable. This second call issued somewhere else in the source actually
caused glDisable(GL_TEXTURE_2D) to be called (because without the first
call, which has been removed in r717 it becomes the first).

Whatever glDisable(GL_TEXTURE_2D) does I don't know. I'm no OpenGL
expert. I do know however that if it is called the text cluttering
problem appears and that it disappears if it isn't called.

Anyway a fix is provided in r794.
Whether it is a good/real fix or just a hack that works is something I
leave up to those more experienced with OpenGL.

-- 
Giel



signature.asc
Description: OpenPGP digital signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Menu /subtitle Gfx corruption?

2007-02-20 Thread Dennis Schridde
Am Dienstag, 20. Februar 2007 schrieb Giel van Schijndel:
> Giel van Schijndel schreef:
> > [EMAIL PROTECTED] schreef:
> >> Using latest svn, I notice that on menu screen, where you pick
> >> map/player for  multiplayer/skirmish games, on right side where
> >> show version, it get corrupted if you hover mouse over one of the
> >> options like power, and it displays low/medium/high, the version is
> >> then replaced with corruption.
> >>
> >> Same also happen when play mission, and first see mission text, it
> >> is also corrupted.
> >>
> >> Anyone else see this?
> >>
> >> I can post pictures if need.
> >
> > Filed a bugreport: https://gna.org/bugs/index.php?8514
> >
> > I'm guessing that ^ is what you're describing with "Same also happen
> > when play mission, and first see mission text, it is also corrupted."?
> >
> > As for the version text cluttering in the Skirmish set-up screen. I
> > haven't been able to reproduce that with r717. With HEAD I am however
> > able to reproduce that, so I'm guessing it are two separately introduced
> > bugs. Although they seem to be related because of their similarities
>
> Ok, scratch that last part.
> I am able to reproduce the text cluttering in the Skirmish set-up screen
> with r717.
>
> I probably just didn't look hard enough for it.
I am very certain that the ability to reproduce this directly related to the 
result of "rand()%2 == 0". ;)

For those who don't get it immediately: If my theory is correct that the RGBA 
nature of the PNGs (JPEGs are just RGB) and a broken drawing order in the 
menu is responsible for this, then the above chunk of code decides whether a 
PNG or a JPEG is loaded and thus whether the bug is exposed or not.


pgpBwjQejc9EM.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Menu /subtitle Gfx corruption?

2007-02-20 Thread Kamaze
image 1:
http://img.rootzilla.de/img/3e065ef90e474b80b240161b09c49ec03c274ebc.jpg
image 2:
http://img.rootzilla.de/img/032124237f729801f2b1747c731aa242e83efc14.jpg


- kamaze

The Watermelon schrieb:
> On 2/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>>
>> Using latest svn, I notice that on menu screen, where you pick
>> map/player for  multiplayer/skirmish games, on right side where
>> show version, it get corrupted if you hover mouse over one of the
>> options like power, and it displays low/medium/high, the version is
>> then replaced with corruption.
>>
>> Same also happen when play mission, and first see mission text, it
>> is also corrupted.
>>
>> Anyone else see this?
>>
>> I can post pictures if need.
> 
> 
> I think kamaze already posted some screenshots of this problem,the 'build
> info' becomes mosaic-like when your cursor is over any clickable
> button,though it seems noone has a clue what is the cause of that
> problem
> 
> 
> 
> 
> ___
> Warzone-dev mailing list
> Warzone-dev@gna.org
> https://mail.gna.org/listinfo/warzone-dev

___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Menu /subtitle Gfx corruption?

2007-02-20 Thread Giel van Schijndel
Giel van Schijndel schreef:
> [EMAIL PROTECTED] schreef:
>   
>> Using latest svn, I notice that on menu screen, where you pick 
>> map/player for  multiplayer/skirmish games, on right side where 
>> show version, it get corrupted if you hover mouse over one of the 
>> options like power, and it displays low/medium/high, the version is 
>> then replaced with corruption.
>>
>> Same also happen when play mission, and first see mission text, it 
>> is also corrupted.
>>
>> Anyone else see this?
>>
>> I can post pictures if need.
>> 
> Filed a bugreport: https://gna.org/bugs/index.php?8514
>
> I'm guessing that ^ is what you're describing with "Same also happen
> when play mission, and first see mission text, it is also corrupted."?
>
> As for the version text cluttering in the Skirmish set-up screen. I
> haven't been able to reproduce that with r717. With HEAD I am however
> able to reproduce that, so I'm guessing it are two separately introduced
> bugs. Although they seem to be related because of their similarities
Ok, scratch that last part.
I am able to reproduce the text cluttering in the Skirmish set-up screen
with r717.

I probably just didn't look hard enough for it.

-- 
Giel



signature.asc
Description: OpenPGP digital signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Menu /subtitle Gfx corruption?

2007-02-20 Thread Giel van Schijndel
[EMAIL PROTECTED] schreef:
> Using latest svn, I notice that on menu screen, where you pick 
> map/player for  multiplayer/skirmish games, on right side where 
> show version, it get corrupted if you hover mouse over one of the 
> options like power, and it displays low/medium/high, the version is 
> then replaced with corruption.
>
> Same also happen when play mission, and first see mission text, it 
> is also corrupted.
>
> Anyone else see this?
>
> I can post pictures if need.
Filed a bugreport: https://gna.org/bugs/index.php?8514

I'm guessing that ^ is what you're describing with "Same also happen
when play mission, and first see mission text, it is also corrupted."?

As for the version text cluttering in the Skirmish set-up screen. I
haven't been able to reproduce that with r717. With HEAD I am however
able to reproduce that, so I'm guessing it are two separately introduced
bugs. Although they seem to be related because of their similarities.

-- 
Giel



signature.asc
Description: OpenPGP digital signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] Menu /subtitle Gfx corruption?

2007-02-20 Thread The Watermelon

On 2/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



Using latest svn, I notice that on menu screen, where you pick
map/player for  multiplayer/skirmish games, on right side where
show version, it get corrupted if you hover mouse over one of the
options like power, and it displays low/medium/high, the version is
then replaced with corruption.

Same also happen when play mission, and first see mission text, it
is also corrupted.

Anyone else see this?

I can post pictures if need.



I think kamaze already posted some screenshots of this problem,the 'build
info' becomes mosaic-like when your cursor is over any clickable
button,though it seems noone has a clue what is the cause of that
problem
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev