Sauerbraten engine development |
by Aardappel
on 03/03/2004 05:18, 1571 messages, last message: 03/14/2008 18:53, 1351253 views, last view: 12/09/2021 04:10 |
 |
|
This thread is for discussion of Sauerbraten coding issues / implementation ideas etc.
|
 |
|

Board Index

|
 |
#1475: Re: .. |
|
by absinth
on 06/03/2006 02:59, refers to #1462
|
 |
|
>I see that fullscreen shaders are now working portably/properly (at least on osx/ATIx800), well done.
how did you get it to compile at all? with current CVS i have problems related to opengl functions pointers:
1. different naming, e.g. PFNGLGENPROGRAMSARBPROC/glGenProgramsARBProcPtr
2. it seems on macosx you can't mix and match function pointers and "normal calls", it seems like it's an all or nothing thing...
3. using the sauerbraten supplied glext.h to circumvent these problems seems like a very bad idea
reply to this message
|
 |
#1476: Re: .. |
|
by Aardappel_
on 06/03/2006 04:02, refers to #1475
|
 |
|
3. why? if your compilation problems come from using some macosx modified version of glext.h, that would be a bad idea. The version of glext.h is the latest official one from SGI, it is included specifically to avoid compilation incompatabilities.
reply to this message
|
 |
#1477: Re: .. |
|
by guest57
on 06/03/2006 12:41, refers to #1475
|
 |
|
My currrent 'solution' is to edit pch.h and hardcode the extension - yuck.
//#define NO_SDL_GLEXT
#include <SDL_opengl.h>
#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
-- aka rpointon
reply to this message
|
 |
#1478: My attempt to reenable and fix /savegame and /loadgame |
|
by xoltra
on 06/03/2006 23:48
|
 |
|
I found that /savegame and /loadgame pretty much works for a given instance of sauer_client. Rearranging things a bit so that it does not save any pointers or references makes it work correctly, as far as I can tell (except for some minor stuff such as monsters not remembering they were int the middle of infighting with a fellow monster).
My patch is at the end of my patch page:
http://home.austin.rr.com/selliott4/sauerbraten/
reply to this message
|
 |
#1479: Re: CVS access |
|
by xoltra
on 06/04/2006 00:44, refers to #1477
|
 |
|
Try again. It seems to be working now (2006-06-03).
reply to this message
|
 |
#1480: Re: .. |
|
by absinth
on 06/04/2006 01:57, refers to #1476
|
 |
|
>The version of glext.h is the latest official one from SGI, it is included specifically to avoid compilation incompatabilities.
hmmm i was just under the impression that using the SGI header file but apple's opengl runtime could cause very nasty problems. if you tell me this can't possibly make problems i'm glad to use this "workaround".
btw. what is the reason that we don't use the glext definitions from SDL_opengl.h (i.e. #define NO_SDL_GLEXT)
reply to this message
|
 |
#1481: .. |
|
by absinth
on 06/04/2006 02:15
|
 |
|
>i was just under the impression that using the SGI header file but apple's opengl runtime could cause very nasty problems.
forget my rambling, it seems we have already always done so
also, with cvs trunk the compilation problems seem to have gone away too
reply to this message
|
 |
#1482: Re: .. |
|
by eihrul
on 06/04/2006 16:23, refers to #1480
|
 |
|
The definitions in SDL_opengl.h are ancient, i.e. it did not have any support for texture_rectangle.
reply to this message
|
 |
#1483: .. |
|
by absinth
on 06/04/2006 16:33
|
 |
|
>The definitions in SDL_opengl.h are ancient
SDL 1.2.10 fixes that
reply to this message
|
 |
#1484: Re: .. |
|
by eihrul
on 06/04/2006 16:50, refers to #1483
|
 |
|
Still better to include our own, just so we don't have to force people to use the most recent versions of SDL, and so we can be sure its up to date.
reply to this message
|
 |
#1485: Message censored by administrator |
|
by Passa
on 06/07/2006 08:08
|
 |
 |
#1486: echo [] |
|
by nieb
on 06/07/2006 21:57
|
 |
|
Could you add a value to echo that lets you set the text color of the echo
echo [door opened!] N;
N = 0-15
being the 16 basic colors
Anyways this would be nice for SP.
reply to this message
|
 |
#1487: windows stacktraces |
|
by Aardappel_
on 06/07/2006 23:59
|
 |
