Hello guys,
i’ll cut to the chase - i am trying to make my own classes that use Panda3Ds classes to create and open a window and load the environment in it
for starters. But i got to a nasty problem which i am trying to solve for days…
Here’s the screen of this problem:
The problem comes from this piece of code:
PandaLib:: PandaWindow Win;
Win.InitWindow( framework, argc, argv );
In the .cpp file i have this code for the functions in the class:
namespace PandaLib
{
void PandaWindow:: InitWindow( PandaFramework frame, int argc, char *argv[] )
{
frame.open_framework( argc, argv );
}
void PandaWindow:: WindowName( PandaFramework framework, char *winName = "MyWindow" )
{
framework.set_window_title( winName );
}
void PandaWindow:: OpenWindow( PandaFramework framework, WindowFramework *window )
{
window = framework.open_window();
}
}
And this is the code in my .h file:
class PandaWindow
{
public:
void InitWindow( PandaFramework, int argc, char *argv[] );
void WindowName( PandaFramework, char * );
void OpenWindow( PandaFramework, WindowFramework * );
};
I looked around the reference documents for the C++ part of Panda3D but i found nothing.
If i missed something to show, tell me.
Best regards, BM.
EDIT:
Sorry i forgot the most important thing to add… Here’s the main:
int main( int argc, char *argv[] ) {
/**/
// Load the window and set its title.
PandaFramework framework;
PandaLib:: PandaWindow Win;
Win.InitWindow( framework, argc, argv );
Win.WindowName( framework, "My Panda3D Window" );
WindowFramework *window;
Win.OpenWindow( framework, window );
...
}