Hi everyone.
I have a little problem.
Check this video how i set up the panda for c++.
youtube.com/watch?v=ZXhMjQjno44
and i am used this code:
#include "pandaFramework.h"
#include "pandaSystem.h"
#include "genericAsyncTask.h"
#include "asyncTaskManager.h"
#include "cIntervalManager.h"
#include "cLerpNodePathInterval.h"
#include "cMetaInterval.h"
// Global stuff
PandaFramework framework;
PT(AsyncTaskManager) taskMgr = AsyncTaskManager::get_global_ptr();
PT(ClockObject) globalClock = ClockObject::get_global_clock();
NodePath camera;
// Task to move the camera
AsyncTask::DoneStatus SpinCameraTask(GenericAsyncTask* task, void* data) {
double time = globalClock->get_real_time();
double angledegrees = time * 6.0;
double angleradians = angledegrees * (3.14 / 180.0);
camera.set_pos(20*sin(angleradians),-20.0*cos(angleradians),3);
camera.set_hpr(angledegrees, 0, 0);
return AsyncTask::DS_cont;
}
int main(int argc, char *argv[]) {
// Open a new window framework and set the title
framework.open_framework(argc, argv);
framework.set_window_title("My Panda3D Window");
// Open the window
WindowFramework *window = framework.open_window();
camera = window->get_camera_group(); // Get the camera and store it
// Load the environment model
NodePath environ = window->load_model(framework.get_models(),
"models/environment");
environ.reparent_to(window->get_render());
environ.set_scale(0.25 , 0.25, 0.25);
environ.set_pos(-8, 42, 0);
// Load our panda
NodePath pandaActor = window->load_model(framework.get_models(),
"panda-model");
pandaActor.set_scale(0.005);
pandaActor.reparent_to(window->get_render());
// Load the walk animation
window->load_model(pandaActor, "panda-walk4");
window->loop_animations(0);
// Create the lerp intervals needed to walk back and forth
PT(CLerpNodePathInterval) pandaPosInterval1, pandaPosInterval2,
pandaHprInterval1, pandaHprInterval2;
pandaPosInterval1 = new CLerpNodePathInterval("pandaPosInterval1",
13.0, CLerpInterval::BT_no_blend,
true, false, pandaActor, NodePath());
pandaPosInterval1->set_start_pos(LPoint3f(0, 10, 0));
pandaPosInterval1->set_end_pos(LPoint3f(0, -10, 0));
pandaPosInterval2 = new CLerpNodePathInterval("pandaPosInterval2",
13.0, CLerpInterval::BT_no_blend,
true, false, pandaActor, NodePath());
pandaPosInterval2->set_start_pos(LPoint3f(0, -10, 0));
pandaPosInterval2->set_end_pos(LPoint3f(0, 10, 0));
pandaHprInterval1 = new CLerpNodePathInterval("pandaHprInterval1", 3.0,
CLerpInterval::BT_no_blend,
true, false, pandaActor, NodePath());
pandaHprInterval1->set_start_hpr(LPoint3f(0, 0, 0));
pandaHprInterval1->set_end_hpr(LPoint3f(180, 0, 0));
pandaHprInterval2 = new CLerpNodePathInterval("pandaHprInterval2", 3.0,
CLerpInterval::BT_no_blend,
true, false, pandaActor, NodePath());
pandaHprInterval2->set_start_hpr(LPoint3f(180, 0, 0));
pandaHprInterval2->set_end_hpr(LPoint3f(0, 0, 0));
// Create and play the sequence that coordinates the intervals
PT(CMetaInterval) pandaPace;
pandaPace = new CMetaInterval("pandaPace");
pandaPace->add_c_interval(pandaPosInterval1, 0,
CMetaInterval::RS_previous_end);
pandaPace->add_c_interval(pandaHprInterval1, 0,
CMetaInterval::RS_previous_end);
pandaPace->add_c_interval(pandaPosInterval2, 0,
CMetaInterval::RS_previous_end);
pandaPace->add_c_interval(pandaHprInterval2, 0,
CMetaInterval::RS_previous_end);
pandaPace->loop();
// Add our task.
taskMgr->add(new GenericAsyncTask("Spins the camera",
&SpinCameraTask, (void*) NULL));
// This is a simpler way to do stuff every frame,
// if you're too lazy to create a task.
Thread *current_thread = Thread::get_current_thread();
while(framework.do_frame(current_thread)) {
// Step the interval manager
CIntervalManager::get_global_ptr()->step();
}
framework.close_framework();
return (0);
}
and i got
'first panda app.exe': Loaded 'D:\Programing\C++ Proj\first panda app\Debug\first panda app.exe', Symbols loaded.
'first panda app.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libp3framework.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libpanda.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libpandaexpress.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libp3dtool.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\shell32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\msvcr90.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\python\python26.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\msvcp90.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libp3dtoolconfig.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\wsock32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\ws2_32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\nsi.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\winmm.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\cg.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\avcodec-51-panda.dll', Binary was not built with debug information.
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\avutil-49-panda.dll', Binary was not built with debug information.
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\avformat-50-panda.dll', Binary was not built with debug information.
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libp3direct.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'first panda app.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'first panda app.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libpandagl.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libp3windisplay.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\opengl32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\glu32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\ddraw.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\dciman32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\setupapi.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\cfgmgr32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\devobj.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\cgGL.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\d3d9.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\d3d8thk.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\atiumdag.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\atiumdva.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x1114) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xcfc) has exited with code 0 (0x0).
'first panda app.exe': Unloaded 'C:\Windows\System32\atiumdva.dll'
'first panda app.exe': Unloaded 'C:\Windows\System32\atiumdag.dll'
'first panda app.exe': Unloaded 'C:\Windows\System32\d3d9.dll'
'first panda app.exe': Unloaded 'C:\Windows\System32\d3d8thk.dll'
'first panda app.exe': Unloaded 'C:\Windows\System32\version.dll'
'first panda app.exe': Loaded 'C:\Windows\System32\powrprof.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\cryptbase.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\atioglxx.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\atiadlxx.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\wintrust.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\crypt32.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\msasn1.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libp3ptloader.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'D:\Programing\GameEngine\Panda3D-1.7.0\bin\libpandaegg.dll', Cannot find or open the PDB file
'first panda app.exe': Loaded 'C:\Windows\System32\profapi.dll', Cannot find or open the PDB file
First-chance exception at 0x6c9f463e in first panda app.exe: 0xC0000005: Access violation reading location 0x0f8f44c0.
Unhandled exception at 0x6c9f463e in first panda app.exe: 0xC0000005: Access violation reading location 0x0f8f44c0.
First-chance exception at 0x6c9f463e in first panda app.exe: 0xC0000005: Access violation reading location 0x0f8f44c0.
Unhandled exception at 0x6c9f463e in first panda app.exe: 0xC0000005: Access violation reading location 0x0f8f44c0.
The program '[4396] first panda app.exe: Native' has exited with code -1073741819 (0xc0000005).
Help Please