[LINUX] Nvidia opengl probleme depth_test

Alors je poste dans OSWar et SegFault
(au plaisir des modos) parce que as première vu c’est un
probleme lié à linux mais pas sur donc deja

Donc mon probleme est lié au
GL_DEPTH_TEST qui n’a pas l’air de marcher … Dans un programme que
j’ai fait alors en faites j’ai des cercles sur une sphere mais on
voit trés bien que ca les supperposes tous … Je capte pas le
meme code sous windows a l’air de marcher … Donc voila je donne
d’abord des infos sur mon systeme et aprés sur le code :

koubiak@refugee koubiak $ uname -a

Linux refugee 2.4.24 #4 jeu fév
12 14:04:23 UTC 2004 i686 Intel® Pentium® M processor 1400MHz
GenuineIntel GNU/Linux

Ensuite Au niveau de la carte
graphique, j’ai une geForceFX 5200 32/64 (je crois bien)

  • media-video/nvidia-glx

    Latest version available:
    1.0.4496

    Latest version installed:
    1.0.5336-r1

    Size of downloaded files: 5,005
    kB

    Homepage:
    http://www.nvidia.com/

    Description: XFree86 GLX
    libraries for the NVIDIA’s X driver

    License: NVIDIA

  • media-video/nvidia-kernel

    Latest version available:
    1.0.4496-r3

    Latest version installed:
    1.0.5336-r1

    Size of downloaded files: 5,005
    kB

    Homepage:
    http://www.nvidia.com/

    Description: Linux kernel module
    for the NVIDIA’s X driver

    License: NVIDIA

Et j’ai essayé avec des versions
antérieurs ça a pas l’air de marcher

Mais les jeux types UT2K4 marchent trés
bien capte pas

Un petit tour dans XF86Config :

Nous avons dedans

Load “glx”

Section “Device”

Identifier  "GeForce FX 5200"

Driver      "nvidia"

Boardname "GeForceFX5200Go"

Option "HWCursor" "on"

Option "NvAGP" "3"

Option "UseEdidFreqs"

“false”

Option "IgnoreEDID"

“true”

VideoRam    32768

EndSection

Donc voila quoi d’autre a oui un lsmod
:

nvidia 1966656 6
(autoclean)

Donc voila maintenant attaquons le code
:

Je pense que vous avez pas besoin de
tout les trucs de rendu mais si vous les voulez je l’ai porteré

#include <GL/glut.h>

#include

#include <stdlib.h>

void Scene::initGL()

{

glClearColor( _background[0],
_background[1], _background[2], 0 );

glEnable( GL_DEPTH_TEST );

_light = new Light( GL_LIGHT0 );

_light->setDiffuseColor( 0.1, 0.0,
0.0 );

_light->setAmbientColor( 0.7, 0.0,
0.0 );

//_light->setSpecularColor( 1.0,
1.0, 1.0 );

//_light->turnOn();

}

//------------------------------------------------------------------------

// setDrawingSize(): set the drawing
area’s width and height, and init the

// frame buffer’s size in pixels

//------------------------------------------------------------------------

void Scene::setDrawingSize( int w, int
h )

{

_win_w = w; _win_h = h;

_camera->setCameraProjection( w, h
);

}

//------------------------------------------------------------------------

// windowResized(): window has been
resized, so this indicates that

// setProjection should be called when
repainted

//------------------------------------------------------------------------

void Scene::windowResized()

{

_win_resized = true;

}

//------------------------------------------------------------------------

// drawScene(): render the scene in the
window

//------------------------------------------------------------------------

bool Scene::drawScene()

{

bool r_value = true;

glClear( GL_COLOR_BUFFER_BIT |
GL_DEPTH_BUFFER_BIT );

glShadeModel( GL_FLAT );

if ( _win_resized )

_camera->setCameraProjection(

_win_w, _win_h );

_camera->setCameraView();

// set the light positions (so that
light is stationary!)

_light->setPosition( 0.0, 0.0,
0.0, 0.0 );

//_light->setSpotDirection( 0.0,
-1.0, 0.0 );

glColor3f( 0.0, 0.0, 1.0 );

_sys->renderParticles();

glColor3f( 1.0, 0.0, 0.0 );

glLineWidth(1.0);

//glutWireSphere(10.0, 10, 10);

return r_value;

}

Donc voila tout info sera la bien venu

Koubiiak qui doit faire une demo sur
son laptop pas cool :’(

Bon c’etait bien programatoire …

Koubiiak