C++ newbie help

Hi, I just downloaded Panda3D and am very excited. Although I am familiar with Python, I want to use VS2005 C++ to develop my game. I can’t find much help outside of the class’ reference. No getting started, etc for us C++ programmers. Are we that out of style these days?

If I missed something on the forums or other locations, would you kindly point me to where the information is? I need something where I can see how I should initialize the engine, get a poligon up and a button to click and exit. Something simple as that.

Thank you in advance.

maybe you missed the manual-wiki =) http://panda3d.org/manual/index.php/Main_Page
everything mared with (CXX) is C++ related.
pro-rsoft added a lot of those and he might be the guy you can ask :slight_smile:
the manual provides enough information to write and compile your first small applications, not much but it should get you started.

Hi azherdev,

I made the same mistake you made. I can only say DONT DO IT. There is absolutley NO documentation for the C-interface and EVEN if you start succeeding with loading your model (which I did) the next problem comes for sure and there is no way to go on.

Result: You’ll get stuck in your problem and swim hard to get yourself out of the fix.

If you rather use python you’ll get excellent help in the forum and in the manual - as far as I can see.

Truevision 3d would be your choice at this point as C-programmer sigh would be great if panda would be a bit stronger in VC-developer support.

As first incentive I suggest a forum for that :wink:

dexter78, that is freaky… I’m currently using TV3D…

One reason I am experimenting with Panda is to get as much of the game framework out of the way as I can. I do know Python but I still like strongly-typed C++ and syntax.

Also, I did not realize CXX implied CPP. I wish Panda would put emphasis on C++ a bit more. I understand it is not Unreal engine but better C++ support would be a welcome sight.

Well if its not TV3D then maybe ogre ? Thats how I get myself through in the meantime until Panda is that far.

Just compare the wiki’s for ogre with panda then you know what i mean… You’re not left alone with a problem.

Dont get me wrong, I have the highest hopes for panda and read the forums every day to find sth new but fact is that they are not ready for public use due to a lak of tools and documentation.

Well, I like TV3D. I need GUI and game framework. I’m currently working on my GUI and its just taking a bit of a time. I was hoping Panda would fill in for TV3D since my project doesn’t require high end graphics.

But yes, I do need support. TV3D support forum is very active and has C++ developers, which I need. Looking at Panda, I hope it will mature in its support for C++. Python is great, but one of the reasons I’m back to C++ is because of so much codebase that I can tap.

Anyways, I guess its no to Panda for now… :frowning:

I also made that ‘mistake’ and I dont regret it at all. And I’m not even a very good C++ programmer. There are lots of benefits of using C++ instead of using Python.

ThomasEgi is right. There IS documentation for C++. Enough to get you started. Start here, afterwards follow the Hello World example here.
Also, the API is full of C++ docs.

In the forum are lots of people using C++ and who are willing to help you. You will always get an answer if you cant get out of a fix.

But dexter78 has a point: there is indeed much less docs for C++ than for Python. Python wouldn’t be hard to learn for someone who knows already C++, especially if you’re already familiar with Python. But the choice is up to you. Both Python and C++ have their con’s and pro’s.


You sure missed some things. Some links to get you started (follow in the right order, press the Next button on the manual pages to follow)
panda3d.org/manual/index.php/Using_CXX
panda3d.org/manual/index.php/A … _using_CXX
Of how to create a polygon using code:
discourse.panda3d.org/viewtopic.php?p=13162
And here the topic that discusses some problems I encountered in learning Panda3D@C++:
discourse.panda3d.org/viewtopic.php?t=2474

Just a side note on that discussion:
Panda3D is for Python - afaik it was developed for being used with Python and some of the high level Panda3D-Calls can (without additional Support) only be called from within python because they are python based.

As far as its known to me, C(++)-Support is no primary goal of the Devs. There are toms of other Framework that migh suit you better there - some of them are mentioned already.

I think that the whole discussions and increased CPP-Devs are noticed. When there are enough (specific) questions and discussions related to that topic, a CPP-Forum section is possible.

I hope I don’t hurt someone and its just my very own oppinion:
Demanding to get Panda documented for CPP at the same level it is done now with Python would mean to request Microsoft to deliver Windows with iTunes, Firefox and the Google Toolbar pre-installed (and -configured). :wink:

Even the CXX-Enhancements to the Manual have their pro’s and con’s… a newbie might get confused about it and the additions make the manual even more complex. Don’t get me wrong - any manual pages that are written, are good things. But (except for some shader things) not far ago, the manual was pure python and thus more consistent for new folks. When we start to mix the manual in that way we need to add a “Python” Tag now everywhere to make sure that new Panda-Users won’t get confused.
Maybe thats a topic that can be discussed too. :slight_smile:

