Homesource Forums

Homeworld Source Editing Talk
It is currently Mon Apr 24, 2017 9:49 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 17 posts ] 
Author Message
PostPosted: Thu Nov 23, 2006 3:47 am 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
anyone else having minor problems with the menu buttons' text while NOT in game?

i didn't see this listed in Linux/BUGS.

this has been happening before r291 for me on my intel 852gm chipset laptop, and now tried on a desktop PC using an ati radeon 9600 pro (with the slower opensource drivers). same problem. both running kubuntu 6.10, libsdl 1.2.11

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Last edited by nova on Wed Nov 29, 2006 3:07 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 4:28 am 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
Sounds a lot like this bug report under Mac OS X. The fact that you have an ATi card too is interesting but not necessarily indicative of anything...

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 5:01 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.

I get the same thing using an ATI on my laptop, and NVidia on my base PC. They're there when the screen is displayed, but the text vanishes once it's been highlighted.

Similarly, the 'HYPERSPACE JUMP' text in the taskbar is always there.

Wasn't worrying about it for the moment, but as you've mentioned it......

:)

Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 6:09 am 
Offline
coder

Joined: Wed Nov 15, 2006 8:15 am
Posts: 100
I confirm too.

Same here, on two computer equiped with Nvidia cards.

But I find out something strange, it may be interesting to look at this to find where the bug is.

When I launch from the main menu the credits, and then escape to go back to the menu, the bug has desappear and text doesn't disapper anymore, until I launch a new mission or campaign. When I quit campaign or mission to go back to the menu, the bug is back.

Very weird...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 2:49 pm 
Offline
coder

Joined: Wed Nov 15, 2006 8:15 am
Posts: 100
Update here, on this bug.

I managed to trace the bug.

It seems to be related to the glcActivate function located in src/SDL/glcompat.c

I noticed that always desactivating it even if we called glcActivate(TRUE) made buttons text reappear.

For the moment, a temporary fix is to activate the MacOsX fix me in the function.

Code:
Index: src/SDL/glcompat.c
===================================================================
--- src/SDL/glcompat.c  (rĂ©vision 334)
+++ src/SDL/glcompat.c  (copie de travail)
@@ -2362,9 +2362,9 @@
 {
     bool lastStatus;

-#ifdef _MACOSX_FIX_ME  // without this you get a wacky red front end menu
+//#ifdef _MACOSX_FIX_ME  // without this you get a wacky red front end menu
     active = FALSE;
-#endif
+//#endif

     if (!glCapFeatureExists(GL_SWAPFRIENDLY))
     {


I will investigate why when enabling it it is not working.

What about it on your build? Does it fix it?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 3:34 pm 
Offline
coder

Joined: Wed Nov 15, 2006 8:15 am
Posts: 100
After correcting a minor bug in psModeBegin,

It showed me that glcActivate is totally messing with the rendering in the Main Menu.

If you want to try apply the following patch :

Code:
Index: src/Game/PlugScreen.c
===================================================================
--- src/Game/PlugScreen.c       (rĂ©vision 334)
+++ src/Game/PlugScreen.c       (copie de travail)
@@ -534,7 +534,7 @@
 ----------------------------------------------------------------------------*/
 void psStartup(void)
 {
-    psGLCompat = FALSE;
+//    psGLCompat = FALSE;
     psScreenImage.imageQuilt = NULL;
     psScreenImage.width = 0;
     psScreenImage.height = 0;


In fact, psModeBegin was modifying psGLCompat value, in order in psModeEnd to come back to previous mode (psGLCompat is used to activate or desactive glcActivate value.
But after modifying psGLComput, psModeBegin was always calling psStartup, which by default always set the value to FALSE. So mode wasn't reactivate at all after viewing the credits.

As psStartup is only called by psBegin, and psGLCompat is defined in hard, I commented it.

And here the magic happen if we apply this patch, when coming back from Credits to Main menu I only get a black screen, with the tecxt box appearing without text when I put my mouse on an option.

Hope this post is enough clear.

Finally, this proves that the problem really seems to come from glcActivate.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 29, 2006 4:40 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.

I've traced it back to:
Code:
Index: src/SDL/main.c
===================================================================
--- src/SDL/main.c      (revision 339)
+++ src/SDL/main.c      (working copy)
@@ -174,7 +174,8 @@
 bool mainDirectDraw = TRUE;
 bool mainRasterSkip = FALSE;
 bool mainDoubleIsTriple = FALSE;
-bool mainFastFrontend = TRUE;
+//bool mainFastFrontend = TRUE;
+bool mainFastFrontend = FALSE;
 bool mainForceSoftware = FALSE;
 bool mainAutoRenderer = TRUE;
 bool mainForceKatmai = FALSE;



by way of:
Code:
Index: src/SDL/glcaps.c
===================================================================
--- src/SDL/glcaps.c    (revision 339)
+++ src/SDL/glcaps.c    (working copy)
@@ -866,6 +866,9 @@
     if (mainFastFrontend)
     {
         glCapSwapFriendly = TRUE;
+//        The above line blanks the text in the boxes of the menus on the Linux build, and I guess the mac build as well
+//     Setting it to false, or the mainFastFrontend value to false in main.c. Set either to FALSE resolves the problem,
+//     but need to see if it breaks anything else. :)
     }
     else
     {



Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 29, 2006 5:04 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
......

And this can also be proven by using
/noFastFE
as a starting switch to homeworld.

As far as I can tell this only switch and value only affects the status of the glcompat module., which only seems to be used in the menus. :)

I cannot commit anything at the moment BTW as my source is rather modified and I don't want to corrupt anything. :(

Aunxx.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 29, 2006 8:31 pm 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
@aunxx: thanks for the commit (r340).

it seems to work fine (problem fixed), and I also notice that the odd menu lag is gone for me. cool.

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 4:54 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.

You're welcome. :)

I must say that Azurief and whoever found the MAC problem did most of the work though.

Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 02, 2006 8:27 am 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
Unfortunately, this didn't fix the Mac OS X issue. I'll take another look later - it's either something else or some #ifdefs are interfering with your fix. :(

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 02, 2006 12:21 pm 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.

Line 177 in SDL/main.c
Code:
#ifdef __GNUC__
bool mainFastFrontend = FALSE;
#else
bool mainFastFrontend = TRUE;
#endif


Sorry, I didn't want to break any other builds. :)
Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 02, 2006 12:54 pm 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
No, that doesn't fix it either. :(

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:05 am 
Offline
Site Admin
User avatar

Joined: Tue Dec 14, 2004 12:41 am
Posts: 326
lmop wrote:
No, that doesn't fix it either. :(


was this resolved for Mac through deprecating glcompat?

And was the resolution a fixme? :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 3:50 am 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
No, it's still broken on Mac OS X (with or without glcompat.*) and I haven't had time to look into why. :(

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 9:08 am 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
to be clear, no problems on win32.

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 10:36 am 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
r467 fixes this issue on Mac OS X and affects all other platforms that use OpenGL too (RGL array index incorrectly used in a direct OpenGL call). You might want to try reverting the mainFastFrontend changes made earlier to see if this solves the problem for everyone.

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group