Hi all,

Re: TestRenderTexture - a SG application.

The failure of TestRenderTexture in my
system turned out enormously easy to
track down ;=)) But how to fix?

I added some, about 50 ;=)), dbg_printf() statements 
such as the follows, in <SG>/screen/RenderTexture.cpp :-
#define dbg_print printf

bool RenderTexture::_VerifyExtensions() {
   dbg_printf("RenderTexture::_VerifyExtensions() called...\n");
   [snip]
    Display* dpy = glXGetCurrentDisplay();
    int minor = 0, major = 0;
    if (!glXQueryVersion(dpy, &major, &minor)) {
        dbg_printf("_VerifyExtensions: glXQueryVersion(dpy, &major,
&minor) FAILED! returning false\n");
        return false;
    } else {
        dbg_printf("_VerifyExtensions: glXQueryVersion(dpy, major=%d,
minor=%d)\n", major, minor);
    }

    int screen = DefaultScreen(dpy);
    const char* extString = glXQueryExtensionsString(dpy, screen);
    dbg_printf("_VerifyExtensions: glXQueryExtensionsString(dpy, screen)
returned -\n[%s]\n",
      (extString ? extString : "<NULL>") );
    if (!SGSearchExtensionsString(extString, "GLX_SGIX_fbconfig") ||
        !SGSearchExtensionsString(extString, "GLX_SGIX_pbuffer")) {
        dbg_printf("_VerifyExtensions: does NOT contain
GLX_SGIX_fbconfig or GLX_SGIX_pbuffer! return false\n" );
        return false;
    }
    [snip]

And the text output result was :-

RenderTexture::_VerifyExtensions() called...
_VerifyExtensions: glXQueryVersion(dpy, major=1, minor=2)
_VerifyExtensions: glXQueryExtensionsString(dpy, screen) returned -
[GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context
GLX_EXT_visual_info GLX_EXT_visual_rating GLX_OML_swap_method
GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_visual_select_group ]
_VerifyExtensions: does NOT contain GLX_SGIX_fbconfig or
GLX_SGIX_pbuffer! return false
RenderTexture::Initialize: _VerifyExtensions() FAILED - returning false.
RenderTexture Initialization failed!

SO, my glX version 1.2 is MISSING 'GLX_SGIX_pbuffer'!!!
Now, to work out what I can do about it???

It looks like I should somehow 'upgrade' to say
version 1.3, or higher, which may then contain this
missing 'pbuffer' thingy, or SOMETHING... but Synaptic
does NOT list any upgrade!

Yahoo! got me a reference saying -
http://www.opengl.org/registry/specs/SGIX/pbuffer.txt 
Overview
 This extension defines pixel buffers (GLXPbuffers, or pbuffer for
 short). GLXPbuffers are additional non-visible rendering buffers for an
 OpenGL renderer. GLXPbuffers are equivalent to GLXPixmaps with the
 following exceptions:
 [snip]
Since that is exactly what we want - a non-visible rendering 
buffer - this looks IMPORTANT ;=))

I THINK this may be via the libraries installed, as shown 
by $ dpkg -l, but there seems no 'upgrade' available...
ii  libgl1-mesa-dri 7.0.3~rc2-1ubuntu3 OpenGL API
ii  libgl1-mesa-glx 7.0.3~rc2-1ubuntu3 OpenGL API
but maybe I am way OFF base here ;=))

One post I found Yahooing around mentioned GLEW, and
I already have 1.5 of that installed -
ii libglew1.5 1.5.0dfsg1-3ubuntu1 The OpenGL Extension Wrangler
and have now installed glew-dev... It MAY
all be possible adding :-

#include <GL/glew.h>
// before <GL/gl.h>
[snip]
int main( int arc, char **argv) {
   GLenum err=glewInit();
   if(err!=GLEW_OK) { //problem: something is seriously wrong
      printf("Error: glewInit() FAILED! %s\n", glewGetErrorString(err));
      return -1;
   }
   // and then try...
   glutInit(&argn, argv);
   // [etc]


But I am paddling well over my head!

Any help appreciated ;=))

Geoff.
OS: Ubuntu 8.04 64-bit
VID: ATI Radeon HD 2600 XT

PS: Also posting this on the FG board, since
TestRenderTexture is a SG package... and maybe
someone there can point me in the right 
direction ;=))



------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to