Announcement

Collapse
No announcement yet.

Alien Arena 2010 v7.45 Offers Up More Features

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #41
    Originally posted by Irritant View Post
    That's ok, the problem is that the driver is returning either one of those. The game is checking for the extension, if the driver returns it, it proceeds forward. If the driver didn't return the extension, the game wouldn't try to use it.

    The problem is the driver should not return the extension, because the extension is broken in the driver.
    I don't quite follow. As far as I can see you specifically call dlsym("glBlitFramebufferEXT") which returns a NULL pointer because that symbol does not exist in mesa's libGL. Anyway I propose this fix instead:
    Code:
    diff -ur alienarena7_45//source/ref_gl/qgl.h alienarena7_45.mod//source/ref_gl/qgl.h
    --- alienarena7_45//source/ref_gl/qgl.h	2010-06-15 05:27:57.000000000 +0000
    +++ alienarena7_45.mod//source/ref_gl/qgl.h	2010-08-01 18:00:54.338000427 +0000
    @@ -558,7 +558,7 @@
     #ifdef __unix__
    
     
    
     // local function in dll
    
    -extern void *qwglGetProcAddress(char *symbol);
    
    +#define qwglGetProcAddress glXGetProcAddress
    
     
    
     extern void (*qgl3DfxSetPaletteEXT)(GLuint *);
    
     
    
    diff -ur alienarena7_45//source/ref_gl/r_postprocess.c alienarena7_45.mod//source/ref_gl/r_postprocess.c
    --- alienarena7_45//source/ref_gl/r_postprocess.c	2010-07-08 05:37:15.000000000 +0000
    +++ alienarena7_45.mod//source/ref_gl/r_postprocess.c	2010-08-01 18:22:45.030000312 +0000
    @@ -219,8 +219,7 @@
     	qglMatrixMode(GL_MODELVIEW);
    
     	qglPushMatrix();
    
     	qglLoadIdentity();
    
    -
    
    -	if(gl_state.fbo && gl_state.hasFBOblit && atoi(&gl_config.version_string[0]) >= 3.0) {
    
    +	if(gl_state.fbo && gl_state.hasFBOblit) {
    
     
    
     		alpha/=1.5; //necessary because we are blending two quads
    
     
    
    @@ -269,7 +268,7 @@
     	qglVertex2f(-5, 10);
    
     	qglEnd();
    
     
    
    -	if(gl_state.fbo && gl_state.hasFBOblit && atoi(&gl_config.version_string[0]) >= 3.0) {
    
    +	if(gl_state.fbo && gl_state.hasFBOblit) {
    
     
    
     		qglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
    
     
    
    diff -ur alienarena7_45//source/unix/qgl_unix.c alienarena7_45.mod//source/unix/qgl_unix.c
    --- alienarena7_45//source/unix/qgl_unix.c	2008-02-08 23:24:33.000000000 +0000
    +++ alienarena7_45.mod//source/unix/qgl_unix.c	2010-08-01 18:01:20.361000407 +0000
    @@ -2998,13 +2998,6 @@
     
     #define GPA( a ) dlsym( glw_state.OpenGLLib, a )
     
    -void *qwglGetProcAddress(char *symbol)
    -{
    -	if (glw_state.OpenGLLib)
    -		return GPA ( symbol );
    -	return NULL;
    -}
    -
     /*
     ** QGL_Init
     **
    This converts the method of getting addresses of the extension functions from a direct dlopen&dlsym to glXGetProcAddress which I found out is the new preferred way. I also removed the restriction on OpenGL >= 3 from the code paths that actually use that extension so users with OpenGL 2 cards can enjoy them too (even though here fps drop to unplayable levels with no visible difference). Also I want to stress that the extension definitely does get loaded (it passes that code block with I previously commented out) and does definitely get used if I enable "shadow maps" in Video Options.

    Comment


    • #42
      glBlitFramebufferEXT is defined the same as glBlitFramebuffer to the best of my knowledge, so that is not really an issue. Also, the problem is that glBlitFramebufferEXT is actually not being returned as null, otherwise

      Code:
      if(gl_state.hasFBOblit) {
      		if(!qglBlitFramebufferEXT) {
      			Com_Printf("qglBlitFramebufferEXT not found...\n");
      			//no point in continuing on
      			gl_state.hasFBOblit = false;
      			return;
      		}
      	}
      would be setting gl_state.hasFBOblit = false, and there wouldn't be any problems.

      I'll add the changes you've made, except for the OGL 3.0 checks. The reason those are there, is because FBO blitting is horrendously slow on OGL 2.0, so we definitely don't want people with OGL 2.0 using those functions, even if their cards are capable of doing it.

      Comment


      • #43
        Oh, and thanks btw for those changes!

        Comment

        Working...
        X