eWallRim::Bound

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

well, it kinda worked...but the high beams are on :o
Attachments
arh! my eyes!
arh! my eyes!
meh
meh
screenshot_3.png
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

I've got it down to these errors:

Code: Select all

g++ -I. -I.. -I../..  -Os -Wno-long-long -I/usr/include/libxml2 -I/usr/include/SDL -D_REENTRANT -I../../../armagetronad/src/tools/ -I../../../armagetronad/src/engine/ -I../../../armagetronad/src/network/ -I../../../armagetronad/src/ui/ -I../../../armagetronad/src/render/  -I../../../armagetronad/src/tron -I../../../armagetronad/src -c  ../../../armagetronad/src/tron/gCycle.cpp -o gCycle.o
../../../armagetronad/src/tron/gCycle.cpp: In member function `virtual void gCycle::Render(const eCamera*)':
../../../armagetronad/src/tron/gCycle.cpp:2089: error: `glProgramStringARB' undeclared (first use this function)
../../../armagetronad/src/tron/gCycle.cpp:2089: error: (Each undeclared identifier is reported only once for each function it appears in.)
../../../armagetronad/src/tron/gCycle.cpp:2092: error: `glProgramLocalParameter4fARB' undeclared (first use this function)
make[1]: *** [gCycle.o] Error 1
make[1]: Leaving directory `/home/dave/Projects/aabuild/src/tron'
make: *** [armagetronad] Error 2
[dave@ghostwheel aabuild]$    
So, just the two functions in glext.h.

So I opened SDL_opengl.h, and these functions are clearly declared there, but they're wrapped around #ifdefs of all sorts. Are you sure you didn't do a #define you're holding back on? I checked config.h for any of the symbols I saw in SDL_opengl.h and didn't find any. Similarly I checked rSDL.h, rGL.h, rRender.h, etc. And gCycle.h of course.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

nemo: looks like you don't have ARB_fragment_program. Can you find it in glGetString(GL_EXTENSIONS)? The older the GPU the less likely.
Lucifer: I did my own platform-dependent include of faster entry points (CGLMacro in OS X).
ˌɑrməˈɡɛˌtrɑn
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

You're in trouble Jonathan. :) Here's what I had to do:

Code: Select all

