Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
Duckcpp core layer API documentation

Duckcpp Engine

Duckcpp is a high-performance c++ graphics engine, it can be used in 3D graphics, 2D graphics, 3D/2D applications, and as game engine. Duckcpp forks irrlicht, most of duckcpp features are the same as or similar to irrlicht features, but with some differences, such as duckcpp implemented an sfml device backend.

c++ example

#include <duckcpp/core.hpp>
int main()
{
dcpp::video::EDT_BURNINGSVIDEO, // Select Video Driver
dcpp::nub::dimension2du{1280, 720}, // Window Dimension or video mode in fullscrren mode.
32, // Bits per pixel, setting is only useful in fullscreen mode.
false, // Enable fullscreen?
true, // Enable stencilbuffer?
false, // Enable vsync?
nullptr // Event Receiver
);
while (device->run())
{
if (device->isWindowActive())
{
video->beginScene(
dcpp::video::ECBF_COLOR | dcpp::vieo::ECBF_DEPTH,
dcpp::video::SColor{0xff3277af}
);
scene->drawAll();
gui->drawAll();
video->endScene();
}
else
{
device->yield();
}
}
device->drop();
}
The Duckcpp device. You can create it with createDevice() or createDeviceEx().
Definition DuckcppDevice.hpp:48
virtual bool isWindowActive() const =0
Returns if the window is active.
virtual dcpp::scene::ISceneManager * getSceneManager()=0
Provides access to the scene manager.
virtual void yield()=0
Cause the device to temporarily pause execution and let other processes run.
virtual bool run()=0
Runs the device.
virtual dcpp::gui::IGUIEnvironment * getGUIEnvironment()=0
Provides access to the 2d user interface environment.
virtual dcpp::video::IVideoDriver * getVideoDriver()=0
Provides access to the video driver for drawing 3d and 2d geometry.
bool drop() const
Drops the object. Decrements the reference counter by one.
Definition IReferenceCounted.hpp:126
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.hpp:73
virtual void drawAll(bool useScreenSize=true)=0
Draws all gui elements by traversing the GUI environment starting at the root node.
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Definition ISceneManager.hpp:160
virtual void drawAll()=0
Draws all the scene nodes.
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.hpp:152
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
@ EDT_BURNINGSVIDEO
dcpp::video::EDT_BURNINGSVIDEO
Definition EDriverTypes.hpp:43
DUCKCPP_API dcpp::DuckcppDevice *IRRCALLCONV createDevice(dcpp::video::E_DRIVER_TYPE driverType=dcpp::video::EDT_SOFTWARE, const dcpp::nub::dimension2du &windowSize=(dcpp::nub::dimension2du(1280, 800)), dcpp::uint32_kt bits=32, bool fullscreen=false, bool stencilbuffer=true, bool vsync=false, dcpp::IEventReceiver *receiver=0)
Creates an Duckcpp device. The Duckcpp device is the root object for using the engine.

Links

Home: https://cppfx.xyz/duckcpp


Duckcpp    @cppfx.xyz