Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: J3Vr6 on January 25, 2003, 10:29:51 am

Title: Loading OpenGL on 3.4?
Post by: J3Vr6 on January 25, 2003, 10:29:51 am
Hi guys, I'm new to this site and I want to first say that you guys are doing a great job and hope you continue your efforts in making FS2 even more enjoyable.  When I first found this site and read all the things you all were doing to the game through the source code project, my jaw hit the floor .  I've been a FS fan since the first one and have loved playing FS2 over and over again just for the fun.

Now, I have searched though all the threads to find my answer but I've come out more confused than when I started.  I understand that 3.4 now supports OpenGL, but requires a program to launch it that you will one day release.  From the threads I see you can actually still run the game in OpenGL but that you have to edit the registry (I found one thread that someone asked about it but it only lost me).  Would you be able to please tell me what I'm supposed to edit and what to edit it with, as if you're talking to someone who has no idea about source?  I want to run 32bit 1024x768 with OpenGL (if it's possible).

I apologize if I missed a thread that perhaps gave detailed instructions.  Maybe you guys can put it under the FAQ section of the Source Code Project main website for everyone to see?

Thanks!:yes:
Title: Loading OpenGL on 3.4?
Post by: phreak on January 25, 2003, 03:58:39 pm
open up regedit and find

HKEY_LOCAL_MACHINE\Volition\Freespace2

find the string marked "videocard"

change "Direct3D -" to "OpenGL -" (be sure to put the space between OpenGL and the dash)


Its not perfect right now, but it runs
Title: Loading OpenGL on 3.4?
Post by: deep_eyes on January 25, 2003, 04:16:52 pm
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OPEN GL!
Title: Loading OpenGL on 3.4?
Post by: WMCoolmon on January 25, 2003, 06:05:03 pm
Oh, and
(http://members.cox.net/~wmcoolmon/images/yes.gif):D (http://members.cox.net/~wmcoolmon/images/welcome.gif) :D:yes:
I'm not up-to-date on the latest introduction, so I'll let someone else do the honor. ;)
Title: Loading OpenGL on 3.4?
Post by: deep_eyes on January 25, 2003, 10:31:27 pm
i did it, but i didnt notice a big diffrence with the opengl from direct x... other then the glow maps not working... but i mean if i play say counter strike, i notice a big diffrence, in FS there isnt much of a diffrence... except the glow ani's for the ships engines, dont have no more blockly looking squares in the gamma color..........

i mean maybe its the begining of the opengl code, which would explain it, but beyond that, there isnt a noticable (as far as my rigs concerned), diffrence.

anyone has any thoughts or noticed any diffrences?

also being as how for some wierd reason, in most coridoor shooters like RTCW or q3, if the hands animated to move, finger wise as well, it wont in DX, just a thought.
Title: Loading OpenGL on 3.4?
Post by: phreak on January 25, 2003, 10:34:55 pm
the only reason glowmaps don't work is that i got the ogl implementation working after the release

