diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index 339caec31..7a40058e6 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -40,7 +40,8 @@ void Editor::Initialize() { // Call this before Maincomponent::Initialize if you want to load shaders from an other directory! // otherwise, shaders will be loaded from the working directory - wiRenderer::SHADERPATH = "../WickedEngine/shaders/"; + wiRenderer::SHADERPATH = "../WickedEngine/shaders/"; + wiFont::FONTPATH = "../WickedEngine/fonts/"; // search for fonts elsewhere MainComponent::Initialize(); infoDisplay.active = true; diff --git a/Editor/Editor.vcxproj b/Editor/Editor.vcxproj index 5c13c5393..41ca0848a 100644 --- a/Editor/Editor.vcxproj +++ b/Editor/Editor.vcxproj @@ -204,9 +204,6 @@ - - true - true @@ -239,9 +236,6 @@ Discomap true - - true - true diff --git a/Editor/Editor.vcxproj.filters b/Editor/Editor.vcxproj.filters index 936de1864..192f6eb65 100644 --- a/Editor/Editor.vcxproj.filters +++ b/Editor/Editor.vcxproj.filters @@ -11,9 +11,6 @@ {314039e9-0e24-4816-b0cf-d87020800f22} - - {f08bcf7d-cb6a-426e-9615-b648dbad219a} - @@ -134,9 +131,6 @@ images - - fonts - Resource Files @@ -144,9 +138,6 @@ - - fonts - diff --git a/Editor/fonts/default_font.dds b/Editor/fonts/default_font.dds deleted file mode 100644 index ab4ebdc9e..000000000 Binary files a/Editor/fonts/default_font.dds and /dev/null differ diff --git a/Editor/fonts/default_font.wifont b/Editor/fonts/default_font.wifont deleted file mode 100644 index e228f084f..000000000 --- a/Editor/fonts/default_font.wifont +++ /dev/null @@ -1,95 +0,0 @@ -lineHeight= 16 -33 ! 0.0 0.000976563 1 -34 " 0.00195313 0.00488281 3 -35 # 0.00585938 0.0136719 8 -36 $ 0.0146484 0.0195313 5 -37 % 0.0205078 0.0302734 10 -38 & 0.03125 0.0390625 8 -39 ' 0.0400391 0.0410156 1 -40 ( 0.0419922 0.0449219 3 -41 ) 0.0458984 0.0488281 3 -42 * 0.0498047 0.0546875 5 -43 + 0.0556641 0.0625 7 -44 , 0.0634766 0.0644531 1 -45 - 0.0654297 0.0683594 3 -46 . 0.0693359 0.0703125 1 -47 / 0.0712891 0.0751953 4 -48 0 0.0761719 0.0820313 6 -49 1 0.0830078 0.0859375 3 -50 2 0.0869141 0.0927734 6 -51 3 0.09375 0.0996094 6 -52 4 0.100586 0.106445 6 -53 5 0.107422 0.113281 6 -54 6 0.114258 0.120117 6 -55 7 0.121094 0.126953 6 -56 8 0.12793 0.133789 6 -57 9 0.134766 0.140625 6 -58 : 0.141602 0.142578 1 -59 ; 0.143555 0.144531 1 -60 < 0.145508 0.151367 6 -61 = 0.152344 0.15918 7 -62 > 0.160156 0.166016 6 -63 ? 0.166992 0.171875 5 -64 @ 0.172852 0.18457 12 -65 A 0.185547 0.194336 9 -66 B 0.195313 0.202148 7 -67 C 0.203125 0.209961 7 -68 D 0.210938 0.217773 7 -69 E 0.21875 0.225586 7 -70 F 0.226563 0.232422 6 -71 G 0.233398 0.241211 8 -72 H 0.242188 0.249023 7 -73 I 0.25 0.250977 1 -74 J 0.251953 0.256836 5 -75 K 0.257813 0.265625 8 -76 L 0.266602 0.272461 6 -77 M 0.273438 0.282227 9 -78 N 0.283203 0.290039 7 -79 O 0.291016 0.298828 8 -80 P 0.299805 0.306641 7 -81 Q 0.307617 0.31543 8 -82 R 0.316406 0.323242 7 -83 S 0.324219 0.331055 7 -84 T 0.332031 0.338867 7 -85 U 0.339844 0.34668 7 -86 V 0.347656 0.356445 9 -87 W 0.357422 0.370117 13 -88 X 0.371094 0.37793 7 -89 Y 0.378906 0.385742 7 -90 Z 0.386719 0.393555 7 -91 [ 0.394531 0.396484 2 -92 \ 0.397461 0.401367 4 -93 ] 0.402344 0.404297 2 -94 ^ 0.405273 0.410156 5 -95 _ 0.411133 0.417969 7 -96 ` 0.418945 0.420898 2 -97 a 0.421875 0.426758 5 -98 b 0.427734 0.432617 5 -99 c 0.433594 0.438477 5 -100 d 0.439453 0.444336 5 -101 e 0.445313 0.450195 5 -102 f 0.451172 0.455078 4 -103 g 0.456055 0.460938 5 -104 h 0.461914 0.466797 5 -105 i 0.467773 0.46875 1 -106 j 0.469727 0.472656 3 -107 k 0.473633 0.478516 5 -108 l 0.479492 0.480469 1 -109 m 0.481445 0.490234 9 -110 n 0.491211 0.496094 5 -111 o 0.49707 0.501953 5 -112 p 0.50293 0.507813 5 -113 q 0.508789 0.513672 5 -114 r 0.514648 0.517578 3 -115 s 0.518555 0.523438 5 -116 t 0.524414 0.527344 3 -117 u 0.52832 0.533203 5 -118 v 0.53418 0.539063 5 -119 w 0.540039 0.548828 9 -120 x 0.549805 0.554688 5 -121 y 0.555664 0.560547 5 -122 z 0.561523 0.566406 5 -123 { 0.567383 0.570313 3 -124 | 0.571289 0.572266 1 -125 } 0.573242 0.576172 3 -126 ~ 0.577148 0.583984 7 \ No newline at end of file diff --git a/Template_Windows/ReadMe.txt b/Template_Windows/ReadMe.txt new file mode 100644 index 000000000..6adda5b04 --- /dev/null +++ b/Template_Windows/ReadMe.txt @@ -0,0 +1,10 @@ +This is a template project showing the minumum setup required to set up an application using Wicked Engine. +The project has been generated with the Visual Studio Win32 application template wizard + +Contents of interest: + - stdafx.h + This is the precompiled header file, WickedEngine.h has been included here + - main.cpp + This is the windows application entry point. The MainComponent has been created here, this is the engine runtime component. + main.Initialize(), main.SetWindow() and main.Run() functions are called here which are necessary to setting up an application. + diff --git a/Template_Windows/TemplateWindows.ico b/Template_Windows/TemplateWindows.ico new file mode 100644 index 000000000..e77e762e9 Binary files /dev/null and b/Template_Windows/TemplateWindows.ico differ diff --git a/Template_Windows/TemplateWindows.rc b/Template_Windows/TemplateWindows.rc new file mode 100644 index 000000000..e26dc3185 --- /dev/null +++ b/Template_Windows/TemplateWindows.rc @@ -0,0 +1,161 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#ifndef APSTUDIO_INVOKED +#include "targetver.h" +#endif +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_TEMPLATEWINDOWS ICON "TemplateWindows.ico" + +IDI_SMALL ICON "small.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDC_TEMPLATEWINDOWS MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit", IDM_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About ...", IDM_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDC_TEMPLATEWINDOWS ACCELERATORS +BEGIN + "?", IDM_ABOUT, ASCII, ALT + "/", IDM_ABOUT, ASCII, ALT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Template_Windows" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,14,14,21,20 + LTEXT "Template_Windows, Version 1.0",IDC_STATIC,42,14,114,8,SS_NOPREFIX + LTEXT "Copyright (C) 2017",IDC_STATIC,42,26,114,8 + DEFPUSHBUTTON "OK",IDOK,113,41,50,14,WS_GROUP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 163 + TOPMARGIN, 7 + BOTTOMMARGIN, 55 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#ifndef APSTUDIO_INVOKED\r\n" + "#include ""targetver.h""\r\n" + "#endif\r\n" + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_APP_TITLE "Wicked Engine Template" + IDC_TEMPLATEWINDOWS "TEMPLATEWINDOWS" +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Template_Windows/Template_Windows.vcxproj b/Template_Windows/Template_Windows.vcxproj new file mode 100644 index 000000000..e426be3ce --- /dev/null +++ b/Template_Windows/Template_Windows.vcxproj @@ -0,0 +1,197 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE} + Win32Proj + Template_Windows + 10.0.15063.0 + + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + false + $(ProjectName)\$(Platform)\$(Configuration)\ + + + true + $(ProjectName)\$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + true + $(ProjectName)\$(Platform)\$(Configuration)\ + + + false + $(ProjectName)\$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + Use + Level3 + MaxSpeed + true + true + NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + ../WickedEngine + MultiThreaded + + + Windows + true + true + true + ../$(Platform)/$(Configuration) + + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + ../WickedEngine + + + Windows + true + ../$(Platform)/$(Configuration) + + + + + Use + Level3 + Disabled + _DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + ../WickedEngine + + + Windows + true + ../$(Platform)/$(Configuration) + + + + + Use + Level3 + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + ../WickedEngine + MultiThreaded + + + Windows + true + true + true + ../$(Platform)/$(Configuration) + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + {8c15dc72-70c8-4212-b046-0b166a688a7c} + + + {06163dcb-b183-4ed9-9c62-13ef1658e049} + + + + + + \ No newline at end of file diff --git a/Template_Windows/Template_Windows.vcxproj.filters b/Template_Windows/Template_Windows.vcxproj.filters new file mode 100644 index 000000000..d3f1243f1 --- /dev/null +++ b/Template_Windows/Template_Windows.vcxproj.filters @@ -0,0 +1,50 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {7f6954b9-3868-47ed-8e6c-0dd52e678236} + + + + + + + + Code + + + Code + + + Code + + + Code + + + + + Code + + + Code + + + + + Resource Files + + + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/Template_Windows/main.cpp b/Template_Windows/main.cpp new file mode 100644 index 000000000..e05fb0110 --- /dev/null +++ b/Template_Windows/main.cpp @@ -0,0 +1,191 @@ +// TemplateWindows.cpp : Defines the entry point for the application. +// + +#include "stdafx.h" +#include "main.h" + +#define MAX_LOADSTRING 100 + +// Global Variables: +HINSTANCE hInst; // current instance +WCHAR szTitle[MAX_LOADSTRING]; // The title bar text +WCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name +MainComponent main; // Wicked Engine Main Runtime Component + +// Forward declarations of functions included in this code module: +ATOM MyRegisterClass(HINSTANCE hInstance); +BOOL InitInstance(HINSTANCE, int); +LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); + +int APIENTRY wWinMain(_In_ HINSTANCE hInstance, + _In_opt_ HINSTANCE hPrevInstance, + _In_ LPWSTR lpCmdLine, + _In_ int nCmdShow) +{ + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + + // TODO: Place code here. + + // Initialize global strings + LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); + LoadStringW(hInstance, IDC_TEMPLATEWINDOWS, szWindowClass, MAX_LOADSTRING); + MyRegisterClass(hInstance); + + // Perform application initialization: + if (!InitInstance (hInstance, nCmdShow)) + { + return FALSE; + } + + HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_TEMPLATEWINDOWS)); + + wiRenderer::SHADERPATH = "../WickedEngine/shaders/"; // search for shaders elsewhere + wiFont::FONTPATH = "../WickedEngine/fonts/"; // search for fonts elsewhere + main.Initialize(); // initialize engine systems (mandatory) + main.infoDisplay.active = true; // just show some basic info... + + + MSG msg = { 0 }; + while (msg.message != WM_QUIT) + { + if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + else { + + main.Run(); // run the update - render loop (mandatory) + + } + } + + return (int) msg.wParam; +} + + + +// +// FUNCTION: MyRegisterClass() +// +// PURPOSE: Registers the window class. +// +ATOM MyRegisterClass(HINSTANCE hInstance) +{ + WNDCLASSEXW wcex; + + wcex.cbSize = sizeof(WNDCLASSEX); + + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = WndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; + wcex.hInstance = hInstance; + wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_TEMPLATEWINDOWS)); + wcex.hCursor = LoadCursor(nullptr, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_TEMPLATEWINDOWS); + wcex.lpszClassName = szWindowClass; + wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); + + return RegisterClassExW(&wcex); +} + +// +// FUNCTION: InitInstance(HINSTANCE, int) +// +// PURPOSE: Saves instance handle and creates main window +// +// COMMENTS: +// +// In this function, we save the instance handle in a global variable and +// create and display the main program window. +// +BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) +{ + hInst = hInstance; // Store instance handle in our global variable + + HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr); + + if (!hWnd) + { + return FALSE; + } + + ShowWindow(hWnd, nCmdShow); + UpdateWindow(hWnd); + + main.SetWindow(hWnd, hInst); // assign window handle (mandatory) + + return TRUE; +} + +// +// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM) +// +// PURPOSE: Processes messages for the main window. +// +// WM_COMMAND - process the application menu +// WM_PAINT - Paint the main window +// WM_DESTROY - post a quit message and return +// +// +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_COMMAND: + { + int wmId = LOWORD(wParam); + // Parse the menu selections: + switch (wmId) + { + case IDM_ABOUT: + DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); + break; + case IDM_EXIT: + DestroyWindow(hWnd); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + } + break; + case WM_PAINT: + { + PAINTSTRUCT ps; + HDC hdc = BeginPaint(hWnd, &ps); + // TODO: Add any drawing code that uses hdc here... + EndPaint(hWnd, &ps); + } + break; + case WM_DESTROY: + PostQuitMessage(0); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + return 0; +} + +// Message handler for about box. +INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(lParam); + switch (message) + { + case WM_INITDIALOG: + return (INT_PTR)TRUE; + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) + { + EndDialog(hDlg, LOWORD(wParam)); + return (INT_PTR)TRUE; + } + break; + } + return (INT_PTR)FALSE; +} diff --git a/Template_Windows/main.h b/Template_Windows/main.h new file mode 100644 index 000000000..d00d47e78 --- /dev/null +++ b/Template_Windows/main.h @@ -0,0 +1,3 @@ +#pragma once + +#include "resource.h" diff --git a/Template_Windows/resource.h b/Template_Windows/resource.h new file mode 100644 index 000000000..daec83816 --- /dev/null +++ b/Template_Windows/resource.h @@ -0,0 +1,31 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by TemplateWindows.rc +// + +#define IDS_APP_TITLE 103 + +#define IDR_MAINFRAME 128 +#define IDD_TEMPLATEWINDOWS_DIALOG 102 +#define IDD_ABOUTBOX 103 +#define IDM_ABOUT 104 +#define IDM_EXIT 105 +#define IDI_TEMPLATEWINDOWS 107 +#define IDI_SMALL 108 +#define IDC_TEMPLATEWINDOWS 109 +#define IDC_MYICON 2 +#ifndef IDC_STATIC +#define IDC_STATIC -1 +#endif +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS + +#define _APS_NO_MFC 130 +#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff --git a/Template_Windows/small.ico b/Template_Windows/small.ico new file mode 100644 index 000000000..e77e762e9 Binary files /dev/null and b/Template_Windows/small.ico differ diff --git a/Template_Windows/stdafx.cpp b/Template_Windows/stdafx.cpp new file mode 100644 index 000000000..bd27597c6 --- /dev/null +++ b/Template_Windows/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// $safeprojectname$.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Template_Windows/stdafx.h b/Template_Windows/stdafx.h new file mode 100644 index 000000000..285be19c6 --- /dev/null +++ b/Template_Windows/stdafx.h @@ -0,0 +1,22 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + +// C RunTime Header Files +#include +#include +#include +#include + + +// TODO: reference additional headers your program requires here +#include // include wicked engine library diff --git a/Template_Windows/targetver.h b/Template_Windows/targetver.h new file mode 100644 index 000000000..87c0086de --- /dev/null +++ b/Template_Windows/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/Tests/Tests.cpp b/Tests/Tests.cpp index 5c5597d47..c8b1fcae6 100644 --- a/Tests/Tests.cpp +++ b/Tests/Tests.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" #include "Tests.h" -#include "wiProfiler.h" Tests::Tests() @@ -15,6 +14,7 @@ void Tests::Initialize() // Call this before Maincomponent::Initialize if you want to load shaders from an other directory! // otherwise, shaders will be loaded from the working directory wiRenderer::SHADERPATH = "../WickedEngine/shaders/"; + wiFont::FONTPATH = "../WickedEngine/fonts/"; // search for fonts elsewhere MainComponent::Initialize(); infoDisplay.active = true; @@ -24,8 +24,6 @@ void Tests::Initialize() infoDisplay.resolution = true; activateComponent(new TestsRenderer); - - wiProfiler::GetInstance().ENABLED = false; } diff --git a/Tests/Tests.vcxproj b/Tests/Tests.vcxproj index 9660d8a84..675753bfb 100644 --- a/Tests/Tests.vcxproj +++ b/Tests/Tests.vcxproj @@ -186,9 +186,6 @@ - - true - @@ -202,9 +199,6 @@ - - true - true diff --git a/Tests/Tests.vcxproj.filters b/Tests/Tests.vcxproj.filters index 9d598d470..679a04101 100644 --- a/Tests/Tests.vcxproj.filters +++ b/Tests/Tests.vcxproj.filters @@ -8,9 +8,6 @@ {c2ccbb94-b23f-4b37-94f4-56bae2be0128} - - {71eaf3c0-2e45-4073-b714-cb4f7576c99f} - {115a0548-191e-4f7c-bd01-95f6c7de7afe} @@ -50,9 +47,6 @@ Resource Files - - fonts - Resource Files @@ -62,9 +56,6 @@ - - fonts - diff --git a/Tests/fonts/default_font.dds b/Tests/fonts/default_font.dds deleted file mode 100644 index ab4ebdc9e..000000000 Binary files a/Tests/fonts/default_font.dds and /dev/null differ diff --git a/Tests/fonts/default_font.wifont b/Tests/fonts/default_font.wifont deleted file mode 100644 index e228f084f..000000000 --- a/Tests/fonts/default_font.wifont +++ /dev/null @@ -1,95 +0,0 @@ -lineHeight= 16 -33 ! 0.0 0.000976563 1 -34 " 0.00195313 0.00488281 3 -35 # 0.00585938 0.0136719 8 -36 $ 0.0146484 0.0195313 5 -37 % 0.0205078 0.0302734 10 -38 & 0.03125 0.0390625 8 -39 ' 0.0400391 0.0410156 1 -40 ( 0.0419922 0.0449219 3 -41 ) 0.0458984 0.0488281 3 -42 * 0.0498047 0.0546875 5 -43 + 0.0556641 0.0625 7 -44 , 0.0634766 0.0644531 1 -45 - 0.0654297 0.0683594 3 -46 . 0.0693359 0.0703125 1 -47 / 0.0712891 0.0751953 4 -48 0 0.0761719 0.0820313 6 -49 1 0.0830078 0.0859375 3 -50 2 0.0869141 0.0927734 6 -51 3 0.09375 0.0996094 6 -52 4 0.100586 0.106445 6 -53 5 0.107422 0.113281 6 -54 6 0.114258 0.120117 6 -55 7 0.121094 0.126953 6 -56 8 0.12793 0.133789 6 -57 9 0.134766 0.140625 6 -58 : 0.141602 0.142578 1 -59 ; 0.143555 0.144531 1 -60 < 0.145508 0.151367 6 -61 = 0.152344 0.15918 7 -62 > 0.160156 0.166016 6 -63 ? 0.166992 0.171875 5 -64 @ 0.172852 0.18457 12 -65 A 0.185547 0.194336 9 -66 B 0.195313 0.202148 7 -67 C 0.203125 0.209961 7 -68 D 0.210938 0.217773 7 -69 E 0.21875 0.225586 7 -70 F 0.226563 0.232422 6 -71 G 0.233398 0.241211 8 -72 H 0.242188 0.249023 7 -73 I 0.25 0.250977 1 -74 J 0.251953 0.256836 5 -75 K 0.257813 0.265625 8 -76 L 0.266602 0.272461 6 -77 M 0.273438 0.282227 9 -78 N 0.283203 0.290039 7 -79 O 0.291016 0.298828 8 -80 P 0.299805 0.306641 7 -81 Q 0.307617 0.31543 8 -82 R 0.316406 0.323242 7 -83 S 0.324219 0.331055 7 -84 T 0.332031 0.338867 7 -85 U 0.339844 0.34668 7 -86 V 0.347656 0.356445 9 -87 W 0.357422 0.370117 13 -88 X 0.371094 0.37793 7 -89 Y 0.378906 0.385742 7 -90 Z 0.386719 0.393555 7 -91 [ 0.394531 0.396484 2 -92 \ 0.397461 0.401367 4 -93 ] 0.402344 0.404297 2 -94 ^ 0.405273 0.410156 5 -95 _ 0.411133 0.417969 7 -96 ` 0.418945 0.420898 2 -97 a 0.421875 0.426758 5 -98 b 0.427734 0.432617 5 -99 c 0.433594 0.438477 5 -100 d 0.439453 0.444336 5 -101 e 0.445313 0.450195 5 -102 f 0.451172 0.455078 4 -103 g 0.456055 0.460938 5 -104 h 0.461914 0.466797 5 -105 i 0.467773 0.46875 1 -106 j 0.469727 0.472656 3 -107 k 0.473633 0.478516 5 -108 l 0.479492 0.480469 1 -109 m 0.481445 0.490234 9 -110 n 0.491211 0.496094 5 -111 o 0.49707 0.501953 5 -112 p 0.50293 0.507813 5 -113 q 0.508789 0.513672 5 -114 r 0.514648 0.517578 3 -115 s 0.518555 0.523438 5 -116 t 0.524414 0.527344 3 -117 u 0.52832 0.533203 5 -118 v 0.53418 0.539063 5 -119 w 0.540039 0.548828 9 -120 x 0.549805 0.554688 5 -121 y 0.555664 0.560547 5 -122 z 0.561523 0.566406 5 -123 { 0.567383 0.570313 3 -124 | 0.571289 0.572266 1 -125 } 0.573242 0.576172 3 -126 ~ 0.577148 0.583984 7 \ No newline at end of file diff --git a/WickedEngine.sln b/WickedEngine.sln index 2449f056e..c93b82ddc 100644 --- a/WickedEngine.sln +++ b/WickedEngine.sln @@ -15,6 +15,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor.vcx EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tests", "Tests\Tests.vcxproj", "{3A9EA3D0-A795-46ED-A737-7164E90DC309}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Template_Windows", "Template_Windows\Template_Windows.vcxproj", "{76AA3D37-3252-4785-9334-3FC6B8CC07DE}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution WickedEngine\WickedEngine_SHARED.vcxitems*{06163dcb-b183-4ed9-9c62-13ef1658e049}*SharedItemsImports = 4 @@ -84,6 +86,16 @@ Global {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Release|Win32.Build.0 = Release|Win32 {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Release|x64.ActiveCfg = Release|x64 {3A9EA3D0-A795-46ED-A737-7164E90DC309}.Release|x64.Build.0 = Release|x64 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|ARM.ActiveCfg = Debug|Win32 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|Win32.Build.0 = Debug|Win32 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|x64.ActiveCfg = Debug|x64 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Debug|x64.Build.0 = Debug|x64 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|ARM.ActiveCfg = Release|Win32 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|Win32.ActiveCfg = Release|Win32 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|Win32.Build.0 = Release|Win32 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|x64.ActiveCfg = Release|x64 + {76AA3D37-3252-4785-9334-3FC6B8CC07DE}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WickedEngine/MainComponent.h b/WickedEngine/MainComponent.h index ced094389..56affe87a 100644 --- a/WickedEngine/MainComponent.h +++ b/WickedEngine/MainComponent.h @@ -73,7 +73,7 @@ public: // text size int size; - InfoDisplayer() :active(false), watermark(true), fpsinfo(true), cpuinfo(true), + InfoDisplayer() :active(false), watermark(true), fpsinfo(false), cpuinfo(false), resolution(false), size(-1) {} }; diff --git a/WickedEngine/WickedEngine.h b/WickedEngine/WickedEngine.h index 03e216d35..288d1d10a 100644 --- a/WickedEngine/WickedEngine.h +++ b/WickedEngine/WickedEngine.h @@ -56,6 +56,7 @@ #include "wiArchive.h" #include "wiSpinLock.h" #include "wiRectPacker.h" +#include "wiProfiler.h" #include "RenderableComponent.h" #include "Renderable2DComponent.h" diff --git a/WickedEngine/wiFont.cpp b/WickedEngine/wiFont.cpp index 882a5e4fa..8cd6911aa 100644 --- a/WickedEngine/wiFont.cpp +++ b/WickedEngine/wiFont.cpp @@ -12,7 +12,7 @@ using namespace wiGraphicsTypes; #define WHITESPACE_SIZE 3 - +std::string wiFont::FONTPATH = "fonts/"; GPUBuffer *wiFont::vertexBuffer = nullptr, *wiFont::indexBuffer = nullptr; VertexLayout *wiFont::vertexLayout = nullptr; VertexShader *wiFont::vertexShader = nullptr; @@ -406,8 +406,8 @@ wiFont::wiFontStyle::wiFontStyle(const std::string& newName) ZeroMemory(lookup, sizeof(lookup)); std::stringstream ss(""),ss1(""); - ss<<"fonts/"<CreateQuery(&desc, &disjoint); - ENABLED = true; + ENABLED = false; } wiProfiler::~wiProfiler() { diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 20cffcf2a..fe8d31f26 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wiVersion // minor features, major updates const int minor = 13; // minor bug fixes, alterations, refactors, updates - const int revision = 20; + const int revision = 21; long GetVersion()