void gCycle::Render(const eCamera *cam){
#ifdef LINUX
typedef void (*glProgramStringARB_Func)(unsigned int);
glProgramStringARB_Func glProgramStringARB_ptr = 0;

typedef void (*glProgramLocalParameter4fARB_Func)(unsigned int);
glProgramLocalParameter4fARB_Func glProgramLocalParameter4fARB_ptr = 0;

glProgramStringARB_ptr = (glProgramStringARB_Func) SDL_GL_GetProcAddress("glProgramStringARB");
glProgramLocalParameter4fARB_ptr = (glProgramLocalParameter4fARB_Func) SDL_GL_GetProcAddress("glProgramLocalParameter4fARB");
#endif
To get this:

Code: Select all

../../../armagetronad/src/tron/gCycle.cpp: In member function `virtual void gCycle::Render(const eCamera*)':
../../../armagetronad/src/tron/gCycle.cpp:2100: error: too many arguments to function
../../../armagetronad/src/tron/gCycle.cpp:2107: error: too many arguments to function
make[1]: *** [gCycle.o] Error 1
The lines in question look like this:

Code: Select all

#ifdef LINUX
				glProgramStringARB_ptr(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(program), program);
#else
				glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(program), program);
#endif
				cycleprograminited = true;
			}
#ifdef LINUX
			glProgramLocalParameter4fARB_ptr(GL_FRAGMENT_PROGRAM_ARB, 0, 0, 0, speed * speed, 0);
#else			
Now what? :( This better be *really* good..... :evil:
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

Jonathan wrote:nemo: looks like you don't have ARB_fragment_program. Can you find it in glGetString(GL_EXTENSIONS)? The older the GPU the less likely.
Lucifer: I did my own platform-dependent include of faster entry points (CGLMacro in OS X).
yea, not there. Its a Geforce4MX. :(
User avatar
LETE
Core Dumper
Posts: 128
Joined: Sat May 21, 2005 5:40 am
Location: Hey if i'm not here i'm most likely on the grid

Post by LETE »

hey nemo FPS looks nice. :wink:
Image
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Google rules.

I read German!

(believe it or not, Google's half-assed translation of this page was enough for me to zero in the code I needed to get mine to compile)

Ok, it's fast enough. Now can we get it a little less hardware-dependent? Jonathan, you're the expert on shader languages (whether you wanted to be or not). I've got a view just like what Nemo posted in his screenshots.

How about an actual half-cone? What would that take? Or a paraboloid would actually be better, since that's the actual shape of a headlight. With softer light, that sort of thing.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Committed as-is, but it needs work. Also, more translation strings. I didn't put them in the code quite right, heh. I'll get it, you know, tomorrow or something.

Nemo: I, uh, overwrote your console addition, sorry. I created a menu item for the headlight and set it to default to off.

Ok, the headlight. I'm willing to be it won't compile on other platforms. If you hit the headlight, you can disable it still the old way. If you want to give it 5 minute and see if you can get it to work, try removing the #ifdef LINUX, seeing as how I have a suspicion that code I stuck in there to make it compile for me is highly likely to be cross-platform.

I also suspect that to get it to look like Jonathan's screenshot you need a certain breed of GPU. So y'all take a look at it and if we (meaning Jonathan) can get it to look reasonably well (without, you know, blinding us like it does now) then I'd like to see it in aardvark. If not, we can disable it for aardvark.

Oh yeah, for performance I normally get around 150fps on network play. With the headlight it cut me down around 100 and it varied a lot more. It's normally solid around 150fps, but with the headlight I ranged from 80-120.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

Lucifer wrote:Ok, it's fast enough. Now can we get it a little less hardware-dependent? Jonathan, you're the expert on shader languages (whether you wanted to be or not). I've got a view just like what Nemo posted in his screenshots.
I'm not an expert, I just know how to use them. I'm an expert on not checking if hardware supports it though. :twisted:
How about an actual half-cone? What would that take? Or a paraboloid would actually be better, since that's the actual shape of a headlight. With softer light, that sort of thing.
At the moment I have a point light that is only visible in an arc specified by mul and add. It is possible to make a spotlight, I'll experiment with it when I want to spend some time on it.
I also suspect that to get it to look like Jonathan's screenshot you need a certain breed of GPU.
You need one of those GPUs with DX9 support (DX9 is more likely on the box than ARB_fragment_program).
So y'all take a look at it and if we (meaning Jonathan) can get it to look reasonably well (without, you know, blinding us like it does now) then I'd like to see it in aardvark. If not, we can disable it for aardvark.
You'd need to add a lot of vertices and some complexity to the code to get an approximation of the fragment program. Normal OpenGL lighting can do exactly what we need so you don't have to do the lighting yourself.
ˌɑrməˈɡɛˌtrɑn
User avatar
~|DS|~|Patch|
On Lightcycle Grid
Posts: 40
Joined: Wed Jan 18, 2006 4:47 am
Location: The Woodlands, Texas

Post by ~|DS|~|Patch| »

mmkaaay, i read this entire thread, XD and i want to know EXACTALY where to put this code, i want to be a computer nerd, but i'm not yet ;) i just wanna kow where to put this code, a file or something...
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

It's included in current versions. grep for headlight to see where things were added.
User avatar
~|DS|~|Patch|
On Lightcycle Grid
Posts: 40
Joined: Wed Jan 18, 2006 4:47 am
Location: The Woodlands, Texas

Post by ~|DS|~|Patch| »

grep for headlight, whats that mean?
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

A word for "search the contents of all files for HEADLIGHT".

UNIX command:

Code: Select all

grep -r HEADLIGHT src
Windows: uh, no idea. Install cygwin.
There's no place like ::1
User avatar
~|DS|~|Patch|
On Lightcycle Grid
Posts: 40
Joined: Wed Jan 18, 2006 4:47 am
Location: The Woodlands, Texas

Post by ~|DS|~|Patch| »

It says that it can't be found.
k
Random Identifier & Project Developer
Posts: 345
Joined: Wed Feb 25, 2004 12:54 am
Location: Northern California, USA

Post by k »

wrtlprnft wrote:Windows: uh, no idea. Install cygwin.
CygWin is overkill. :) GnuWin32 has Windows ports. http://gnuwin32.sourceforge.net/
Post Reply