|
From now on, when sauer crashes, it will give a proper stacktrace on windows. Be sure to copy that when you report any sauer crash.
reply to this message
|
 |
#1488: .. |
|
by Stern
on 06/08/2006 21:58
|
 |
|
Haha it's funny watching you all talk about running it with 10-20 fps. I was running Cube1 with 250ish fps, and probably a similar number for Cube2. Then again, my computer is amazing... :)
reply to this message
|
 |
#1489: lighting bug |
|
by guest57
on 06/11/2006 22:31
|
 |
|
I've just seen a map with 'lerpsubdiv' set to a high number (45), maybe it was corrupt? Anyway the result is that the calc light routine will loop forever in addnormals() 'while(size/subdiv < lerpsubdivsize) ...'
- aka rpointon
reply to this message
|
 |
#1490: bloom patch |
|
by guest57
on 06/12/2006 00:20
|
 |
|
An experiment in adjusting the bloom depending on the brightness of the screen:
rendergl.cpp:renderfullscreenshader()
loopi(NUMSCALE)
{
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, rendertarget[i]);
glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 0, 0, nw, nh);
/* >>>>> BEGIN
* Grab the smallest texture into main memory
* - average the RGB
*/
if(i==NUMSCALE-1) {
const int bytes = nw*nh*4;
float result[bytes];
glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
glReadPixels(0, 0, nw, nh, GL_RGBA, GL_FLOAT, result);
int j;
float t = 0.0;
for(j=0; j < bytes; j+=4)
t += result[j] + result[j+1] + result[j+2];
t /= nw*nh*3;
/* adjust the bloom level... need to tweak, and maybe add delay? */
fsparams[0] = 0.2/t;
}
/* <<<< END */
if(i>=NUMSCALE-1 || !scaleshader) break;
renderfsquad(nw /= 2, nh /= 2, scaleshader);
};
-aka rpointon
reply to this message
|
 |
#1491: .. |
|
by Wolfgang
on 06/14/2006 14:39
|
 |
|
Bug in copy which I checked out a few minutes ago:
D:\sauerbraten>bin\sauerbraten.exe -w1280 -h800
init: sdl
init: enet
init: video: mode
init: video: misc
init: console
init: gl
Using GL_ARB_vertex_buffer_object extension.
WARNING: Using floating point vertexes. (use "/floatvtx 0" to disable)
Rendering using the OpenGL 1.5 assembly shader path.
Using GL_ARB_occlusion_query extension.
WARNING: No texture rectangle support. (no full screen shaders)
WARNING: Non-power-of-two textures not supported!
COMPILE ERROR (VS:0) - Error on line 1: missing or invalid version (hint: 'defau
lt')
default <<HERE>>
☻COMPILE ERROR (PS:0) - line 1: invalid header
!!ARB <<HERE>>
vp1.0
ATTRIB opos = vertex.position;
OUTPUT spos = result.position;
DP4 spos.x, state.matrix.mvp.row[0], opos;
DP4 spos.y, state.matrix.mvp.row[1], opos;
DP4 spos.z, state.matrix.mvp.row[2], opos;
DP4 spos.w, state.matrix.mvp.row[3], opos;
MOV result.texcoord[0], vertex.texcoord[0];
MOV result.color, vertex.color;
END
Sauerbraten Win32 Exception: 0xc0000005 [0x4]
Shader::set - shaders.h [19]
gl_init - rendergl.cpp [207]
SDL_main - main.cpp [350]
__tmainCRTStartup - crtexe.c [586]
reply to this message
|
 |
#1492: Sauer Bumpmapping |
|
by shadow,516
on 06/15/2006 01:23
|
 |
|
http://shadow516.googlepages.com/FirstSauerBumpmaps.jpg
I must say, that's pretty goddamn sexy aard!
reply to this message
|
 |
#1493: Re: Sauer Bumpmapping |
|
by Aardappel_
on 06/15/2006 06:16, refers to #1492
|
 |
|
pfftt... I check stuff in cvs just to share between myself and eihrul... if you check it out at random times expect half-baked versions. Unless you actively participate in development, I recommend sticking to the releases :)
reply to this message
|
 |
#1494: Re: Sauer Bumpmapping |
|
by shadow,516
on 06/15/2006 13:46, refers to #1493
|
 |
|
I know, but I can never wait to see the next thing you guys come up with ;)
reply to this message
|
 |
 |
|

Board Index

|
 |