Regards. Bigfoot29

Panda is made for python and to be used with python only. The 3d exporter is yet a bit limited…

To compare :
-Ogre has something like 4 or 5 independent exporters (the best one allows you a realitme preview of your design in studio max with the applicance of gl-shaders)

Panda: Egg exporter, missing things like bump mapping hw-shader support during design.

  • more than one source of documentation - indeed a bit too much documentation :wink: and pro ogre a published book that covers on 300 pages all you need to know to get professionally started.

Panda: No documentation at all

  • Ogre : scripting in python, lua (and a few others (I havent checked further), but preferrably C/C++ (which gives you ultimate speed and control, if you want to do professional projects one day)

  • Panda : Only python

My honest recommondation : Have Panda a bit more documentated and open to C/C++ community and soon panda will have various exporters for max and tools as well.

Well, to stop a C+±Debate and if other game “engines” are better.

Each Engine has its pro and contra sides (I think I said that already g).

Again, for Panda3D there IS a documentation for Python - the language Panda3D is designed for. - And to quote one of the devs “Panda3D was there before you all came here - and will still be there even when you are all gone to other projects” - its a project for/from Disney and the ETC.

So why implement a whole C++ - Environment and maintain it when the target for both of the biggest parties is, to have a framework that can be accessed from Python?

A Panda3D-Book makes not much sense (right now) because community is too small - so why wasting money on that when you can have the docs on an daily up-to-date-version online? When the users exceed some thousands new/constant users a year, a book will make sense - but till then it will drive the publisher bankrupt.

Please accept that Panda3D is not a C+±Framework in the first place. 95% of its functions can be used from C++, but creating an up-to-date Documentation that goes byond Class documentation iside the C+±Files is a job for the community and has to be maintained by them.

So please, before you start again with “but C++ is so much better…” - read the posts already made about this already.

However, the framework is designed to have at least the ability (due to its C(++) roots) to be used from C++.
If you are keen on using Panda3D with C++ I think the community would be pleased to see the progesses/results you achieved.

  • Next to the missing C++ book-like documentation. The current status is just an entry point, but you are very welcome to enhance the docs with your experience. The documentation is a community driven project - so every addition will help to get this done. :slight_smile:

Regards. Bigfoot29

Edit: About exporters: Right, there are only few exporters that can be integrated into the modeling suites, but there are quite some command line tools that will convert the existing formats into egg format. :wink:

I understand its useless to start a Python/C++ debate. But I just have to say I think you’re really wrong.

To start from the beginning:
Panda3D is written in C++.
That means, it can be called from C++ and this is VERY ULTIMATELY WAYY faster than Python.
Extensions to Panda3D and terrain code etc. can best be written in C++ for this reason.
Panda3D has also python bindings (these bindings are also written in C++ of course.)
This is to make programming with Panda3D easier. (btw. not even all of the C++ code has python bindings)
What many people say “There is no docs for C++” is wrong. The people who say that haven’t looked at Manual/API for years probably. Open your eyes. Look around. [size=92](especially under the Documentation button here at panda3d.org).. I already gave some links.[/size] There is not much, but enough to get you started, as I and ThomasEgi have already said a few times.
Panda3D is indeed meant for Python use, you’re right about that, but programming in C++ is very good possible and has many many advantages (like possibilities to compile etc.). What some people say “Programming Panda3D with C++ is impossible” makes no sense at all.
Quoted from the Panda3D Features page here:
Library callable from C++ or Python

And dexter78, sorry, but as I read your post you’re not making any sense at all.

As long as we’re having this discussion, I have some rebuttals for pro-rsoft:

This kind of statment requires proof, as in benchmarks. If you really think that Python slows Panda3D games down write some tests in both C++ and Python and compare their speeds, I think you’ll be disappointed in the lack of difference in most cases. Because the Python interface for Panda3D is just an interface for already fast C++ library code, any speedup from programming directly in C++ is likely negligible. The correct approach is to code in a productive, high-level language (Python), and ONLY if performance is not acceptable then you should profile to determine actual bottlenecks, and if these bottlenecks are in Python code first look for a better algorithm that can be coded in Python, and ONLY if this fails does it make sense to program directly in C++. Using C++ immediately in game code is premature optimization.

Sometimes true, sometimes false. Better algorithms, better use of existing Python libraries (NumArray), language features (map/filter/reduce, list comprehensions/generators), and optimizers (Psyco) will provide large gains for less work that moving code into C++.

I can only guess here, but I’m pretty sure that any Panda3D code which doesn’t have Python bindings is meant to be used exclusively as subroutines in the Panda3D libraries, and isn’t meant or needed to be called directly from game level code.