eWallRim::Bound
- Lucifer
- Project Developer
- Posts: 8641
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
I've got it down to these errors:
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.
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 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.
- Lucifer
- Project Developer
- Posts: 8641
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
You're in trouble Jonathan. Here's what I had to do:
To get this:
The lines in question look like this:
Now what? This better be *really* good.....
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
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
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
- Lucifer
- Project Developer
- Posts: 8641
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
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.
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.
- Lucifer
- Project Developer
- Posts: 8641
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
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.
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.
- Jonathan
- A Brave Victim
- Posts: 3391
- Joined: Thu Feb 03, 2005 12:50 am
- Location: Not really lurking anymore
I'm not an expert, I just know how to use them. I'm an expert on not checking if hardware supports it though.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.
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.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.
You need one of those GPUs with DX9 support (DX9 is more likely on the box than ARB_fragment_program).I also suspect that to get it to look like Jonathan's screenshot you need a certain breed of GPU.
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.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.
ˌɑrməˈɡɛˌtrɑn
- ~|DS|~|Patch|
- On Lightcycle Grid
- Posts: 40
- Joined: Wed Jan 18, 2006 4:47 am
- Location: The Woodlands, Texas
- ~|DS|~|Patch|
- On Lightcycle Grid
- Posts: 40
- Joined: Wed Jan 18, 2006 4:47 am
- Location: The Woodlands, Texas
- wrtlprnft
- Reverse Outside Corner Grinder
- Posts: 1679
- Joined: Wed Jan 04, 2006 4:42 am
- Location: 0x08048000
- Contact:
A word for "search the contents of all files for HEADLIGHT".
UNIX command:Windows: uh, no idea. Install cygwin.
UNIX command:
Code: Select all
grep -r HEADLIGHT src
There's no place like ::1
- ~|DS|~|Patch|
- On Lightcycle Grid
- Posts: 40
- Joined: Wed Jan 18, 2006 4:47 am
- Location: The Woodlands, Texas
-
- Random Identifier & Project Developer
- Posts: 345
- Joined: Wed Feb 25, 2004 12:54 am
- Location: Northern California, USA
CygWin is overkill. GnuWin32 has Windows ports. http://gnuwin32.sourceforge.net/wrtlprnft wrote:Windows: uh, no idea. Install cygwin.