Skip to content

Commit

Permalink
Add doc for Run() and Yield() in IrrlichtDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
greenya committed Jun 23, 2019
1 parent b2fe23f commit 4ad89a8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/IrrlichtDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,4 +390,4 @@ bool IrrlichtDevice::Event(IrrlichtLime::Event^ e)
return OnEvent(e);
}

} // end namespace IrrlichtLime
} // end namespace IrrlichtLime
17 changes: 17 additions & 0 deletions source/IrrlichtDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ ref class OSOperator;
ref class Randomizer;
ref class Timer;

/// <summary>
/// The Irrlicht device. You can create it with <c>IrrlichtDevice.CreateDevice()</c>.
/// This is the most important class of the Irrlicht Engine.
/// You can access everything in the engine if you have a pointer to an instance of this class.
/// There should be only one instance of this class at any time.
/// </summary>
public ref class IrrlichtDevice : ReferenceCounted
{
public:
Expand Down Expand Up @@ -57,6 +63,12 @@ public ref class IrrlichtDevice : ReferenceCounted

void RestoreWindow();

/// <summary>
/// Runs the device.
/// Also increments the virtual timer by calling <c>Timer.Tick()</c>.
/// You can prevent this by calling <c>Timer.Stop()</c>; before and <c>Timer.Start()</c> after calling this method.
/// </summary>
/// <returns>False if device wants to be deleted.</returns>
bool Run();

bool SetGammaRamp(float red, float green, float blue, float relativebrightness, float relativecontrast);
Expand All @@ -66,6 +78,11 @@ public ref class IrrlichtDevice : ReferenceCounted

void Sleep(int timeMs, bool pauseTimer);
void Sleep(int timeMs);

/// <summary>
/// Cause the device to temporarily pause execution and let other processes run.
/// This should bring down processor usage without major performance loss for Irrlicht.
/// </summary>
void Yield();

property Video::ColorFormat ColorFormat { Video::ColorFormat get(); }
Expand Down

0 comments on commit 4ad89a8

Please sign in to comment.