Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) HelloIrrlichtQtCreatorWindows

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: ./CppHelloIrrlichtQtCreatorWindows/CppHelloIrrlichtQtCreatorWindows.pro

 

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp

INCLUDEPATH += ../../Libraries/irrlicht-1.8/include
LIBS += -L../../Libraries/irrlicht-1.8/lib/Win32-gcc/ -lirrlicht
LIBS += -L../../Libraries/irrlicht-1.8/bin/Win32-gcc

 

 

 

 

 

./CppHelloIrrlichtQtCreatorWindows/main.cpp

 

#include "irrlicht.h"

int main()
{
  irr::IrrlichtDevice * const device = irr::createDevice(irr::video::EDT_SOFTWARE);

  device->setWindowCaption(L"HelloIrrlicht");

  irr::video::IVideoDriver * const driver = device->getVideoDriver();
  irr::scene::ISceneManager * const scene_manager = device->getSceneManager();
  irr::gui::IGUIEnvironment * gui_environment = device->getGUIEnvironment();

  gui_environment->addStaticText(
    L"HelloIrrlicht!",
    irr::core::rect<int>(320-32,240-8,320+32,240+8),
    true);

  while(device->run())
  {
    driver->beginScene(
      true,
      true,
      irr::video::SColor(0,195,195,195));
    scene_manager->drawAll();
    gui_environment->drawAll();
    driver->endScene();
  }
  device->drop();
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml