[info-performer] Problem with pfFrame.

Date view Thread view Subject view Author view

From: Andrea Martini (amartini++at++cetma.brindisi.enea.it)
Date: 05/26/2003 04:38:32


Hi to all,
i'm using opengl performer 3.0 on Windows 2000 professional using VC++ 6.0.
I'm realizing an application that animates virtual human in a scene graph. I
realized a c++ class to do that. My problem is follow : if i animate 1 or 2
virtual human, all is ok. But, if i animate 3 or more object, VC++ says me
that a memory location can't be read. After debug, i see that i have no
problem when i create virtual humans ( using opengl performer's node, like
pfDCS) , but when i see them, inside a "for" loop.
This is a part of my code :

//Create VirtualHuman
....
....
while ( !exitFlag) {
      for(j=0;j<MAX_VH;j++) { // MAX_VH contains Virtual Humans number
       Uomo[j]->MoveMe(); // Uomo[j] contains a pointer to the
j-Vitual human
                                               // MoveMe is a Class method,
that movve in a particolar way
                                              // Uomo[j];
    }
       pfFrame();
       handleEvents(); // to manage Virtual Humans movements
, like rotate, translate ...
 }

As i said below, if MAX_VH is 1 or 2, i have no problem. But when i set
MAX_VH=3 or greater , VC++ says me that it can't read a location. But, when
i debug my code, i discover that i haven't problem when i create my Virtual
Humans. Error, occurs only inside While Loop, but no soon. I have error
after 4 iteration. Moreover, if i move pfFrame, outside While loop, i get no
error.
Some suggest ?
Thank to all.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon May 26 2003 - 04:40:00 PDT