XFree 4 or me?

Hello,

Sorry if this is a newbie question, because I’m newbie with SDL :wink:

So, I write a little programme to display informations about SDL, with
SDL_GetVideoInfo(), and about OpenGL.
But the problem is the amount of video memory is equal to 0 !? I have an
ATI Expert Play (3D Rage Pro) with 8Mo.
And for all OpenGL informations I have a NULL string, maybe because it
is the GLX module of XFree 4 ?
I don’t know if this error comes from my code, or from XFree 4.0. Please
tell me if someone have an idea.

In attachement there is the code and the informations logs.

Sorry for the question, and the english ;)____________________________________________
Nicolas Justin - <@Nicolas_Justin>
-------------- next part --------------
OpenGL Informations :

  • Vendor: (null)
  • Renderer: (null)
  • Version: (null)
  • Extensions: (null)

GLU informations :

  • Version: 1.2 Mesa 3.1
  • Extensions: GL_EXT_abgr

SDL Informations :

  • Video depht: 16 bpp
  • Can create hardware surfaces: 0
  • Can talk to window manager: 1
  • Can accelerate blits HW --> HW: 0
  • Can accelerate blits with ColorKey: 0
  • Can accelerate blits with Alpha: 0
  • Can accelerate blits SW --> HW: 0
  • Can accelerate blits with ColorKey: 0
  • Can accelerate blits with Alpha: 0
  • Can accelerate color fill: 0
  • Total Video memory: 0 Ko
    -------------- next part --------------
    /* Ce programme affiche diversent infos
  • relatives ? OpenGL, GLU et SDL
    */

#include <GL/gl.h>
#include <GL/glu.h>
#include <SDL/SDL.h>

int main() {

const SDL_VideoInfo *vi;

/* Infos sur OpenGL */
printf(“OpenGL Informations :\n”);
printf(" + Vendor: %s\n", glGetString(GL_VENDOR));
printf(" + Renderer: %s\n", glGetString(GL_RENDERER));
printf(" + Version: %s\n", glGetString(GL_VERSION));
printf(" + Extensions: %s\n", glGetString(GL_EXTENSIONS));

/* Infos sur GLU */
printf("\nGLU informations :\n");
printf(" + Version: %s\n", gluGetString(GLU_VERSION));
printf(" + Extensions: %s\n", gluGetString(GLU_EXTENSIONS));

/* Infos sur SDL */

if( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Oops: Cannot initialize SDL: %s\n”, SDL_GetError() );
exit(1);
}

vi = SDL_GetVideoInfo();

printf("\nSDL Informations :\n");
printf(" + Video depht: \t\t\t%d bpp\n", vi->vfmt->BitsPerPixel);
printf(" + Can create hardware surfaces: \t%d\n", vi->hw_available);
printf(" + Can talk to window manager: \t%d\n", vi->wm_available);
printf(" + Can accelerate blits HW --> HW: \t%d\n", vi->blit_hw);
printf(" + Can accelerate blits with ColorKey: %d\n", vi->blit_hw_CC);
printf(" + Can accelerate blits with Alpha: \t%d\n", vi->blit_hw_A);
printf(" + Can accelerate blits SW --> HW: \t%d\n", vi->blit_sw);
printf(" + Can accelerate blits with ColorKey: %d\n", vi->blit_sw_CC);
printf(" + Can accelerate blits with Alpha: \t%d\n", vi->blit_sw_A);
printf(" + Can accelerate color fill: \t\t%d\n", vi->blit_fill);
printf(" + Total Video memory: \t\t%d Ko\n", vi->video_mem);

return(0);
}

So, I write a little programme to display informations about SDL, with
SDL_GetVideoInfo(), and about OpenGL.
But the problem is the amount of video memory is equal to 0 !?

This needs to go into the FAQ. SDL will report zero hardware memory if
it does not have direct access to the video card. This is true in nearly
all windowed modes. If you use the DGA 2.0 driver (see the FAQ), then
you should see the correct amount of video memory reported.

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Sam Lantinga a ?crit :

So, I write a little programme to display informations about SDL, with
SDL_GetVideoInfo(), and about OpenGL.
But the problem is the amount of video memory is equal to 0 !?

This needs to go into the FAQ. SDL will report zero hardware memory if
it does not have direct access to the video card. This is true in nearly
all windowed modes. If you use the DGA 2.0 driver (see the FAQ), then
you should see the correct amount of video memory reported.

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Thanks, and sorry for this waste of time ;)–


Nicolas Justin - <@Nicolas_Justin>