ChoosePixelformat. makes me crazy!!!!!!

I´m programming in delphi an application with a graphical represententation of a hand in opengl. In some situations, if i change some rotations and translates, this make that the representation doesn´t work. The error is “Acces violation at adress …”. When i make a trace the failure is in the choosepixelformat function. ¿any idea?. thanks. sorry for my english. :smiley: :stuck_out_tongue:

I´m using a Matrox G400 running in windows XP. :confused:

show some code - maybe we can help

:regards:

upps i put the reply like a new post, sorry . My resigter name is sorapan14 and the title is ok

//! Dedo Pulgar
glPushMatrix();
glRotatef(-90,1,0,0);
glRotatef(90,0,0,1);
gltranslatef(0, 0.0, 0);
glColor3f(0.76,0.58,0.38); // Color carne.
glTranslatef(-2.1,0.75,0); // Traslada dedo entero.
// glRotatef(220-glovedat[4], 0.0, 1.0, 0.0);
glTranslatef(0.05,0.0,0.0);
DibujaTriangulo(0.7, 0.5, 0.5);
quad:= glunewquadric;
// glrotatef(-90,1.0,0.0,0.0);


  • glrotatef(90,1.0,0.0,0.0); +
  • glrotatef(80,0.0,1.0,0.0); +
  • glrotatef(-20,1.0,0.0,0.0); +
  • glrotatef(-90,1.0,0.0,0.0); +
  • glrotatef(-90,0.0,1.0,0.0); +
  • glTranslatef(0.0,0.0,1.1); +

// glTranslatef(-0.55,0.1,0.5); // Traslada dedo entero.
glrotatef((180+(glovedat[1])), 0.0,0.0,1.0);
glTranslatef(0.0,0.0,-0.5);

glrotatef((180-(glovedat[1])), 0.0,1.0,0.0);

glusphere(quad, 0.29, numcaras,numcaras);
gludeletequadric(quad);
glrotatef(-90,0.0,1.0,0.0);
glRotatef (glovedat[2]*4, 0.0, 1.0, 0.0);
// glRotatef (180 + glovedat[2]*4, 0.0, 1.0, 0.0);
glTranslatef(-0.9,0.0,0.0);
glrotatef(90,0.0,1.0,0.0);

quad:= glunewquadric;
glucylinder(quad, 0.25, 0.29, 0.9,numcaras,1);
gludeletequadric(quad);
quad:= glunewquadric;
glusphere(quad, 0.26, numcaras,numcaras);
gludeletequadric(quad);

glRotatef (glovedat[3], 0.0, 1.0, 0.0);
glTranslatef(0.0,0.0,-0.5);
glrotatef(90,0.0,1.0,0.0);
glrotatef(-90,0.0,1.0,0.0);
quad:= glunewquadric;
glucylinder(quad, 0.20, 0.27, 0.5,numcaras,1);
gludeletequadric(quad);
quad:= glunewquadric;
glusphere(quad, 0.2,numcaras,numcaras);
gludeletequadric(quad);

glPopMatrix();
//! Fin dedo Pulgar

When i use the instructions that are tagged with *****


is when the representation doesn´t works.
I

It smells like a driver bug. Are you really sure that adding a bunch of rotations makes the choosepixelformat crash ?? How do you call it (parameters) ?