Forum

Compiling Glquake on windows7

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Postby mh » Sat Apr 10, 2010 10:36 pm

gl_ztrick should be defaulted to 0, gl_clear to 1 and gl_finish to 1 for best behaviour on a modern card. You won't 17 gazillion frames per second but it will run right.

However, I bet that the cause of this problem is that the weapon models are falling foul of R_CullBox. Comment out the call to R_CullBox in R_DrawAliasModel and see if it fixes it. If so, have a thought about a way to do it correctly (such as adding a nocull flag to the entity_t struct or something similar).
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Charlieguitar » Sun Apr 11, 2010 12:45 am

thats awesome. another fix done. thanks :D

also doing the old quakesrc skybox tutorial, i seem to be having a problem

>.\gl_warp.c(912) : error C2065: 'inumverts' : undeclared identifier

The version of r_drawskychain in the tutorial looks like this

void R_DrawSkyChain (msurface_t *s)

{



msurface_t *fa;
int i;


vec3_t verts[MAX_CLIP_VERTS];

glpoly_t *p;



if (r_skybox.value) // if the skybox value is one, draw the skybox



{

c_sky = 0;

GL_Bind(solidskytexture);



// calculate vertex values for sky box



for (fa=s ; fa ; fa=fa->texturechain)

{

for (p=fa->polys ; p ; p=p->next)

{

for (i=0 ; inumverts ; i++)

{

VectorSubtract (p->verts[i], r_origin, verts[i]);

}

ClipSkyPolygon (p->numverts, verts[0], 0);

}

}



}

else // otherwise, draw the normal quake sky

{

GL_DisableMultitexture();



// used when gl_texsort is on

GL_Bind(solidskytexture);

speedscale = realtime*8;

speedscale -= (int)speedscale & ~127 ;



for (fa=s ; fa ; fa=fa->texturechain)

EmitSkyPolys (fa);



glEnable (GL_BLEND);

GL_Bind (alphaskytexture);

speedscale = realtime*16;

speedscale -= (int)speedscale & ~127 ;



for (fa=s ; fa ; fa=fa->texturechain)

EmitSkyPolys (fa);



glDisable (GL_BLEND);

}

}

Im guessing inumverts just needs to be declared somewhere, i've tried it as an int but the engine crashes on level load so im guessing it needs to be something else?
Charlieguitar
 
Posts: 20
Joined: Mon Mar 29, 2010 8:45 pm

Postby Charlieguitar » Sun Apr 11, 2010 1:12 am

ignore last post, i figured out that it was a typo and should have been
for (i=0 ; i<p->numverts ; i++)

;D
Charlieguitar
 
Posts: 20
Joined: Mon Mar 29, 2010 8:45 pm

Postby Charlieguitar » Sun Apr 11, 2010 1:59 am

One thing i'd really love to get going though is the .lit tutorial
http://www.quake-1.com/docs/quakesrc.org/95.html
I followed the instructions to a T but im guessing about 91 errors about syntax and undeclared definitions and such. has anyone else had success with this tutorial? Am i just doing something very silly?
Charlieguitar
 
Posts: 20
Joined: Mon Mar 29, 2010 8:45 pm

Postby revelator » Sun Apr 11, 2010 10:02 am

theres a couple of typos in the old tuts.

there a good pointer but the safest bet is download qip quake (has all those old tutorials implemented with comments) then do a compare if anything on the qsg tutorials look's wrong it most likely is ;)

it does take a bit of work but in the end it will work.

and i agree with mh on the culling problem. especially if you implemented phoenix interpolation tutorial it sometimes goes screwy (most notably on alias models).

there has been quite a lot of fixes through the years listing them all would be a full time job :lol:
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Sun Apr 11, 2010 10:06 am

User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Charlieguitar » Sun Apr 11, 2010 5:33 pm

thanks for the info :D Ive gotten further than last time, but it seems theres some kind of syntax error or typo even in the qip code? Specificly the r_drawaliasmodel function. The one from the tutorial and the one from the qip source both give me syntax errors for some reason.
Charlieguitar
 
Posts: 20
Joined: Mon Mar 29, 2010 8:45 pm

Postby Charlieguitar » Sun Apr 11, 2010 5:42 pm

getting these errors in both the r_buildlightmap and r_drawaliasmodel functions from QIP and the code from the tutorial
gl_rsurf.c(185) : error C2232: '->value' : left operand has 'struct' type, use '.'

this is line 185
if (r_fullbright->value || !cl.worldmodel->lightdata)

:(
Charlieguitar
 
Posts: 20
Joined: Mon Mar 29, 2010 8:45 pm

Postby mh » Sun Apr 11, 2010 6:02 pm

-> for pointers and . for non-pointers. Use .
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Charlieguitar » Sun Apr 11, 2010 6:06 pm

my bad :D
thanks, that sorted it
Charlieguitar
 
Posts: 20
Joined: Mon Mar 29, 2010 8:45 pm

Postby revelator » Sun Apr 11, 2010 11:45 pm

i guess older msvc was a bit more lenient than newer versions about pointer errors (shame on you ms) :twisted:


non the less the qip source is quite good as a starting point for looking up improvements made to quake.

and good to see progress ;)
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Tomaz » Mon Apr 12, 2010 6:15 am

reckless wrote:i guess older msvc was a bit more lenient than newer versions about pointer errors (shame on you ms) :twisted:


No it has always errored about using . and -> wrong.
Tomaz
 
Posts: 67
Joined: Fri Nov 05, 2004 8:21 pm

Postby revelator » Mon Apr 12, 2010 10:09 pm

was not to be taken seriously hehe.

had an old version of qip on my pc
which worked ok but i tried this one and got same error. allthough im not sure if i had that error sometime and just fixed it then forgot :oops:
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby WhiteMagicRaven » Tue Apr 13, 2010 9:21 am

mh wrote: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.


This is best source port and alive
http://uhexen2.sourceforge.net/
if you click "Links" on main page
you can find more source ports.
I have question:
What other source ports you know?
WhiteMagicRaven
 
Posts: 14
Joined: Tue Apr 13, 2010 8:55 am

Previous

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest