diff --git a/include/Pomdog/Platform/Cocoa/Bootstrap.hpp b/include/Pomdog/Platform/Cocoa/Bootstrap.hpp index 780bdd4e9..f840ff913 100755 --- a/include/Pomdog/Platform/Cocoa/Bootstrap.hpp +++ b/include/Pomdog/Platform/Cocoa/Bootstrap.hpp @@ -27,18 +27,25 @@ namespace Pomdog::Cocoa { class POMDOG_EXPORT Bootstrap final { public: + /// Sets the window where the video is drawn. void SetWindow(NSWindow* window); + /// Sets to true if OpenGL is enabled, false if Metal is enabled. false by default. void SetOpenGLEnabled(bool enabled); + /// Sets the format of the back buffer when using the OpenGL renderer. void SetOpenGLSurfaceFormat(SurfaceFormat surfaceFormat); + /// Sets the format of the depth stencil buffer when using the OpenGL renderer. void SetOpenGLDepthFormat(DepthFormat depthFormat); + /// Sets an error event handler to a log stream. void OnError(std::function&& onError); + /// Sets an completion event handler to a log stream. void OnCompleted(std::function&& onCompleted); + /// Begins running a game loop. void Run(std::function(const std::shared_ptr&)>&& createGame); private: diff --git a/include/Pomdog/Platform/Win32/Bootstrap.hpp b/include/Pomdog/Platform/Win32/Bootstrap.hpp index d478f2aff..3852c8b71 100644 --- a/include/Pomdog/Platform/Win32/Bootstrap.hpp +++ b/include/Pomdog/Platform/Win32/Bootstrap.hpp @@ -10,38 +10,49 @@ #include namespace Pomdog { - class Game; class GameHost; +} // namespace Pomdog -namespace Win32 { +namespace Pomdog::Win32 { -class POMDOG_EXPORT Bootstrap { +class POMDOG_EXPORT Bootstrap final { public: + /// Sets the instance handle. void SetInstance(HINSTANCE hInstance) noexcept; + /// Sets the WinMain function's `nCmdShow` parameter. void SetCommandShow(int cmdShow) noexcept; + /// Sets a window's icon. void SetIcon(HICON icon) noexcept; + /// Sets a window's small icon. void SetIconSmall(HICON iconSmall) noexcept; + /// Sets the format of the back buffer. void SetSurfaceFormat(SurfaceFormat surfaceFormat) noexcept; + /// Sets the format of the depth stencil buffer. void SetDepthFormat(DepthFormat depthFormat) noexcept; + /// Sets the maximum rate at which the back buffers can be presented. 60 by default. void SetPresentationInterval(int presentationInterval) noexcept; + /// Sets the size of the swap chain, in pixels. void SetBackBufferSize(int width, int height) noexcept; + /// Sets to true if the window is in full screen mode, false if it is window mode. false by default. void SetFullScreen(bool isFullScreen) noexcept; - void SetOpenGLEnabled(bool openGLEnabled) noexcept; + /// Sets to true if OpenGL is enabled, false if Direct3D is enabled. false by default. + void SetOpenGLEnabled(bool enabled) noexcept; + /// Sets an error event handler to a log stream. void OnError(std::function onError); - void Run( - const std::function(const std::shared_ptr&)>& createApp); + /// Begins running a game loop. + void Run(const std::function(const std::shared_ptr&)>& createGame); private: std::function onError; @@ -58,5 +69,4 @@ class POMDOG_EXPORT Bootstrap { bool openGLEnabled = false; }; -} // namespace Win32 -} // namespace Pomdog +} // namespace Pomdog::Win32 diff --git a/include/Pomdog/Platform/X11/Bootstrap.hpp b/include/Pomdog/Platform/X11/Bootstrap.hpp index 1e5b5b3cc..f8cf94224 100644 --- a/include/Pomdog/Platform/X11/Bootstrap.hpp +++ b/include/Pomdog/Platform/X11/Bootstrap.hpp @@ -9,30 +9,37 @@ #include namespace Pomdog { - class Game; class GameHost; +} // namespace Pomdog -namespace X11 { +namespace Pomdog::X11 { -class POMDOG_EXPORT Bootstrap { +class POMDOG_EXPORT Bootstrap final { public: + /// Sets the format of the back buffer. void SetSurfaceFormat(SurfaceFormat surfaceFormat) noexcept; + /// Sets the format of the depth stencil buffer. void SetDepthFormat(DepthFormat depthFormat) noexcept; + /// Sets the maximum rate at which the back buffers can be presented. 60 by default. void SetPresentationInterval(int presentationInterval) noexcept; + /// Sets the size of the swap chain, in pixels. void SetBackBufferSize(int width, int height) noexcept; + /// Sets to true if the window is in full screen mode, false if it is window mode. false by default. void SetFullScreen(bool isFullScreen) noexcept; - void SetOpenGLEnabled(bool openGLEnabled) noexcept; + /// Sets to true if OpenGL is enabled, false if Direct3D is enabled. false by default. + void SetOpenGLEnabled(bool enabled) noexcept; + /// Sets an error event handler to a log stream. void OnError(std::function onError); - void Run( - const std::function(const std::shared_ptr&)>& createApp); + /// Begins running a game loop. + void Run(const std::function(const std::shared_ptr&)>& createGame); private: std::function onError; @@ -44,5 +51,4 @@ class POMDOG_EXPORT Bootstrap { bool isFullScreen = false; }; -} // namespace X11 -} // namespace Pomdog +} // namespace Pomdog::X11