(http://fs2source.warpcore.org/ogl/fenrisglow.png)
Title: Loading OpenGL on 3.4?
Post by: Goober5000 on January 25, 2003, 10:42:14 pm
Okay, would it be possible to get rid of the red glowy stuff on the Fenris (not the red dot in the middle, but the rest of it)?  Looks like it's being assimilated by Shivans...
Title: Loading OpenGL on 3.4?
Post by: Bobboau on January 26, 2003, 12:16:51 am
well, yes... but look at the texture, there is some lighting of thouse parts, that  I supose you just don't see normaly
I changed the way glow maps were handeled after the intital version and I had to try and fix them blindly in OGL, I quite likely broke them in OGL,
I wonder if I uploaded my nebula glowmap fix...
looks like I didn't, and with my current build slightly unstable from my trying a few things I shal post the fix here to make sure I don't lose it, and so PhReAk can get the fix into OGL
Code: [Select]
if(GLOWMAP > 0){

gr_screen.gf_set_bitmap(GLOWMAP, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 0.0);
if ( !gr_tcache_set(gr_screen.current_bitmap, tmap_type, &u_scale, &v_scale, 0, gr_screen.current_bitmap_sx, gr_screen.current_bitmap_sy )) {
mprintf(( "Not rendering a texture because it didn't fit in VRAM!\n" ));
return;
}

gr_d3d_set_state( TEXTURE_SOURCE_DECAL, ALPHA_BLEND_ALPHA_ADDITIVE, zbuffer_type );

for (i=0; i {
if(flags & TMAP_FLAG_PIXEL_FOG)d3d_verts[i].color = RGBA_MAKE((255 - ra), (255 - ga), (255 - ba), ((ba + ga + ra)/2));
else d3d_verts[i].color = RGBA_MAKE(255, 255, 255, 0);
}
if(flags & TMAP_FLAG_PIXEL_FOG)gr_fog_set(GR_FOGMODE_NONE, 0, 0, 0);
d3d_DrawPrimitive(D3DPT_TRIANGLEFAN, D3DVT_TLVERTEX, (LPVOID)d3d_verts, nverts, NULL);
if(flags & TMAP_FLAG_PIXEL_FOG)gr_fog_set(GR_FOGMODE_FOG, ra, ga, ba);
}

Title: Loading OpenGL on 3.4?
Post by: diamondgeezer on January 26, 2003, 02:39:04 am
Forgive me for being a bit think here, but what does OGL do for me over D3D? I have a GF4 Ti4200, and I play everything in D3D (I'm pretty sure) - does the OGL stuff help me in anyway?


(Oh, and that Fenris wants pale yellow glows, instead of red. Make it look like cabin windows :))
Title: Loading OpenGL on 3.4?
Post by: deep_eyes on January 26, 2003, 10:38:52 am
Quote
Originally posted by diamondgeezer
Forgive me for being a bit think here, but what does OGL do for me over D3D? I have a GF4 Ti4200, and I play everything in D3D (I'm pretty sure) - does the OGL stuff help me in anyway?


(Oh, and that Fenris wants pale yellow glows, instead of red. Make it look like cabin windows :))


in theory, it suppose to run smoother etc. such as half life and counter strike or quake 3 based games, if u havent noticed a diffrence there then i dunno, but in fs2, the opengl didnt make much of a diffrence for me.

although u have the ubber-geforce 4, if u run it in opengl - mode for fs2, u might notice more of a diffrence then i would on my TNT2, and the graphics would run smoother or clearer.

in half life for example, d3d lagged heavily on higher resolutions, and animations wasnt that great.

in open-gl the game physics and details ran 50% faster and smoother, on the hieghest settings on my poor old tnt2 lol. on ur gf4, it should run super fast. if u dont beleieve me go and DL the return to castle wolfenstien demo and see the game, it runs completely in OPEN GL.
Title: Loading OpenGL on 3.4?
Post by: phreak on January 26, 2003, 12:16:37 pm
it averages about 5-10fps faster than d3d on my pc (p4 1.8, GF2, 256mb ram)
Title: Loading OpenGL on 3.4?
Post by: vyper on January 26, 2003, 02:05:17 pm
Hey guys, it says my OpenGL drivers are out of date but I'm running the latest drivers for the G400. :confused:
Title: Loading OpenGL on 3.4?
Post by: phreak on January 26, 2003, 02:14:58 pm
http://fs2source.warpcore.org/ogl/glExtList2.zip

run and paste the contents of the generated file
Title: Loading OpenGL on 3.4?
Post by: vyper on January 26, 2003, 02:17:10 pm
Quote
Originally posted by PhReAk
http://fs2source.warpcore.org/ogl/glExtList2.zip

run and paste the contents of the generated file


:lol: It crashed and the output file was empty.... :lol:
Title: Loading OpenGL on 3.4?
Post by: phreak on January 26, 2003, 02:31:58 pm
restart.. and retry.

failing that just use d3d