Inside3D!
     

Compiling Glquake on windows7
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Tue Mar 30, 2010 11:00 pm    Post subject: Reply with quote

Is it the old 'bragabouthowhardcoreourcardisbyspammingthestringsfullofsupportedglextensions' bug?
_________________
Back to top
View user's profile Send private message
Charlieguitar



Joined: 29 Mar 2010
Posts: 20

PostPosted: Tue Mar 30, 2010 11:11 pm    Post subject: Reply with quote

yep that one doesnt work either.

MSVC points to this line in dbghook.c ??

_debugger_hook_dummy = 0;

Not sure whats going on as thats obviously not part of the engine.
Back to top
View user's profile Send private message
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Tue Mar 30, 2010 11:45 pm    Post subject: Reply with quote

leileilol wrote:
Is it the old 'bragabouthowhardcoreourcardisbyspammingthestringsfullofsupportedglextensions' bug?

Idea Idea Idea

Open gl_vidnt.c, look for this line in GL_Init (line number 609 or thereabouts):
Code:
   Con_Printf ("GL_EXTENSIONS: %s\n", gl_extensions);

And comment it out. Very Happy
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Charlieguitar



Joined: 29 Mar 2010
Posts: 20

PostPosted: Tue Mar 30, 2010 11:51 pm    Post subject: Reply with quote

haha wow, thankyou mh and leileilol that lets it run now!!!
Awesome!

im having some weird graphical glitches(all textures are white) but atleast the engine runs now so i can move on to the next problem haha
Thanks guys
Back to top
View user's profile Send private message
Charlieguitar



Joined: 29 Mar 2010
Posts: 20

PostPosted: Tue Mar 30, 2010 11:53 pm    Post subject: Reply with quote

and ive now fixed that with the -no8bit command
yay Very Happy
time to get to the fun parts!
Back to top
View user's profile Send private message
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Wed Mar 31, 2010 11:42 am    Post subject: Reply with quote

Good news. Very Happy

A few suggestions for what to do next. There are some serious bugs in GLQuake that need fixing before you start having fun. Two major ones are in GL_LoadTexture (in gl_draw.c) and in Sbar_DrawFace (in sbar.c).

For the GL_LoadTexture bug, look for this block:
Code:
   else {
      glt = &gltextures[numgltextures];
      numgltextures++;
   }
And change it to this (i.e. remove the else condition):
Code:
   glt = &gltextures[numgltextures];
   numgltextures++;

For the Sbar_DrawFace bug, look for this:
Code:
   if (cl.stats[STAT_HEALTH] >= 100)
      f = 4;
   else
      f = cl.stats[STAT_HEALTH] / 20;
And change it to this:
Code:
   if (cl.stats[STAT_HEALTH] >= 100)
      f = 4;
   else if (cl.stats[STAT_HEALTH] <= 0)
      f = 0;
   else
      f = cl.stats[STAT_HEALTH] / 20;

Here we're just adding a < 0 condition so that the engine won't crash if health goes less than -19.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Charlieguitar



Joined: 29 Mar 2010
Posts: 20

PostPosted: Wed Mar 31, 2010 4:41 pm    Post subject: Reply with quote

oh awesome, added those little snippets! Thanks for all the information and help, really apreciate it guys Very Happy

I'll no doubt be back for more help in the future Smile
Back to top
View user's profile Send private message
Tomaz



Joined: 05 Nov 2004
Posts: 49

PostPosted: Sun Apr 04, 2010 4:11 pm    Post subject: Reply with quote

mh wrote:
leileilol wrote:
Is it the old 'bragabouthowhardcoreourcardisbyspammingthestringsfullofsupportedglextensions' bug?

Idea Idea Idea

Open gl_vidnt.c, look for this line in GL_Init (line number 609 or thereabouts):
Code:
   Con_Printf ("GL_EXTENSIONS: %s\n", gl_extensions);

And comment it out. Very Happy


Another way to fix it is to go to Con_Printf ( console.c around line 370ish )

change:

#define MAXPRINTMSG 4096

to:

#define MAXPRINTMSG 1024 * 16

and also change the call to:

vsprintf (msg,fmt,argptr);

to say:

vsnprintf (msg,sizeof(msg),fmt,argptr);

The new vsnprintf fixes the crash itself ( I have replaced all calls to vsprintf and sprintf in my entire code to use vsnprintf and snprintf )

The reason it fixes it is because it limits the amount of text that can be put in the string. The change on the define is so it will actually be able to display all the extensions and not just cut off halfway through.

Just my $0.02

mh wrote:


For the Sbar_DrawFace bug, look for this:
Code:
   if (cl.stats[STAT_HEALTH] >= 100)
      f = 4;
   else
      f = cl.stats[STAT_HEALTH] / 20;
And change it to this:
Code:
   if (cl.stats[STAT_HEALTH] >= 100)
      f = 4;
   else if (cl.stats[STAT_HEALTH] <= 0)
      f = 0;
   else
      f = cl.stats[STAT_HEALTH] / 20;

