Title: RE: [Dri-devel] OpenGL 1.3, 1.4, and extension string issue

> > Nice sheme - this will even allow to check the software paths
> > by just tuning the GL version (e.g. via environment variable).
> >
> > But what will you do if your software path is not yet covered
> > by a specific OpenGL version but you still want to use it for
> > testing your experimental application?
>
> It doesn't help us much with that case, it's true.  However
> we don't have that
> capability with the current scheme either.
>
> Keith

setenv GL_SOFTWARE_EXTENSIONS_FORCE="GL_gamma GL_RGBA GL_whatever"
setenv GL_SOFTWARE_EXTENSIONS_ALLOW="GL_gamma GL_RGBA GL_whatever"

  if ( is_in_list(getev("GL_SOFTWARE_EXTENSIONS_FORCE"),"GL_EXT_texture3D") )
      3D textures are a software fallback
  else if ( extension string contains "GL_EXT_texture3D" )
      3D textures are hardware accelerated
  else if ( is_in_list(getev("GL_SOFTWARE_EXTENSIONS_ALLOW"),"GL_EXT_texture3D") )
      3D textures are a software fallback
  else if ( advertised OpenGL version >= 1.2 )
      3D textures are a software fallback
  else
      3D textures are not supported at all

is_in_list() is some self designed function similar to strstr().
strstr() itself wouldn't work because some extensions
do represent substrings of others. trust me. ;-)

-Alex.

Reply via email to