From 89970848311ee2d49040a148a56d80590091877c Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 10 Jan 2015 17:35:26 -0300 Subject: 2D Rewrite Step [1] -=-=-=-=-=-=-=-=-=- -Moved drawing code to a single function that takes linked list (should make it easier to optimize in the future). -Implemented Z ordering of 2D nodes. Node2D and those that inherit have a visibility/Z property that affects drawing order (besides the tree order) -Removed OpenGL ES 1.x support. Good riddance! --- platform/windows/detect.py | 4 ++-- platform/windows/os_windows.cpp | 6 +++--- platform/windows/platform_config.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'platform/windows') diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 245d6f1bd3..16dd695c59 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -113,7 +113,7 @@ def configure(env): env.Append(CCFLAGS=['/DTYPED_METHOD_BIND']) env.Append(CCFLAGS=['/DGLES2_ENABLED']) - env.Append(CCFLAGS=['/DGLES1_ENABLED']) + env.Append(CCFLAGS=['/DGLEW_ENABLED']) LIBS=['winmm','opengl32','dsound','kernel32','ole32','user32','gdi32', 'IPHLPAPI', 'wsock32', 'shell32','advapi32'] env.Append(LINKFLAGS=[p+env["LIBSUFFIX"] for p in LIBS]) @@ -228,7 +228,7 @@ def configure(env): env.Append(CCFLAGS=['-DWINDOWS_ENABLED','-mwindows']) env.Append(CPPFLAGS=['-DRTAUDIO_ENABLED']) - env.Append(CCFLAGS=['-DGLES2_ENABLED','-DGLES1_ENABLED','-DGLEW_ENABLED']) + env.Append(CCFLAGS=['-DGLES2_ENABLED','-DGLEW_ENABLED']) env.Append(LIBS=['mingw32','opengl32', 'dsound', 'ole32', 'd3d9','winmm','gdi32','iphlpapi','wsock32','kernel32']) if (env["bits"]=="32" and env["mingw64_for_32"]!="yes"): diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index a10152a025..a3a26ddb25 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -27,7 +27,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "drivers/gles2/rasterizer_gles2.h" -#include "drivers/gles1/rasterizer_gles1.h" + #include "os_windows.h" #include "drivers/nedmalloc/memory_pool_static_nedmalloc.h" #include "drivers/unix/memory_pool_static_malloc.h" @@ -130,11 +130,11 @@ void RedirectIOToConsole() { int OS_Windows::get_video_driver_count() const { - return 2; + return 1; } const char * OS_Windows::get_video_driver_name(int p_driver) const { - return p_driver==0?"GLES2":"GLES1"; + return p_driver=="GLES2"; } OS::VideoMode OS_Windows::get_default_video_mode() const { diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h index 7bc3e42833..a7e7f9c370 100644 --- a/platform/windows/platform_config.h +++ b/platform/windows/platform_config.h @@ -31,5 +31,5 @@ //#include //#endif #define GLES2_INCLUDE_H "gl_context/glew.h" -#define GLES1_INCLUDE_H "gl_context/glew.h" + -- cgit v1.2.3 From 66afddb3e8db03a675e744f74b07acc4db8f2aa1 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 11 Jan 2015 11:43:31 -0300 Subject: -Initial (untested) implementation of 2D shaders. Probably broken, will be fixed later. -fixed issue of opacity not working --- platform/windows/os_windows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/windows') diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index a3a26ddb25..45d13da828 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -134,7 +134,7 @@ int OS_Windows::get_video_driver_count() const { } const char * OS_Windows::get_video_driver_name(int p_driver) const { - return p_driver=="GLES2"; + return "GLES2"; } OS::VideoMode OS_Windows::get_default_video_mode() const { -- cgit v1.2.3 From 726d379775b4c8e1fc2b72f0c35829cd3151c880 Mon Sep 17 00:00:00 2001 From: the_mech Date: Sat, 17 Jan 2015 02:48:35 +0100 Subject: added nvidia optimus enablement --- platform/windows/os_windows.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'platform/windows') diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 45d13da828..ce79133664 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -56,6 +56,9 @@ #include "shlobj.h" static const WORD MAX_CONSOLE_LINES = 1500; +extern "C" { + _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; +} //#define STDOUT_FILE -- cgit v1.2.3 From 9f61a4881e018508e1914ddbb4e7740c11f0a272 Mon Sep 17 00:00:00 2001 From: marynate Date: Sun, 18 Jan 2015 02:06:29 +0800 Subject: Fix mingw windows build error --- platform/windows/os_windows.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platform/windows') diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index ce79133664..4fa061886d 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -57,7 +57,11 @@ static const WORD MAX_CONSOLE_LINES = 1500; extern "C" { +#ifdef _MSC_VER _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; +#else + __attribute__((visibility("default"))) DWORD NvOptimusEnablement = 0x00000001; +#endif } //#define STDOUT_FILE -- cgit v1.2.3