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

Nirtcpp Engine

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

c++ example

#include <nirtcpp/core.hpp>
int main()
{
nirt::video::EDT_BURNINGSVIDEO, // Select Video Driver
nirt::core::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(
nirt::video::ECBF_COLOR | nirt::vieo::ECBF_DEPTH,
nirt::video::SColor{0xff3277af}
);
scene->drawAll();
gui->drawAll();
video->endScene();
}
else
{
device->yield();
}
}
device->drop();
}
bool drop() const
Drops the object. Decrements the reference counter by one.
Definition IReferenceCounted.hpp:126
The Nirtcpp device. You can create it with createDevice() or createDeviceEx().
Definition NirtcppDevice.hpp:48
virtual gui::IGUIEnvironment * getGUIEnvironment()=0
Provides access to the 2d user interface environment.
virtual scene::ISceneManager * getSceneManager()=0
Provides access to the scene manager.
virtual bool isWindowActive() const =0
Returns if the window is active.
virtual void yield()=0
Cause the device to temporarily pause execution and let other processes run.
virtual video::IVideoDriver * getVideoDriver()=0
Provides access to the video driver for drawing 3d and 2d geometry.
virtual bool run()=0
Runs the device.
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.
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
The Burning's Software Renderer, an alternative software renderer.
Definition EDriverTypes.hpp:40
NIRTCPP_API NirtcppDevice *IRRCALLCONV createDevice(video::E_DRIVER_TYPE driverType=video::EDT_SOFTWARE, const core::dimension2d< u32 > &windowSize=(core::dimension2d< u32 >(640, 480)), u32 bits=32, bool fullscreen=false, bool stencilbuffer=true, bool vsync=false, IEventReceiver *receiver=0)
Creates an Nirtcpp device. The Nirtcpp device is the root object for using the engine.

Links

Home: https://cppfx.xyz/nirtcpp


Nirtcpp    @cppfx.xyz

Utxcpp    utx::print