Here we're just adding a < 0 condition so that the engine won't crash if health goes less than -19.


Sweet! I had not caught that one, adding it to CleanQuakeCpp !
Back to top
View user's profile Send private message
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Sun Apr 04, 2010 5:10 pm    Post subject: Reply with quote

Tomaz wrote:
Another way to fix it is to go to Con_Printf ( console.c around line 370ish )

change:

#define MAXPRINTMSG 4096

to:

#define MAXPRINTMSG 1024 * 16

and also change the call to:

vsprintf (msg,fmt,argptr);

to say:

vsnprintf (msg,sizeof(msg),fmt,argptr);

Yup, that's probably a better way of doing it. Very Happy
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Mon Apr 05, 2010 6:06 am    Post subject: Reply with quote

chugging in with some extra info

if using msvc 8 on windows 7 you might get errors while linking

took me a bit of digging to find out you need this -> Microsoft Windows SDK v7.0

when installed you need to register this sdk with msvc theres a shortcut for this function in the shortcut folder.
Back to top
View user's profile Send private message
Charlieguitar



Joined: 29 Mar 2010
Posts: 20

PostPosted: Wed Apr 07, 2010 4:14 pm    Post subject: Reply with quote

Thanks reckless, i for sure have been having some linker errors. 50% of the time linker.exe actually crashes and i have to hit compile a second time to make it work. very strange, hopefully the SDK will sort that out Smile)
cheers!
And thanks again to all, the help ive gotten here has really fired me up Very Happy

Are there many other tutorial sites for quake1 engine programming? I've tried out a few of the old ones such as phoenix's interpolation and a few others, sadly due to my inexperience i have some trouble even making theses tutorials work in my code. Any helpfull links and things would be great!
Back to top
View user's profile Send private message
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Wed Apr 07, 2010 6:00 pm    Post subject: Reply with quote

The old QuakeSrc.org tutorials are here: http://www.quake-1.com/docs/quakesrc.org/

Some of them are slightly ropey (watch out for the ones I wrote!), but a lot of people started out here. The Hexen II ones should also be mostly usable, and even some of the Quake II ones, although you may have to massage the code a little to get things working right (but that's half the fun!)

It's also worthwhile to download the Hexen II and Quake II code as a lot of it is actually usable in Quake.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Thu Apr 08, 2010 6:34 am    Post subject: Reply with quote

aye for some reason the old manifest tool with windows sdk 6 and 6.1
crashes the linker on win7 exact same error i was getting sdk 7.0 fixes it mostly allthough i had a few occasions where it still does it but far less frequent (seems to be permission related).

atleast there next version will have side by side configuration removed and about time that function alone has caused me more headaches than anything Laughing
Back to top
View user's profile Send private message
Charlieguitar



Joined: 29 Mar 2010
Posts: 20

PostPosted: Sat Apr 10, 2010 6:41 pm    Post subject: Reply with quote

fairly consistent problem im having right now is that the weapon models are randomly dissapearing in game. I've not edited any of that code so im not sure whats going on. Is this a known bug? Any suggestions where i start looking to correct it? this machine has a nvidia 8800. I've recompiled quake with the latest dxsdk etc.. Also this problem doesnt happen with fquake or dark places.
Back to top
View user's profile Send private message
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Sat Apr 10, 2010 10:02 pm    Post subject: Reply with quote

might be the ol ztrick hack some newer cards REALLY dont like this one.

[code
void R_Clear (void)
{
if (r_mirroralpha->value != 1.0)
{
if (gl_clear->value)
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
else
glClear (GL_DEPTH_BUFFER_BIT);
gldepthmin = 0;
gldepthmax = 0.5;
glDepthFunc (GL_LEQUAL);
}
else if (gl_ztrick->value) // ztrick hack
{
static int trickframe;

if (gl_clear->value)
glClear (GL_COLOR_BUFFER_BIT);

trickframe++;
if (trickframe & 1)
{
gldepthmin = 0;
gldepthmax = 0.49999;
glDepthFunc (GL_LEQUAL);
}
else
{
gldepthmin = 1;
gldepthmax = 0.5;
glDepthFunc (GL_GEQUAL);
}
}
else
{
if (gl_clear->value)
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
else
glClear (GL_DEPTH_BUFFER_BIT);
gldepthmin = 0;
gldepthmax = 1;
glDepthFunc (GL_LEQUAL);
}

glDepthRange (gldepthmin, gldepthmax);
}
[/code]

try setting gl_ztrick to 0 in game and reload the lvl if this fixes it remove this part

[code
else if (gl_ztrick->value) // ztrick hack
{
static int trickframe;

if (gl_clear->value)
glClear (GL_COLOR_BUFFER_BIT);

trickframe++;
if (trickframe & 1)
{
gldepthmin = 0;
gldepthmax = 0.49999;
glDepthFunc (GL_LEQUAL);
}
else
{
gldepthmin = 1;
gldepthmax = 0.5;
glDepthFunc (GL_GEQUAL);
}
}
[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2004 phpBB Group