CEGUI with Panda3d and C++


hi all, my first post here :slight_smile:

i was hoping to use CEGUI in my panda projects, i prefer to code in c++ although i am following along with the python examples etc…

my CEGUI questions atm is, how do i satisfy this line:

CEGUI::DirectX9Renderer* myRenderer =
new CEGUI::DirectX9Renderer( myD3D9Device, 0 );

i need to pass it a LPDIRECT3DDEVICE9 as myD3D9Device

how do i get the LPDIRECT3DDEVICE9 that panda is using for my app?

i assume if i want to add CEGUI to the panda scene graph i would have to use a custom renderer for panda, something like the OgreCEGUIRenderer or the IrrlichtCEGUIRenderer. writing such a renderer for panda is probablly beyond me at this stage so is there such a renderer available atm? or are the panda dev’s planning on adding one to panda in the near future?




There’s a work in progress, and it’s reportedly nearly done. But you should check with the author: https://discourse.panda3d.org/viewtopic.php?t=5810



thanks for the quick reply David :slight_smile:

i get the feeling i need to have a crack at writing my own renderer. i have a basic idea about what needs to be done and im sure i will enjoy the learning curve. so wish me luck :slight_smile:




Did you read the linked thread? Writing a custom renderer is exactly what nik has already done. You’re welcome to do it again if you really want to, but it seems kind of silly.



yes i did read it. i just figured its was a good learning exercise for me. copy and pasting someone else’s code isn’t always the best approach. im not on any deadlines so i dont mind the extra time doing it myself and learning something along the way.