Browse Source

Fixed D3D9 build. Added borderless as a command line option and documented it.

Lasse Öörni 12 năm trước cách đây
mục cha
commit
721f70fe1a

+ 1 - 0
Docs/GettingStarted.dox

@@ -184,6 +184,7 @@ The engine can be configured using the following command line options.
 -r <freq>    Sound mixing frequency in Hz
 -p <paths>   Resource path(s) to use, separated by semicolons
 -log <level> Change the log level, valid 'level' values are 'debug', 'info', 'warning', 'error'
+-borderless  Borderless window mode
 -headless    Headless mode. No application window will be created
 -prepass     Use light pre-pass rendering
 -deferred    Use deferred rendering

+ 1 - 0
Docs/Reference.dox

@@ -139,6 +139,7 @@ The full list of supported parameters, their datatypes and default values:
 - WindowHeight (int) %Window vertical dimension. Default 0 (use desktop resolution, or 768 in windowed mode.)
 - WindowResizable (bool) Whether window is resizable. Default false.
 - FullScreen (bool) Whether to create a full-screen window. Default true.
+- Borderless (bool) Whether to create the window as borderless. Default false.
 - TripleBuffer (bool) Whether to use triple-buffering. Default false.
 - VSync (bool) Whether to wait for vertical sync when presenting rendering window contents. Default false.
 - Multisample (int) Hardware multisampling level. Default 1 (no multisampling.)

+ 2 - 0
Source/Engine/Engine/Engine.cpp

@@ -645,6 +645,8 @@ VariantMap Engine::ParseParameters(const Vector<String>& arguments)
                 ret["FullScreen"] = false;
             else if (argument == "s")
                 ret["WindowResizable"] = true;
+            else if (argument == "borderless")
+                ret["Borderless"] = true;
             else if (argument == "q")
                 ret["LogQuiet"] = true;
             else if (argument == "log" && !value.Empty())

+ 4 - 3
Source/Engine/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -176,6 +176,7 @@ Graphics::Graphics(Context* context) :
     height_(0),
     multiSample_(1),
     fullscreen_(false),
+    borderless_(false),
     resizable_(false),
     vsync_(false),
     tripleBuffer_(false),
@@ -468,7 +469,7 @@ bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless,
 
 bool Graphics::SetMode(int width, int height)
 {
-    return SetMode(width, height, fullscreen_, resizable_, vsync_, tripleBuffer_, multiSample_);
+    return SetMode(width, height, fullscreen_, borderless_, resizable_, vsync_, tripleBuffer_, multiSample_);
 }
 
 void Graphics::SetSRGB(bool enable)
@@ -2009,7 +2010,7 @@ void Graphics::WindowResized()
     eventData[P_HEIGHT] = height_;
     eventData[P_FULLSCREEN] = fullscreen_;
     eventData[P_RESIZABLE] = resizable_;
-    eventData[P_BORDERLESS] borderless_;
+    eventData[P_BORDERLESS] = borderless_;
     SendEvent(E_SCREENMODE, eventData);
 }
 
@@ -2229,7 +2230,7 @@ unsigned Graphics::GetFormat(const String& formatName)
     return GetRGBFormat();
 }
 
-bool Graphics::(int width, int height, bool resizable, bool borderless, bool fullscreen)
+bool Graphics::OpenWindow(int width, int height, bool resizable, bool borderless)
 {
     if(!externalWindow_)
     {

+ 1 - 1
Source/Engine/Graphics/OpenGL/OGLGraphics.cpp

@@ -156,8 +156,8 @@ Graphics::Graphics(Context* context_) :
     height_(0),
     multiSample_(1),
     fullscreen_(false),
-    resizable_(false),
     borderless_(false),
+    resizable_(false),
     vsync_(false),
     tripleBuffer_(false),
     sRGB_(false),

+ 1 - 0
Source/Tools/Urho3DPlayer/Urho3DPlayer.cpp

@@ -93,6 +93,7 @@ void Urho3DPlayer::Setup()
             "-r <freq>   Sound mixing frequency in Hz\n"
             "-p <paths>  Resource path(s) to use, separated by semicolons\n"
             "-log<level> Change the log level, valid 'level' values are 'debug', 'info', 'warning', 'error'\n"
+            "-borderless Borderless window mode\n"
             "-headless   Headless mode. No application window will be created\n"
             "-prepass    Use light pre-pass rendering\n"
             "-deferred   Use deferred rendering\n"