SuperTuxKart
Loading...
Searching...
No Matches
irr_driver.hpp
1//
2// SuperTuxKart - a fun racing game with go-kart
3// Copyright (C) 2009-2015 Joerg Henrichs
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 3
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19#ifndef HEADER_IRR_DRIVER_HPP
20#define HEADER_IRR_DRIVER_HPP
21
30#include "graphics/abstract_renderer.hpp"
31#include "graphics/gl_headers.hpp"
32#include "graphics/wind.hpp"
33#include "io/file_manager.hpp"
34#include "utils/aligned_array.hpp"
35#include "utils/no_copy.hpp"
36#include "utils/ptr_vector.hpp"
37#include "utils/vec3.hpp"
38#include <memory>
39#include <string>
40#include <vector>
41
42#include <irrArray.h>
43#include <dimension2d.h>
44#include <position2d.h>
45#include <matrix4.h>
46#include <vector2d.h>
47#include <IEventReceiver.h>
48#include <SColor.h>
49
50namespace SP
51{
52 class SPDynamicDrawCall;
53}
54
55
56namespace irr
57{
58 namespace scene { class ISceneManager; class IMesh; class IAnimatedMeshSceneNode; class IAnimatedMesh;
59 class IMeshSceneNode; class IParticleSystemSceneNode; class ICameraSceneNode; class ILightSceneNode;
60 class CLensFlareSceneNode; }
61 namespace gui { class IGUIEnvironment; class IGUIFont; }
62 namespace video { struct IRenderTarget; class ITexture; class IVideoDriver;
63 class SMaterial; }
64 class IrrlichtDevice;
65}
66using namespace irr;
67
68enum TypeRTT : unsigned int;
69class AbstractKart;
71class Camera;
72class FrameBuffer;
73class LightNode;
74class PerCameraNode;
75namespace GE { class GERenderInfo; }
76class RenderTarget;
77
78struct SHCoefficients;
79
85class IrrDriver : public IEventReceiver, public NoCopy
86{
87private:
89 IrrlichtDevice *m_device;
91 scene::ISceneManager *m_scene_manager;
93 gui::IGUIEnvironment *m_gui_env;
95 video::IVideoDriver *m_video_driver;
97 gui::IGUIFont *m_race_font;
100
103
104 core::dimension2du m_actual_screen_size;
105
107 core::array<video::IRenderTarget> m_mrt;
108
110 core::matrix4 m_ViewMatrix, m_InvViewMatrix, m_ProjMatrix, m_InvProjMatrix, m_ProjViewMatrix, m_InvProjViewMatrix;
111
112
113private:
121 enum {RES_CHANGE_NONE, RES_CHANGE_YES, RES_CHANGE_CANCEL,
122 RES_CHANGE_SAME, RES_CHANGE_YES_WARN} m_resolution_changing;
123
124
125public:
128 {
129 private:
130 int m_width;
131 int m_height;
132 public:
133 VideoMode(int w, int h) {m_width=w; m_height=h; }
134 int getWidth() const {return m_width; }
135 int getHeight() const {return m_height; }
136 }; // VideoMode
137
138 struct BloomData {
139 scene::ISceneNode * node;
140 float power;
141 };
142
143 video::SColorf getAmbientLight() const;
144
145
146
147private:
148 int m_screen_orientation;
149 std::vector<VideoMode> m_modes;
150
151 void setupViewports();
152
155
158
160 void applyResolutionSettings(bool recreate_device);
162
163 bool m_request_screenshot;
164
165 bool m_ssaoviz;
166 bool m_shadowviz;
167 bool m_lightviz;
168 bool m_boundingboxesviz;
169 bool m_recording;
170 bool m_render_nw_debug;
171
173 irr::video::SColor m_clear_color;
174
175
176 unsigned m_last_light_bucket_distance;
177 unsigned m_skinning_joint;
178
179 SP::SPDynamicDrawCall* m_sun_interposer;
180 core::vector3df m_sun_direction;
181 video::SColorf m_suncolor;
182
183
184 std::vector<LightNode *> m_lights;
185
186 std::vector<BloomData> m_forcedbloom;
187
188 std::vector<scene::ISceneNode *> m_background;
189
190 float m_ssao_radius;
191 float m_ssao_k;
192 float m_ssao_sigma;
193 irr::ELOG_LEVEL m_logger_level;
194#ifdef DEBUG
196 std::vector<irr::scene::IAnimatedMeshSceneNode*> m_debug_meshes;
197#endif
198 // ------------------------------------------------------------------------
199 void resizeWindow();
200public:
201 void doScreenShot();
202public:
203 IrrDriver();
204 ~IrrDriver();
205 void initDevice();
206 void reset();
207 void setMaxTextureSize();
208 void unsetMaxTextureSize();
209 void getOpenGLData(std::string *vendor, std::string *renderer,
210 std::string *version);
211
212 void increaseObjectCount();
213 core::array<video::IRenderTarget> &getMainSetup();
215 core::recti getSplitscreenWindow(int WindowNum);
216 void setAllMaterialFlags(scene::IMesh *mesh) const;
217 scene::IAnimatedMesh *getAnimatedMesh(const std::string &name);
218 scene::IMesh *getMesh(const std::string &name);
219 void displayFPS();
221 bool OnEvent(const irr::SEvent &event);
222 void setAmbientLight(const video::SColorf &light,
223 bool force_SH_computation = true);
224 video::ITexture *getTexture(FileManager::AssetType type,
225 const std::string &filename);
226 video::ITexture *getTexture(const std::string &filename);
227 void grabAllTextures(const scene::IMesh *mesh);
228 void dropAllTextures(const scene::IMesh *mesh);
229 scene::IMesh *createQuadMesh(const video::SMaterial *material=NULL,
230 bool create_one_quad=false);
231 scene::IMesh *createTexturedQuadMesh(const video::SMaterial *material,
232 const double w, const double h);
233 scene::ISceneNode *addWaterNode(scene::IMesh *mesh, scene::IMesh **welded,
234 float wave_height,
235 float wave_speed, float wave_length);
236 scene::IMeshSceneNode*addOctTree(scene::IMesh *mesh);
237 scene::ISceneNode* addSphere(float radius,
238 const video::SColor &color=video::SColor(128, 255, 255, 255));
239 scene::ISceneNode* addMesh(scene::IMesh *mesh,
240 const std::string& debug_name,
241 scene::ISceneNode *parent = NULL,
242 std::shared_ptr<GE::GERenderInfo> render_info = nullptr);
243 PerCameraNode *addPerCameraNode(scene::ISceneNode* node,
244 scene::ICameraSceneNode* cam,
245 scene::ISceneNode *parent = NULL);
246 scene::ISceneNode *addBillboard(const core::dimension2d< f32 > size,
247 const std::string& tex_name,
248 scene::ISceneNode* parent=NULL);
249 scene::IParticleSystemSceneNode
250 *addParticleNode(bool default_emitter=true);
251 scene::ISceneNode *addSkyBox(const std::vector<video::ITexture*> &texture_names,
252 const std::vector<video::ITexture*> &spherical_harmonics_textures);
253 void suppressSkyBox();
254 void removeNode(scene::ISceneNode *node);
255 void removeMeshFromCache(scene::IMesh *mesh);
256 void removeTexture(video::ITexture *t);
257 scene::IAnimatedMeshSceneNode
258 *addAnimatedMesh(scene::IAnimatedMesh *mesh,
259 const std::string& debug_name,
260 scene::ISceneNode* parent = NULL,
261 std::shared_ptr<GE::GERenderInfo> render_info = nullptr);
262 scene::ICameraSceneNode
264 Camera *addCamera(unsigned int index, AbstractKart *kart);
265 void removeCameraSceneNode(scene::ICameraSceneNode *camera);
266 void removeCamera(Camera *camera);
267 void update(float dt, bool loading=false);
269 void changeResolution(const int w, const int h, const bool fullscreen);
271 void cancelResChange();
272
273 bool moveWindow(int x, int y);
274
275 void showPointer();
276 void hidePointer();
277 void setLastLightBucketDistance(unsigned d) { m_last_light_bucket_distance = d; }
278 void setSkinningJoint(unsigned d) { m_skinning_joint = d; }
279 bool isPointerShown() const { return m_pointer_shown; }
280 core::position2di getMouseLocation();
281
282 void printRenderStats();
283 void requestScreenshot();
284 class GPUTimer &getGPUTimer(unsigned);
285 const char* getGPUQueryPhaseName(unsigned);
286
287#ifndef SERVER_ONLY
288 std::unique_ptr<RenderTarget> createRenderTarget(const irr::core::dimension2du &dimension,
289 const std::string &name);
290#endif
291 // ------------------------------------------------------------------------
293 const irr::video::SColor& getClearColor() const { return m_clear_color; }
294 // ------------------------------------------------------------------------
296 void setClearbackBufferColor(irr::video::SColor color)
297 {
298 m_clear_color = color;
299 } // setClearbackBufferColor
300
301
303 const std::vector<VideoMode>& getVideoModes() const { return m_modes; }
304 // ------------------------------------------------------------------------
306 const core::dimension2d<u32>& getFrameSize() const;
307 // ------------------------------------------------------------------------
309 IrrlichtDevice *getDevice() const { return m_device; }
310 // ------------------------------------------------------------------------
312 video::IVideoDriver *getVideoDriver() const { return m_video_driver; }
313 // ------------------------------------------------------------------------
315 scene::ISceneManager *getSceneManager() const { return m_scene_manager; }
316 // ------------------------------------------------------------------------
318 gui::IGUIEnvironment *getGUI() const { return m_gui_env; }
319 // ------------------------------------------------------------------------
322 unsigned int getRealTime();
323 // ------------------------------------------------------------------------
325 void giveBoost(unsigned int cam_index) { m_renderer->giveBoost(cam_index);}
326 // ------------------------------------------------------------------------
327 inline core::vector3df getWind() {return m_wind->getWind();}
328
329 // -----------------------------------------------------------------------
331 inline const SHCoefficients* getSHCoefficients() {return m_renderer->getSHCoefficients();}
332 // -----------------------------------------------------------------------
333 const core::vector3df& getSunDirection() const { return m_sun_direction; };
334 // -----------------------------------------------------------------------
335 void setSunDirection(const core::vector3df &SunPos)
336 {
337 m_sun_direction = SunPos;
338 }
339 // -----------------------------------------------------------------------
340 video::SColorf getSunColor() const { return m_suncolor; }
341 // -----------------------------------------------------------------------
342 void setSunColor(const video::SColorf &col)
343 {
344 m_suncolor = col;
345 }
346 // ------------------------------------------------------------------------
347 GLuint getRenderTargetTexture(TypeRTT which);
348 GLuint getDepthStencilTexture();
349 // ------------------------------------------------------------------------
350 void resetDebugModes();
351 // ------------------------------------------------------------------------
352 void toggleSSAOViz() { m_ssaoviz = !m_ssaoviz; }
353 // ------------------------------------------------------------------------
354 bool getSSAOViz() { return m_ssaoviz; }
355 // ------------------------------------------------------------------------
356 void toggleShadowViz() { m_shadowviz = !m_shadowviz; }
357 // ------------------------------------------------------------------------
358 bool getShadowViz() { return m_shadowviz; }
359 // ------------------------------------------------------------------------
360 void toggleBoundingBoxesViz() { m_boundingboxesviz = !m_boundingboxesviz; }
361 // ------------------------------------------------------------------------
362 void toggleRenderNetworkDebug() { m_render_nw_debug = !m_render_nw_debug; }
363 // ------------------------------------------------------------------------
364 bool getRenderNetworkDebug() const { return m_render_nw_debug; }
365 // ------------------------------------------------------------------------
366 void renderNetworkDebug();
367 // ------------------------------------------------------------------------
368 bool getBoundingBoxesViz() { return m_boundingboxesviz; }
369 // ------------------------------------------------------------------------
370 int getSceneComplexity() { return m_scene_complexity; }
371 void resetSceneComplexity() { m_scene_complexity = 0; }
372 void addSceneComplexity(int complexity)
373 {
374 if (complexity > 1) m_scene_complexity += (complexity - 1);
375 }
376 // ------------------------------------------------------------------------
377 bool isRecording() const { return m_recording; }
378 // ------------------------------------------------------------------------
379 void setRecording(bool val);
380 // ------------------------------------------------------------------------
381 std::vector<LightNode *> getLights() { return m_lights; }
382 // ------------------------------------------------------------------------
383 void addGlowingNode(scene::ISceneNode *n, float r = 1.0f, float g = 1.0f,
384 float b = 1.0f)
385 {
386 m_renderer->addGlowingNode(n, r, g, b);
387 }
388 // ------------------------------------------------------------------------
389 void clearGlowingNodes() { m_renderer->clearGlowingNodes(); }
390 // ------------------------------------------------------------------------
391 void addForcedBloomNode(scene::ISceneNode *n, float power = 1)
392 {
393 BloomData dat;
394 dat.node = n;
395 dat.power = power;
396
397 m_forcedbloom.push_back(dat);
398 }
399 // ------------------------------------------------------------------------
400 void clearForcedBloom() { m_forcedbloom.clear(); }
401 // ------------------------------------------------------------------------
402 const std::vector<BloomData> &getForcedBloom() const
403 {
404 return m_forcedbloom;
405 }
406 // ------------------------------------------------------------------------
407 void clearBackgroundNodes() { m_background.clear(); }
408 // ------------------------------------------------------------------------
409 void addBackgroundNode(scene::ISceneNode * const n)
410 {
411 m_background.push_back(n);
412 }
413 // ------------------------------------------------------------------------
414 scene::ISceneNode *addLight(const core::vector3df &pos, float energy,
415 float radius, float r, float g, float b,
416 bool sun_ = false,
417 scene::ISceneNode* parent = NULL);
418 // ------------------------------------------------------------------------
419 void clearLights();
420 // ------------------------------------------------------------------------
421 SP::SPDynamicDrawCall* getSunInterposer() { return m_sun_interposer; }
422 // ------------------------------------------------------------------------
423
424 void cleanSunInterposer();
425 void createSunInterposer();
426 // ------------------------------------------------------------------------
427 void setViewMatrix(core::matrix4 matrix)
428 {
429 m_ViewMatrix = matrix; matrix.getInverse(m_InvViewMatrix);
430 }
431 // ------------------------------------------------------------------------
432 const core::matrix4 &getViewMatrix() const { return m_ViewMatrix; }
433 // ------------------------------------------------------------------------
434 const core::matrix4 &getInvViewMatrix() const { return m_InvViewMatrix; }
435 // ------------------------------------------------------------------------
436 void setProjMatrix(core::matrix4 matrix)
437 {
438 m_ProjMatrix = matrix; matrix.getInverse(m_InvProjMatrix);
439 }
440 // ------------------------------------------------------------------------
441 const core::matrix4 &getProjMatrix() const { return m_ProjMatrix; }
442 // ------------------------------------------------------------------------
443 const core::matrix4 &getInvProjMatrix() const { return m_InvProjMatrix; }
444 // ------------------------------------------------------------------------
445 void genProjViewMatrix()
446 {
447 m_ProjViewMatrix = m_ProjMatrix * m_ViewMatrix;
448 m_InvProjViewMatrix = m_ProjViewMatrix;
449 m_InvProjViewMatrix.makeInverse();
450 }
451 // ------------------------------------------------------------------------
452 const core::matrix4 &getProjViewMatrix() const { return m_ProjViewMatrix; }
453 // ------------------------------------------------------------------------
454 const core::matrix4 &getInvProjViewMatrix() const
455 {
456 return m_InvProjViewMatrix;
457 }
458 // ------------------------------------------------------------------------
459 const core::vector2df &getCurrentScreenSize() const
460 {
461 return m_renderer->getCurrentScreenSize();
462 }
463 // ------------------------------------------------------------------------
464 const core::dimension2du getActualScreenSize() const
465 {
466 return m_actual_screen_size;
467 }
468 // ------------------------------------------------------------------------
469 float getSSAORadius() const
470 {
471 return m_ssao_radius;
472 }
473
474 // ------------------------------------------------------------------------
475 void setSSAORadius(float v)
476 {
477 m_ssao_radius = v;
478 }
479
480 // ------------------------------------------------------------------------
481 float getSSAOK() const
482 {
483 return m_ssao_k;
484 }
485
486 // ------------------------------------------------------------------------
487 void setSSAOK(float v)
488 {
489 m_ssao_k = v;
490 }
491
492 // ------------------------------------------------------------------------
493 float getSSAOSigma() const
494 {
495 return m_ssao_sigma;
496 }
497
498 // ------------------------------------------------------------------------
499 void setSSAOSigma(float v)
500 {
501 m_ssao_sigma = v;
502 }
503#ifdef DEBUG
504 std::vector<scene::IAnimatedMeshSceneNode*> getDebugMeshes()
505 {
506 return m_debug_meshes;
507 }
509 void clearDebugMesh() { m_debug_meshes.clear(); }
510 // ------------------------------------------------------------------------
512 void addDebugMesh(scene::IAnimatedMeshSceneNode *node)
513 {
514 m_debug_meshes.push_back(node);
515 } // addDebugMesh
516
517#endif
518 void onLoadWorld();
519 void onUnloadWorld();
520
521 void updateSplitAndLightcoordRangeFromComputeShaders(size_t width,
522 size_t height);
523
524 void uploadLightingData();
525 void sameRestart() { m_resolution_changing = RES_CHANGE_SAME; }
526 // ------------------------------------------------------------------------
527 u32 getDefaultFramebuffer() const;
528 // ------------------------------------------------------------------------
529 void handleWindowResize();
530}; // IrrDriver
531
532extern IrrDriver *irr_driver;
533
534#endif // HEADER_IRR_DRIVER_HPP
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Virtual base class for the renderer.
Definition: abstract_renderer.hpp:60
This is the base class for all cameras.
Definition: camera.hpp:49
AssetType
The various asset types (and directories) STK might request.
Definition: file_manager.hpp:63
Definition: frame_buffer.hpp:33
Definition: glwrap.hpp:56
A simple class to store video resolutions.
Definition: irr_driver.hpp:128
class that creates the irrLicht device and offers higher-level ways to manage the 3D scene
Definition: irr_driver.hpp:86
AbstractRenderer * m_renderer
Renderer.
Definition: irr_driver.hpp:99
void reset()
Called before a race is started, after all cameras are set up.
Definition: irr_driver.cpp:259
void updateConfigIfRelevant()
If the position of the window should be remembered, store it in the config file.
Definition: irr_driver.cpp:296
int m_scene_complexity
Store if the scene is complex (based on polycount, etc)
Definition: irr_driver.hpp:157
Wind * m_wind
Wind.
Definition: irr_driver.hpp:102
bool OnEvent(const irr::SEvent &event)
This is not really used to process events, it's only used to shut down irrLicht's chatty logging unti...
Definition: irr_driver.cpp:2339
scene::ISceneNode * addWaterNode(scene::IMesh *mesh, scene::IMesh **welded, float wave_height, float wave_speed, float wave_length)
Converts the mesh into a water scene node.
Definition: irr_driver.cpp:1326
const irr::video::SColor & getClearColor() const
Returns the color to clear the back buffer.
Definition: irr_driver.hpp:293
scene::IMesh * createTexturedQuadMesh(const video::SMaterial *material, const double w, const double h)
Creates a quad mesh buffer with a given width and height (z coordinate is 0).
Definition: irr_driver.cpp:1559
IrrDriver()
The constructor creates the irrlicht device.
Definition: irr_driver.cpp:173
scene::IParticleSystemSceneNode * addParticleNode(bool default_emitter=true)
Adds a particle scene node.
Definition: irr_driver.cpp:1417
core::array< video::IRenderTarget > m_mrt
The main MRT setup.
Definition: irr_driver.hpp:107
void setClearbackBufferColor(irr::video::SColor color)
Sets the color to use when clearing the back buffer.
Definition: irr_driver.hpp:296
void removeTexture(video::ITexture *t)
Removes a texture from irrlicht's texture cache.
Definition: irr_driver.cpp:1638
bool moveWindow(int x, int y)
Moves the STK main window to coordinates (x,y)
Definition: irr_driver.cpp:1008
scene::ISceneNode * addBillboard(const core::dimension2d< f32 > size, const std::string &tex_name, scene::ISceneNode *parent=NULL)
Adds a billboard node to scene.
Definition: irr_driver.cpp:1481
unsigned int getRealTime()
Returns the current real time, which might not be 0 at start of the application.
Definition: irr_driver.cpp:2510
void removeMeshFromCache(scene::IMesh *mesh)
Removes a mesh from the mesh cache, freeing the memory.
Definition: irr_driver.cpp:1629
irr::video::SColor m_clear_color
Background colour to reset a buffer.
Definition: irr_driver.hpp:173
void setAllMaterialFlags(scene::IMesh *mesh) const
Sets the material flags in this mesh depending on the settings in material_manager.
Definition: irr_driver.cpp:1294
core::matrix4 m_ViewMatrix
Matrixes used in several places stored here to avoid recomputation.
Definition: irr_driver.hpp:110
scene::IMesh * getMesh(const std::string &name)
Loads a non-animated mesh and returns a pointer to it.
Definition: irr_driver.cpp:1277
gui::IGUIEnvironment * m_gui_env
Irrlicht gui environment.
Definition: irr_driver.hpp:93
scene::IAnimatedMesh * getAnimatedMesh(const std::string &name)
Loads an animated mesh and returns a pointer to it.
Definition: irr_driver.cpp:1233
gui::IGUIFont * m_race_font
Irrlicht race font.
Definition: irr_driver.hpp:97
void giveBoost(unsigned int cam_index)
Use motion blur for a short time.
Definition: irr_driver.hpp:325
const core::dimension2d< u32 > & getFrameSize() const
Returns the frame size.
Definition: irr_driver.cpp:2504
void update(float dt, bool loading=false)
Update, called once per frame.
Definition: irr_driver.cpp:2129
scene::IMeshSceneNode * addOctTree(scene::IMesh *mesh)
Adds a mesh that will be optimised using an oct tree.
Definition: irr_driver.cpp:1362
video::IVideoDriver * m_video_driver
Irrlicht video driver.
Definition: irr_driver.hpp:95
video::IVideoDriver * getVideoDriver() const
Returns the irrlicht video driver.
Definition: irr_driver.hpp:312
scene::ISceneNode * addSphere(float radius, const video::SColor &color=video::SColor(128, 255, 255, 255))
Adds a sphere with a given radius and color.
Definition: irr_driver.cpp:1372
scene::ISceneManager * m_scene_manager
Irrlicht scene manager.
Definition: irr_driver.hpp:91
void displayFPS()
Displays the FPS on the screen.
Definition: irr_driver.cpp:1862
~IrrDriver()
Destructor - removes the irrlicht device.
Definition: irr_driver.cpp:225
video::ITexture * getTexture(FileManager::AssetType type, const std::string &filename)
Loads a texture from a file and returns the texture object.
Definition: irr_driver.cpp:1740
void createListOfVideoModes()
Gets a list of supported video modes from the irrlicht device.
Definition: irr_driver.cpp:360
const std::vector< VideoMode > & getVideoModes() const
Returns a list of all video modes supports by the graphics card.
Definition: irr_driver.hpp:303
void grabAllTextures(const scene::IMesh *mesh)
Appends a pointer to each texture used in this mesh to the vector.
Definition: irr_driver.cpp:1761
void cancelResChange()
Call this to roll back to the previous resolution if a resolution switch attempt goes bad.
Definition: irr_driver.cpp:1188
void doScreenShot()
Requess a screenshot from irrlicht, and save it in a file.
Definition: irr_driver.cpp:2024
void initDevice()
This creates the actualy OpenGL device.
Definition: irr_driver.cpp:391
void changeResolution(const int w, const int h, const bool fullscreen)
Call to change resolution.
Definition: irr_driver.cpp:1023
void displayStoryModeTimer()
Displays the timer for Story Mode on the screen.
Definition: irr_driver.cpp:1982
void applyResolutionSettings(bool recreate_device)
Internal method that applies the resolution in user settings.
Definition: irr_driver.cpp:1048
const SHCoefficients * getSHCoefficients()
Returns a pointer to the spherical harmonics coefficients.
Definition: irr_driver.hpp:331
enum IrrDriver::@6 m_resolution_changing
Flag to indicate if a resolution change is pending (which will be acted upon in the next update).
IrrlichtDevice * getDevice() const
Returns the irrlicht device.
Definition: irr_driver.hpp:309
scene::ISceneNode * addSkyBox(const std::vector< video::ITexture * > &texture_names, const std::vector< video::ITexture * > &spherical_harmonics_textures)
Adds a skybox using.
Definition: irr_driver.cpp:1694
void setAmbientLight(const video::SColorf &light, bool force_SH_computation=true)
Sets the ambient light.
Definition: irr_driver.cpp:1840
void dropAllTextures(const scene::IMesh *mesh)
Appends a pointer to each texture used in this mesh to the vector.
Definition: irr_driver.cpp:1790
scene::IMesh * createQuadMesh(const video::SMaterial *material=NULL, bool create_one_quad=false)
Creates a quad mesh with a given material.
Definition: irr_driver.cpp:1516
void removeCameraSceneNode(scene::ICameraSceneNode *camera)
Removes a camera.
Definition: irr_driver.cpp:1725
gui::IGUIEnvironment * getGUI() const
Returns the gui environment, used to add widgets to a screen.
Definition: irr_driver.hpp:318
void printRenderStats()
Prints statistics about rendering, e.g.
Definition: irr_driver.cpp:1212
scene::ICameraSceneNode * addCameraSceneNode()
Adds a camera to the scene.
Definition: irr_driver.cpp:1713
scene::ISceneManager * getSceneManager() const
Returns the irrlicht scene manager.
Definition: irr_driver.hpp:315
bool m_pointer_shown
Whether the mouse cursor is currently shown.
Definition: irr_driver.hpp:154
scene::IAnimatedMeshSceneNode * addAnimatedMesh(scene::IAnimatedMesh *mesh, const std::string &debug_name, scene::ISceneNode *parent=NULL, std::shared_ptr< GE::GERenderInfo > render_info=nullptr)
Adds an animated mesh to the scene.
Definition: irr_driver.cpp:1649
scene::ISceneNode * addMesh(scene::IMesh *mesh, const std::string &debug_name, scene::ISceneNode *parent=NULL, std::shared_ptr< GE::GERenderInfo > render_info=nullptr)
Adds a static mesh to scene.
Definition: irr_driver.cpp:1427
void removeNode(scene::ISceneNode *node)
Removes a scene node from the scene.
Definition: irr_driver.cpp:1620
IrrlichtDevice * m_device
The irrlicht device.
Definition: irr_driver.hpp:89
Definition: light.hpp:37
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
manages smoke particle effects
Definition: per_camera_node.hpp:46
Definition: render_target.hpp:42
Definition: sp_dynamic_draw_call.hpp:42
Definition: wind.hpp:26
Definition: irr_driver.hpp:138
Definition: spherical_harmonics.hpp:33