Advertisement
Guest User

Irrlicht GLFW3 patch - fixed

a guest
Jan 22nd, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 45.27 KB | None | 0 0
  1. diff -Naur irrlicht-code-5600-trunk/include/EDeviceTypes.h irrlicht-glfw/include/EDeviceTypes.h
  2. --- irrlicht-code-5600-trunk/include/EDeviceTypes.h 2012-10-01 01:38:54.000000000 +0200
  3. +++ irrlicht-glfw/include/EDeviceTypes.h    2018-01-22 05:08:52.000000000 +0100
  4. @@ -34,6 +34,11 @@
  5.         in by defining the IRR_USE_SDL_DEVICE macro in IrrCompileConfig.h */
  6.         EIDT_SDL,
  7.  
  8. +       //! A device which uses GLFW3
  9. +       /** The GLFW3 device works under all platforms supported by GLFW3 but first must be compiled
  10. +       in by defining the IRR_USE_GLFW3_DEVICE macro in IrrCompileConfig.h */
  11. +       EIDT_GLFW3,
  12. +
  13.         //! A device for raw framebuffer access
  14.         /** Best used with embedded devices and mobile systems.
  15.         Does not need X11 or other graphical subsystems.
  16. diff -Naur irrlicht-code-5600-trunk/include/IEventReceiver.h irrlicht-glfw/include/IEventReceiver.h
  17. --- irrlicht-code-5600-trunk/include/IEventReceiver.h   2017-11-17 16:16:43.000000000 +0100
  18. +++ irrlicht-glfw/include/IEventReceiver.h  2018-01-22 05:09:10.917939026 +0100
  19. @@ -40,7 +40,7 @@
  20.         They take the same path as mouse events.
  21.         Windows, SDL: Implemented.
  22.         Linux: Implemented, with POV hat issues.
  23. -       MacOS / Other: Not yet implemented.
  24. +       GLFW3, MacOS / Other: Not yet implemented.
  25.         */
  26.         EET_JOYSTICK_INPUT_EVENT,
  27.  
  28. diff -Naur irrlicht-code-5600-trunk/include/IrrCompileConfig.h irrlicht-glfw/include/IrrCompileConfig.h
  29. --- irrlicht-code-5600-trunk/include/IrrCompileConfig.h 2017-11-28 22:54:18.000000000 +0100
  30. +++ irrlicht-glfw/include/IrrCompileConfig.h    2018-01-22 05:18:32.000000000 +0100
  31. @@ -31,6 +31,7 @@
  32.  //! _IRR_COMPILE_WITH_OSX_DEVICE_ for Cocoa native windowing on OSX
  33.  //! _IRR_COMPILE_WITH_X11_DEVICE_ for Linux X11 based device
  34.  //! _IRR_COMPILE_WITH_SDL_DEVICE_ for platform independent SDL framework
  35. +//! _IRR_COMPILE_WITH_GLFW3_DEVICE_ for platform independent GLFW3 framework
  36.  //! _IRR_COMPILE_WITH_CONSOLE_DEVICE_ for no windowing system, used as a fallback
  37.  //! _IRR_COMPILE_WITH_FB_DEVICE_ for framebuffer systems
  38.  
  39. @@ -47,6 +48,12 @@
  40.  #undef _IRR_COMPILE_WITH_SDL_DEVICE_
  41.  #endif
  42.  
  43. +//! Uncomment this line to compile with the GLFW3 device
  44. +#define _IRR_COMPILE_WITH_GLFW3_DEVICE_
  45. +#ifdef NO_IRR_COMPILE_WITH_GLFW3_DEVICE_
  46. +#undef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  47. +#endif
  48. +
  49.  //! Comment this line to compile without the fallback console device.
  50.  #define _IRR_COMPILE_WITH_CONSOLE_DEVICE_
  51.  #ifdef NO_IRR_COMPILE_WITH_CONSOLE_DEVICE_
  52. diff -Naur irrlicht-code-5600-trunk/include/SIrrCreationParameters.h irrlicht-glfw/include/SIrrCreationParameters.h
  53. --- irrlicht-code-5600-trunk/include/SIrrCreationParameters.h   2016-08-13 14:50:06.000000000 +0200
  54. +++ irrlicht-glfw/include/SIrrCreationParameters.h  2018-01-22 05:13:02.000000000 +0100
  55. @@ -90,6 +90,7 @@
  56.         EIDT_COCOA is only available on Mac OSX,
  57.         EIDT_X11 is available on Linux, Solaris, BSD and other operating systems which use X11,
  58.         EIDT_SDL is available on most systems if compiled in,
  59. +       EIDT_GLFW3 is available on most systems if compiled in,
  60.         EIDT_CONSOLE is usually available but can only render to text,
  61.         EIDT_BEST will select the best available device for your operating system.
  62.         Default: EIDT_BEST. */
  63. diff -Naur irrlicht-code-5600-trunk/source/Irrlicht/CIrrDeviceGLFW3.cpp irrlicht-glfw/source/Irrlicht/CIrrDeviceGLFW3.cpp
  64. --- irrlicht-code-5600-trunk/source/Irrlicht/CIrrDeviceGLFW3.cpp    1970-01-01 01:00:00.000000000 +0100
  65. +++ irrlicht-glfw/source/Irrlicht/CIrrDeviceGLFW3.cpp   2018-01-22 20:40:34.453904562 +0100
  66. @@ -0,0 +1,785 @@
  67. +// Copyright (C) 2002-2012 Nikolaus Gebhardt
  68. +// This file is part of the "Irrlicht Engine".
  69. +// For conditions of distribution and use, see copyright notice in irrlicht.h
  70. +
  71. +#include "IrrCompileConfig.h"
  72. +
  73. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  74. +
  75. +#include "CIrrDeviceGLFW3.h"
  76. +#include "IEventReceiver.h"
  77. +#include "irrList.h"
  78. +#include "os.h"
  79. +#include "CTimer.h"
  80. +#include "irrString.h"
  81. +#include "Keycodes.h"
  82. +#include "COSOperator.h"
  83. +#include <stdio.h>
  84. +#include <stdlib.h>
  85. +#include <iostream>
  86. +#include "SIrrCreationParameters.h"
  87. +
  88. +static int GLFW3DeviceInstances = 0;
  89. +
  90. +namespace irr
  91. +{
  92. +   namespace video
  93. +   {
  94. +       #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
  95. +       IVideoDriver* createDirectX9Driver(const irr::SIrrlichtCreationParameters& params,
  96. +           io::IFileSystem* io, HWND window);
  97. +       #endif
  98. +
  99. +       #ifdef _IRR_COMPILE_WITH_OPENGL_
  100. +       IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
  101. +               io::IFileSystem* io, CIrrDeviceGLFW3* device);
  102. +       #endif
  103. +   } // end namespace video
  104. +
  105. +} // end namespace irr
  106. +
  107. +
  108. +namespace irr
  109. +{
  110. +
  111. +//! constructor
  112. +CIrrDeviceGLFW3::CIrrDeviceGLFW3(const SIrrlichtCreationParameters& param)
  113. +   : CIrrDeviceStub(param),
  114. +   window((GLFWwindow*)param.WindowId),
  115. +   MouseX(0), MouseY(0), MouseButtonStates(0),
  116. +   Width(param.WindowSize.Width), Height(param.WindowSize.Height),
  117. +   Resizable(false), WindowHasFocus(false), WindowMinimized(false)
  118. +{
  119. +   #ifdef _DEBUG
  120. +   setDebugName("CIrrDeviceGLFW3");
  121. +   #endif
  122. +
  123. +   if ( ++GLFW3DeviceInstances == 1 )
  124. +   {
  125. +       if (glfwInit() == GLFW_FALSE){
  126. +           os::Printer::log("Unable to initialize GLFW3!");
  127. +           Close = true;
  128. +       }
  129. +
  130. +       glfwSetTime(0);
  131. +
  132. +       //glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
  133. +       //glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
  134. +
  135. +       //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
  136. +       //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
  137. +   }
  138. +
  139. +   int major, minor, rev;
  140. +   glfwGetVersion(&major,&minor,&rev);
  141. +
  142. +   core::stringc GLFW3version = "GLFW3 Version ";
  143. +   GLFW3version += major;
  144. +   GLFW3version += ".";
  145. +   GLFW3version += minor;
  146. +   GLFW3version += ".";
  147. +   GLFW3version += rev;
  148. +
  149. +   Operator = new COSOperator(GLFW3version);
  150. +   if ( GLFW3DeviceInstances == 1 )
  151. +   {
  152. +       os::Printer::log(GLFW3version.c_str(), ELL_INFORMATION);
  153. +   }
  154. +
  155. +   // create keymap
  156. +   createKeyMap();
  157. +
  158. +   // enable key to character translation (UNICODE)
  159. +   // typedef void(*   GLFWcharfun) (GLFWwindow *, unsigned int)
  160. +
  161. +   if ( CreationParams.Fullscreen ) {
  162. +       // Fullscreen ( http://www.glfw.org/docs/latest/window_guide.html#window_full_screen )
  163. +   }
  164. +
  165. +   // create window
  166. +   if (CreationParams.DriverType == video::EDT_OPENGL)
  167. +   {
  168. +       // create the window, only if we do not use the null device
  169. +       createWindow();
  170. +   }
  171. +   else
  172. +   {
  173. +       os::Printer::log("GLFW3 only works with OpenGL!");
  174. +       Close = true;
  175. +   }
  176. +
  177. +   // create cursor control
  178. +   CursorControl = new CCursorControl(this);
  179. +
  180. +   // create driver
  181. +   createDriver();
  182. +
  183. +   if (VideoDriver)
  184. +       createGUIAndScene();
  185. +}
  186. +
  187. +
  188. +//! destructor
  189. +CIrrDeviceGLFW3::~CIrrDeviceGLFW3()
  190. +{
  191. +   if ( --GLFW3DeviceInstances == 0 )
  192. +   {
  193. +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
  194. +   //ToDo
  195. +#endif
  196. +       glfwTerminate();
  197. +
  198. +       os::Printer::log("Quit GLFW3", ELL_INFORMATION);
  199. +   }
  200. +}
  201. +
  202. +
  203. +bool CIrrDeviceGLFW3::createWindow()
  204. +{
  205. +   if ( Close )
  206. +       return false;
  207. +
  208. +   if (CreationParams.DriverType == video::EDT_OPENGL)
  209. +   {
  210. +       if (CreationParams.Bits==16)
  211. +       {
  212. +           glfwWindowHint(GLFW_RED_BITS, 4);
  213. +           glfwWindowHint(GLFW_GREEN_BITS, 4);
  214. +           glfwWindowHint(GLFW_BLUE_BITS, 4);
  215. +           glfwWindowHint(GLFW_ALPHA_BITS, CreationParams.WithAlphaChannel?1:0);
  216. +       }
  217. +       else
  218. +       {
  219. +           glfwWindowHint(GLFW_RED_BITS, 8);
  220. +           glfwWindowHint(GLFW_GREEN_BITS, 8);
  221. +           glfwWindowHint(GLFW_BLUE_BITS, 8);
  222. +           glfwWindowHint(GLFW_ALPHA_BITS, CreationParams.WithAlphaChannel?8:0);
  223. +       }
  224. +
  225. +       glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
  226. +       glfwWindowHint(GLFW_STENCIL_BITS, CreationParams.Stencilbuffer?8:0);
  227. +       glfwWindowHint(GLFW_DEPTH_BITS, CreationParams.ZBufferBits?CreationParams.ZBufferBits:24);
  228. +
  229. +       if (CreationParams.Doublebuffer)
  230. +           glfwWindowHint(GLFW_DOUBLEBUFFER, GLFW_TRUE);
  231. +
  232. +       if (CreationParams.Stereobuffer)
  233. +           glfwWindowHint(GLFW_STEREO, GLFW_TRUE);
  234. +
  235. +       if (CreationParams.AntiAlias>1)
  236. +           glfwWindowHint(GLFW_SAMPLES, CreationParams.AntiAlias);
  237. +       else
  238. +           glfwWindowHint(GLFW_SAMPLES, GLFW_DONT_CARE);
  239. +
  240. +       if (window == nullptr && CreationParams.AntiAlias>1)
  241. +       {
  242. +           while (--CreationParams.AntiAlias>1)
  243. +           {
  244. +               glfwWindowHint(GLFW_SAMPLES, CreationParams.AntiAlias);
  245. +               window = glfwCreateWindow(Width, Height, "Irrlicht GLFW3 window", nullptr, nullptr);
  246. +               if (window)
  247. +                   break;
  248. +           }
  249. +           if (window == nullptr)
  250. +           {
  251. +               glfwWindowHint(GLFW_SAMPLES, GLFW_DONT_CARE);
  252. +               window = glfwCreateWindow(Width, Height, "Irrlicht GLFW3 window", nullptr, nullptr);
  253. +               if (window)
  254. +                   os::Printer::log("AntiAliasing disabled due to lack of support!" );
  255. +           }
  256. +       }
  257. +       else if (window == nullptr && CreationParams.AntiAlias <= 1)
  258. +       {
  259. +           window = glfwCreateWindow(Width, Height, "Irrlicht GLFW3 window", nullptr, nullptr);
  260. +       }
  261. +
  262. +       if (window == nullptr) {
  263. +           os::Printer::log("Unable to initialize GLFW3 window!");
  264. +           glfwTerminate();
  265. +           return false;
  266. +       } else {
  267. +           glfwMakeContextCurrent(window);
  268. +
  269. +           glClearColor(0.2f, 0.25f, 0.3f, 1.0f);
  270. +           glClear(GL_COLOR_BUFFER_BIT);
  271. +
  272. +           int width, height;
  273. +           glfwGetFramebufferSize(window, &width, &height);
  274. +           glViewport(0, 0, width, height);
  275. +           glfwSwapInterval(0);
  276. +           glfwSwapBuffers(window);
  277. +
  278. +           if (!CreationParams.IgnoreInput){
  279. +               glfwSetWindowUserPointer(window, this);
  280. +
  281. +               glfwSetCursorPosCallback(window,
  282. +                       [](GLFWwindow *w, double x, double y) {
  283. +
  284. +                       CIrrDeviceGLFW3 *obj = (CIrrDeviceGLFW3*)glfwGetWindowUserPointer(w);
  285. +
  286. +                       obj->irrevent.EventType = irr::EET_MOUSE_INPUT_EVENT;
  287. +                       obj->irrevent.MouseInput.Event = irr::EMIE_MOUSE_MOVED;
  288. +                       obj->MouseX = obj->irrevent.MouseInput.X = x;
  289. +                       obj->MouseY = obj->irrevent.MouseInput.Y = y;
  290. +                       obj->irrevent.MouseInput.ButtonStates = obj->MouseButtonStates;
  291. +
  292. +                       obj->postEventFromUser(obj->irrevent);
  293. +                   }
  294. +               );
  295. +
  296. +               glfwSetMouseButtonCallback(window,
  297. +                   [](GLFWwindow *w, int button, int action, int modifiers) {
  298. +
  299. +                       CIrrDeviceGLFW3 *obj = (CIrrDeviceGLFW3*)glfwGetWindowUserPointer(w);
  300. +
  301. +                       if (action == GLFW_PRESS){
  302. +                           switch(button){
  303. +                               case GLFW_MOUSE_BUTTON_LEFT:
  304. +                                   obj->irrevent.MouseInput.Event = irr::EMIE_LMOUSE_PRESSED_DOWN;
  305. +                                   obj->MouseButtonStates |= irr::EMBSM_LEFT;
  306. +                               break;
  307. +                               case GLFW_MOUSE_BUTTON_RIGHT:
  308. +                                   obj->irrevent.MouseInput.Event = irr::EMIE_RMOUSE_PRESSED_DOWN;
  309. +                                   obj->MouseButtonStates |= irr::EMBSM_RIGHT;
  310. +                               break;
  311. +                               case GLFW_MOUSE_BUTTON_MIDDLE:
  312. +                                   obj->irrevent.MouseInput.Event = irr::EMIE_MMOUSE_PRESSED_DOWN;
  313. +                                   obj->MouseButtonStates |= irr::EMBSM_MIDDLE;
  314. +                               break;
  315. +                           }
  316. +                       } else if (action == GLFW_RELEASE){
  317. +                           switch(button){
  318. +                               case GLFW_MOUSE_BUTTON_LEFT:
  319. +                                   obj->irrevent.MouseInput.Event = irr::EMIE_LMOUSE_LEFT_UP;
  320. +                                   obj->MouseButtonStates &= !irr::EMBSM_LEFT;
  321. +                               break;
  322. +                               case GLFW_MOUSE_BUTTON_RIGHT:
  323. +                                   obj->irrevent.MouseInput.Event = irr::EMIE_RMOUSE_LEFT_UP;
  324. +                                   obj->MouseButtonStates &= !irr::EMBSM_RIGHT;
  325. +                               break;
  326. +                               case GLFW_MOUSE_BUTTON_MIDDLE:
  327. +                                   obj->irrevent.MouseInput.Event = irr::EMIE_MMOUSE_LEFT_UP;
  328. +                                   obj->MouseButtonStates &= !irr::EMBSM_MIDDLE;
  329. +                               break;
  330. +                           }
  331. +                       }
  332. +
  333. +                       obj->irrevent.MouseInput.ButtonStates = obj->MouseButtonStates;
  334. +
  335. +                       if (obj->irrevent.MouseInput.Event != irr::EMIE_MOUSE_MOVED)
  336. +                       {
  337. +                           obj->postEventFromUser(obj->irrevent);
  338. +
  339. +                           if ( obj->irrevent.MouseInput.Event >= EMIE_LMOUSE_PRESSED_DOWN && obj->irrevent.MouseInput.Event <= EMIE_MMOUSE_PRESSED_DOWN )
  340. +                           {
  341. +                               u32 clicks = obj->checkSuccessiveClicks(obj->irrevent.MouseInput.X, obj->irrevent.MouseInput.Y, obj->irrevent.MouseInput.Event);
  342. +                               if ( clicks == 2 )
  343. +                               {
  344. +                                   obj->irrevent.MouseInput.Event = (EMOUSE_INPUT_EVENT)(EMIE_LMOUSE_DOUBLE_CLICK + obj->irrevent.MouseInput.Event-EMIE_LMOUSE_PRESSED_DOWN);
  345. +                                   obj->postEventFromUser(obj->irrevent);
  346. +                               }
  347. +                               else if ( clicks == 3 )
  348. +                               {
  349. +                                   obj->irrevent.MouseInput.Event = (EMOUSE_INPUT_EVENT)(EMIE_LMOUSE_TRIPLE_CLICK + obj->irrevent.MouseInput.Event-EMIE_LMOUSE_PRESSED_DOWN);
  350. +                                   obj->postEventFromUser(obj->irrevent);
  351. +                               }
  352. +                           }
  353. +                       }
  354. +                   }
  355. +               );
  356. +
  357. +               glfwSetScrollCallback(window,
  358. +                   [](GLFWwindow *w, double x, double y) {
  359. +                       CIrrDeviceGLFW3 *obj = (CIrrDeviceGLFW3*)glfwGetWindowUserPointer(w);
  360. +                       if (y < 0){
  361. +                           obj->irrevent.MouseInput.Event = irr::EMIE_MOUSE_WHEEL;
  362. +                           obj->irrevent.MouseInput.Wheel = 1.0f;
  363. +                       }
  364. +                       else
  365. +                       {
  366. +                           obj->irrevent.MouseInput.Event = irr::EMIE_MOUSE_WHEEL;
  367. +                           obj->irrevent.MouseInput.Wheel = -1.0f;
  368. +                       }
  369. +               }
  370. +               );
  371. +
  372. +               glfwSetCharModsCallback(window,
  373. +                   [](GLFWwindow *w, unsigned int codepoint, int mods) {
  374. +                       CIrrDeviceGLFW3 *obj = (CIrrDeviceGLFW3*)glfwGetWindowUserPointer(w);
  375. +                       SKeyMap mp;
  376. +                       mp.GLFW3Key = codepoint;
  377. +                       s32 idx = obj->KeyMap.binary_search(mp);
  378. +
  379. +                       EKEY_CODE key;
  380. +                       if (idx == -1)
  381. +                           key = (EKEY_CODE)0;
  382. +                       else
  383. +                           key = (EKEY_CODE)obj->KeyMap[idx].Win32Key;
  384. +
  385. +                       obj->irrevent.EventType = irr::EET_KEY_INPUT_EVENT;
  386. +                       obj->irrevent.KeyInput.Char = codepoint;
  387. +                       obj->irrevent.KeyInput.Key = key;
  388. +                       obj->irrevent.KeyInput.PressedDown = true;
  389. +                       obj->irrevent.KeyInput.Shift = (mods == GLFW_MOD_SHIFT);
  390. +                       obj->irrevent.KeyInput.Control = (mods == GLFW_MOD_CONTROL);
  391. +                       obj->postEventFromUser(obj->irrevent);
  392. +                   }
  393. +               );
  394. +
  395. +               glfwSetWindowFocusCallback(window,
  396. +                   [](GLFWwindow *w, int focused) {
  397. +                       CIrrDeviceGLFW3 *obj = (CIrrDeviceGLFW3*)glfwGetWindowUserPointer(w);
  398. +                       obj->WindowHasFocus = (focused == GLFW_TRUE);
  399. +                   }
  400. +               );
  401. +
  402. +               glfwSetWindowIconifyCallback(window,
  403. +                   [](GLFWwindow *w, int iconified) {
  404. +                       CIrrDeviceGLFW3 *obj = (CIrrDeviceGLFW3*)glfwGetWindowUserPointer(w);
  405. +                       obj->WindowMinimized = (iconified == GLFW_TRUE);
  406. +                   }
  407. +               );
  408. +
  409. +               glfwSetWindowSizeCallback(window,
  410. +                   [](GLFWwindow *win, int w, int h) {
  411. +                       CIrrDeviceGLFW3 *obj = (CIrrDeviceGLFW3*)glfwGetWindowUserPointer(win);
  412. +                       if ((w != (int)obj->Width) || (h != (int)obj->Height))
  413. +                       {
  414. +                           obj->Width = w;
  415. +                           obj->Height = h;
  416. +                           if (obj->VideoDriver)
  417. +                               obj->VideoDriver->OnResize(core::dimension2d<u32>(obj->Width, obj->Height));
  418. +                       }
  419. +                   }
  420. +               );
  421. +
  422. +               glfwSetWindowCloseCallback(window,
  423. +                   [](GLFWwindow *w) {
  424. +                       CIrrDeviceGLFW3 *obj = (CIrrDeviceGLFW3*)glfwGetWindowUserPointer(w);
  425. +                       obj->Close = true;
  426. +                   }
  427. +               );
  428. +
  429. +               #if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
  430. +                   //ToDo: joystick
  431. +               #endif
  432. +           }
  433. +              
  434. +           return true;
  435. +       }
  436. +   } else {
  437. +       os::Printer::log("Only OpenGL is supported!");
  438. +       return false;
  439. +   }
  440. +}
  441. +
  442. +
  443. +//! create the driver
  444. +void CIrrDeviceGLFW3::createDriver()
  445. +{
  446. +   switch(CreationParams.DriverType)
  447. +   {
  448. +   case video::DEPRECATED_EDT_DIRECT3D8_NO_LONGER_EXISTS:
  449. +       os::Printer::log("DIRECT3D8 Driver is no longer supported in Irrlicht. Try another one.", ELL_ERROR);
  450. +       break;
  451. +
  452. +   case video::EDT_DIRECT3D9:
  453. +       #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
  454. +       os::Printer::log("Only OpenGL is supported!");
  455. +       #else
  456. +       os::Printer::log("DIRECT3D9 Driver was not compiled into this dll. Try another one.", ELL_ERROR);
  457. +       #endif // _IRR_COMPILE_WITH_DIRECT3D_9_
  458. +
  459. +       break;
  460. +
  461. +   case video::EDT_SOFTWARE:
  462. +       #ifdef _IRR_COMPILE_WITH_SOFTWARE_
  463. +       os::Printer::log("Only OpenGL is supported!");
  464. +       #else
  465. +       os::Printer::log("No Software driver support compiled in.", ELL_ERROR);
  466. +       #endif
  467. +       break;
  468. +
  469. +   case video::EDT_BURNINGSVIDEO:
  470. +       #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
  471. +       os::Printer::log("Only OpenGL is supported!");
  472. +       #else
  473. +       os::Printer::log("Burning's video driver was not compiled in.", ELL_ERROR);
  474. +       #endif
  475. +       break;
  476. +
  477. +   case video::EDT_OPENGL:
  478. +       #ifdef _IRR_COMPILE_WITH_OPENGL_
  479. +       VideoDriver = video::createOpenGLDriver(CreationParams, FileSystem, this);
  480. +       #else
  481. +       os::Printer::log("No OpenGL support compiled in.", ELL_ERROR);
  482. +       #endif
  483. +       break;
  484. +
  485. +   case video::EDT_NULL:
  486. +       VideoDriver = video::createNullDriver(FileSystem, CreationParams.WindowSize);
  487. +       break;
  488. +
  489. +   default:
  490. +       os::Printer::log("Unable to create video driver of unknown type.", ELL_ERROR);
  491. +       break;
  492. +   }
  493. +}
  494. +
  495. +
  496. +//! runs the device. Returns false if device wants to be deleted
  497. +bool CIrrDeviceGLFW3::run()
  498. +{
  499. +   os::Timer::tick();
  500. +
  501. +   glfwPollEvents();
  502. +
  503. +   /*
  504. +       irrevent.EventType = irr::EET_USER_EVENT;
  505. +       irrevent.UserEvent.UserData1 = reinterpret_cast<uintptr_t>(SDL_event.user.data1);
  506. +       irrevent.UserEvent.UserData2 = reinterpret_cast<uintptr_t>(SDL_event.user.data2);
  507. +
  508. +       postEventFromUser(irrevent);
  509. +   */
  510. +
  511. +   return !Close;
  512. +}
  513. +
  514. +//! Activate any joysticks, and generate events for them.
  515. +bool CIrrDeviceGLFW3::activateJoysticks(core::array<SJoystickInfo> & joystickInfo)
  516. +{
  517. +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
  518. +   return true;
  519. +#endif // _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
  520. +   return false;
  521. +}
  522. +
  523. +
  524. +
  525. +//! pause execution temporarily
  526. +void CIrrDeviceGLFW3::yield()
  527. +{
  528. +   glfwWaitEventsTimeout(0.1);
  529. +}
  530. +
  531. +
  532. +//! pause execution for a specified time
  533. +void CIrrDeviceGLFW3::sleep(u32 timeMs, bool pauseTimer)
  534. +{
  535. +   const bool wasStopped = Timer ? Timer->isStopped() : true;
  536. +   if (pauseTimer && !wasStopped)
  537. +       Timer->stop();
  538. +
  539. +   glfwWaitEventsTimeout(timeMs/1000);
  540. +
  541. +   if (pauseTimer && !wasStopped)
  542. +       Timer->start();
  543. +}
  544. +
  545. +
  546. +//! sets the caption of the window
  547. +void CIrrDeviceGLFW3::setWindowCaption(const wchar_t* text)
  548. +{
  549. +   core::stringc textc = text;
  550. +   glfwSetWindowTitle(window, textc.c_str( ));
  551. +}
  552. +
  553. +
  554. +//! presents a surface in the client area
  555. +bool CIrrDeviceGLFW3::present(video::IImage* surface, void* windowId, core::rect<s32>* srcClip)
  556. +{
  557. +   GLFWwindow *w = (GLFWwindow*)windowId;
  558. +
  559. +   if (!w) w = window;
  560. +
  561. +   glfwSwapBuffers(w);
  562. +
  563. +   std::cout << "Aqui estoy" << std::endl;
  564. +
  565. +   return true;
  566. +}
  567. +
  568. +
  569. +//! notifies the device that it should close itself
  570. +void CIrrDeviceGLFW3::closeDevice()
  571. +{
  572. +   Close = true;
  573. +}
  574. +
  575. +
  576. +//! \return Pointer to a list with all video modes supported
  577. +video::IVideoModeList* CIrrDeviceGLFW3::getVideoModeList()
  578. +{
  579. +   if (!VideoModeList->getVideoModeCount())
  580. +   {
  581. +       int count;
  582. +       const GLFWvidmode* modes = glfwGetVideoModes(glfwGetPrimaryMonitor(), &count);
  583. +
  584. +       for (int i=0; i<count; i++){
  585. +           VideoModeList->addMode(core::dimension2d<u32>(modes[i].width, modes[i].height), modes[i].redBits+modes[i].blueBits+modes[i].greenBits);
  586. +
  587. +       }
  588. +   }
  589. +
  590. +   return VideoModeList;
  591. +}
  592. +
  593. +
  594. +//! Sets if the window should be resizable in windowed mode.
  595. +void CIrrDeviceGLFW3::setResizable(bool resize)
  596. +{
  597. +   if (resize != Resizable)
  598. +   {
  599. +       if (resize)
  600. +           glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
  601. +       else
  602. +           glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
  603. +       //Screen = SDL_SetVideoMode( 0, 0, 0, SDL_Flags );
  604. +       Resizable = resize;
  605. +   }
  606. +}
  607. +
  608. +
  609. +//! Minimizes window if possible
  610. +void CIrrDeviceGLFW3::minimizeWindow()
  611. +{
  612. +   glfwIconifyWindow(window);
  613. +}
  614. +
  615. +
  616. +//! Maximize window
  617. +void CIrrDeviceGLFW3::maximizeWindow()
  618. +{
  619. +   glfwMaximizeWindow(window);
  620. +}
  621. +
  622. +//! Get the position of this window on screen
  623. +core::position2di CIrrDeviceGLFW3::getWindowPosition()
  624. +{
  625. +   int x, y;
  626. +   glfwGetWindowPos (window, &x, &y);
  627. +    return core::position2di(x, y);
  628. +}
  629. +
  630. +
  631. +//! Restore original window size
  632. +void CIrrDeviceGLFW3::restoreWindow()
  633. +{
  634. +   glfwRestoreWindow(window);
  635. +}
  636. +
  637. +
  638. +//! returns if window is active. if not, nothing need to be drawn
  639. +bool CIrrDeviceGLFW3::isWindowActive() const
  640. +{
  641. +   return (WindowHasFocus && !WindowMinimized);
  642. +}
  643. +
  644. +
  645. +//! returns if window has focus.
  646. +bool CIrrDeviceGLFW3::isWindowFocused() const
  647. +{
  648. +   return WindowHasFocus;
  649. +}
  650. +
  651. +
  652. +//! returns if window is minimized.
  653. +bool CIrrDeviceGLFW3::isWindowMinimized() const
  654. +{
  655. +   return WindowMinimized;
  656. +}
  657. +
  658. +
  659. +//! Set the current Gamma Value for the Display
  660. +bool CIrrDeviceGLFW3::setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast )
  661. +{
  662. +   //glfwSetGammaRamp (glfwGetPrimaryMonitor(), new GLFWgammaramp(red, green, blue, ¿?));
  663. +   return false;
  664. +}
  665. +
  666. +//! Get the current Gamma Value for the Display
  667. +bool CIrrDeviceGLFW3::getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast )
  668. +{
  669. +/* GLFWgammaramp *ramp = glfwGetGammaRamp(glfwGetPrimaryMonitor());
  670. +   brightness = 0.f;
  671. +   contrast = 0.f;
  672. +   return (SDL_GetGamma(&ramp.red, &ramp.green, &ramp.blue) != -1);*/
  673. +   return false;
  674. +}
  675. +
  676. +//! returns color format of the window.
  677. +video::ECOLOR_FORMAT CIrrDeviceGLFW3::getColorFormat() const
  678. +{
  679. +   if (window)
  680. +   {
  681. +       const GLFWvidmode* mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
  682. +       if ((mode->redBits+mode->blueBits+mode->greenBits)==16)
  683. +       {
  684. +               return video::ECF_R5G6B5;
  685. +       }
  686. +       else
  687. +       {
  688. +               return video::ECF_R8G8B8;
  689. +       }
  690. +   }
  691. +   else
  692. +       return CIrrDeviceStub::getColorFormat();
  693. +}
  694. +
  695. +
  696. +void CIrrDeviceGLFW3::createKeyMap()
  697. +{
  698. +   // I don't know if this is the best method  to create
  699. +   // the lookuptable, but I'll leave it like that until
  700. +   // I find a better version.
  701. +
  702. +   KeyMap.reallocate(105);
  703. +
  704. +   // buttons missing
  705. +
  706. +   KeyMap.push_back(SKeyMap(GLFW_KEY_BACKSPACE, KEY_BACK));
  707. +   KeyMap.push_back(SKeyMap(GLFW_KEY_TAB , KEY_TAB));
  708. +   //KeyMap.push_back(SKeyMap(SDLK_CLEAR, KEY_CLEAR));
  709. +   KeyMap.push_back(SKeyMap(GLFW_KEY_ENTER, KEY_RETURN));
  710. +
  711. +   // combined modifiers missing
  712. +
  713. +   KeyMap.push_back(SKeyMap(GLFW_KEY_PAUSE, KEY_PAUSE));
  714. +   KeyMap.push_back(SKeyMap(GLFW_KEY_CAPS_LOCK, KEY_CAPITAL));
  715. +
  716. +   // asian letter keys missing
  717. +
  718. +   KeyMap.push_back(SKeyMap(GLFW_KEY_ESCAPE , KEY_ESCAPE));
  719. +
  720. +   // asian letter keys missing
  721. +
  722. +   KeyMap.push_back(SKeyMap(GLFW_KEY_SPACE, KEY_SPACE));
  723. +   KeyMap.push_back(SKeyMap(GLFW_KEY_PAGE_UP, KEY_PRIOR));
  724. +   KeyMap.push_back(SKeyMap(GLFW_KEY_PAGE_DOWN, KEY_NEXT));
  725. +   KeyMap.push_back(SKeyMap(GLFW_KEY_END , KEY_END));
  726. +   KeyMap.push_back(SKeyMap(GLFW_KEY_HOME , KEY_HOME));
  727. +
  728. +   KeyMap.push_back(SKeyMap(GLFW_KEY_LEFT , KEY_LEFT));
  729. +   KeyMap.push_back(SKeyMap(GLFW_KEY_UP, KEY_UP));
  730. +   KeyMap.push_back(SKeyMap(GLFW_KEY_RIGHT, KEY_RIGHT));
  731. +   KeyMap.push_back(SKeyMap(GLFW_KEY_DOWN, KEY_DOWN));
  732. +
  733. +   // select missing
  734. +
  735. +   //KeyMap.push_back(SKeyMap(SDLK_PRINT, KEY_PRINT));
  736. +
  737. +   // execute missing
  738. +
  739. +   KeyMap.push_back(SKeyMap(GLFW_KEY_PRINT_SCREEN, KEY_SNAPSHOT));
  740. +
  741. +   KeyMap.push_back(SKeyMap(GLFW_KEY_INSERT, KEY_INSERT));
  742. +   KeyMap.push_back(SKeyMap(GLFW_KEY_DELETE , KEY_DELETE));
  743. +   //KeyMap.push_back(SKeyMap(SDLK_HELP, KEY_HELP));
  744. +
  745. +   KeyMap.push_back(SKeyMap(GLFW_KEY_0, KEY_KEY_0));
  746. +   KeyMap.push_back(SKeyMap(GLFW_KEY_1, KEY_KEY_1));
  747. +   KeyMap.push_back(SKeyMap(GLFW_KEY_2, KEY_KEY_2));
  748. +   KeyMap.push_back(SKeyMap(GLFW_KEY_3, KEY_KEY_3));
  749. +   KeyMap.push_back(SKeyMap(GLFW_KEY_4, KEY_KEY_4));
  750. +   KeyMap.push_back(SKeyMap(GLFW_KEY_5, KEY_KEY_5));
  751. +   KeyMap.push_back(SKeyMap(GLFW_KEY_6, KEY_KEY_6));
  752. +   KeyMap.push_back(SKeyMap(GLFW_KEY_7, KEY_KEY_7));
  753. +   KeyMap.push_back(SKeyMap(GLFW_KEY_8, KEY_KEY_8));
  754. +   KeyMap.push_back(SKeyMap(GLFW_KEY_9, KEY_KEY_9));
  755. +
  756. +   KeyMap.push_back(SKeyMap(GLFW_KEY_A, KEY_KEY_A));
  757. +   KeyMap.push_back(SKeyMap(GLFW_KEY_B, KEY_KEY_B));
  758. +   KeyMap.push_back(SKeyMap(GLFW_KEY_C, KEY_KEY_C));
  759. +   KeyMap.push_back(SKeyMap(GLFW_KEY_D, KEY_KEY_D));
  760. +   KeyMap.push_back(SKeyMap(GLFW_KEY_E, KEY_KEY_E));
  761. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F, KEY_KEY_F));
  762. +   KeyMap.push_back(SKeyMap(GLFW_KEY_G, KEY_KEY_G));
  763. +   KeyMap.push_back(SKeyMap(GLFW_KEY_H, KEY_KEY_H));
  764. +   KeyMap.push_back(SKeyMap(GLFW_KEY_I, KEY_KEY_I));
  765. +   KeyMap.push_back(SKeyMap(GLFW_KEY_J, KEY_KEY_J));
  766. +   KeyMap.push_back(SKeyMap(GLFW_KEY_K, KEY_KEY_K));
  767. +   KeyMap.push_back(SKeyMap(GLFW_KEY_L, KEY_KEY_L));
  768. +   KeyMap.push_back(SKeyMap(GLFW_KEY_M, KEY_KEY_M));
  769. +   KeyMap.push_back(SKeyMap(GLFW_KEY_N, KEY_KEY_N));
  770. +   KeyMap.push_back(SKeyMap(GLFW_KEY_O, KEY_KEY_O));
  771. +   KeyMap.push_back(SKeyMap(GLFW_KEY_P, KEY_KEY_P));
  772. +   KeyMap.push_back(SKeyMap(GLFW_KEY_Q, KEY_KEY_Q));
  773. +   KeyMap.push_back(SKeyMap(GLFW_KEY_R, KEY_KEY_R));
  774. +   KeyMap.push_back(SKeyMap(GLFW_KEY_S, KEY_KEY_S));
  775. +   KeyMap.push_back(SKeyMap(GLFW_KEY_T, KEY_KEY_T));
  776. +   KeyMap.push_back(SKeyMap(GLFW_KEY_U, KEY_KEY_U));
  777. +   KeyMap.push_back(SKeyMap(GLFW_KEY_V, KEY_KEY_V));
  778. +   KeyMap.push_back(SKeyMap(GLFW_KEY_W, KEY_KEY_W));
  779. +   KeyMap.push_back(SKeyMap(GLFW_KEY_X, KEY_KEY_X));
  780. +   KeyMap.push_back(SKeyMap(GLFW_KEY_Y, KEY_KEY_Y));
  781. +   KeyMap.push_back(SKeyMap(GLFW_KEY_Z, KEY_KEY_Z));
  782. +
  783. +   KeyMap.push_back(SKeyMap(GLFW_KEY_LEFT_SUPER , KEY_LWIN));
  784. +   KeyMap.push_back(SKeyMap(GLFW_KEY_RIGHT_SUPER , KEY_RWIN));
  785. +
  786. +   // apps missing
  787. +
  788. +   KeyMap.push_back(SKeyMap(GLFW_KEY_MENU , KEY_SLEEP)); //??
  789. +
  790. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_0, KEY_NUMPAD0));
  791. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_1, KEY_NUMPAD1));
  792. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_2, KEY_NUMPAD2));
  793. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_3, KEY_NUMPAD3));
  794. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_4, KEY_NUMPAD4));
  795. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_5, KEY_NUMPAD5));
  796. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_6, KEY_NUMPAD6));
  797. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_7, KEY_NUMPAD7));
  798. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_8, KEY_NUMPAD8));
  799. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_9, KEY_NUMPAD9));
  800. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_MULTIPLY, KEY_MULTIPLY));
  801. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_ADD, KEY_ADD));
  802. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_SUBTRACT, KEY_SUBTRACT));
  803. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_DECIMAL, KEY_DECIMAL));
  804. +   KeyMap.push_back(SKeyMap(GLFW_KEY_KP_DIVIDE , KEY_DIVIDE));
  805. +// KeyMap.push_back(SKeyMap(SDLK_KP_, KEY_SEPARATOR));
  806. +
  807. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F1 ,  KEY_F1));
  808. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F2 ,  KEY_F2));
  809. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F3 ,  KEY_F3));
  810. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F4 ,  KEY_F4));
  811. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F5 ,  KEY_F5));
  812. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F6 ,  KEY_F6));
  813. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F7 ,  KEY_F7));
  814. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F8 ,  KEY_F8));
  815. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F9 ,  KEY_F9));
  816. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F10 , KEY_F10));
  817. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F11 , KEY_F11));
  818. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F12 , KEY_F12));
  819. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F13 , KEY_F13));
  820. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F14 , KEY_F14));
  821. +   KeyMap.push_back(SKeyMap(GLFW_KEY_F15 , KEY_F15));
  822. +
  823. +   // no higher F-keys
  824. +
  825. +   KeyMap.push_back(SKeyMap(GLFW_KEY_NUM_LOCK, KEY_NUMLOCK));
  826. +   KeyMap.push_back(SKeyMap(GLFW_KEY_SCROLL_LOCK, KEY_SCROLL));
  827. +   KeyMap.push_back(SKeyMap(GLFW_KEY_LEFT_SHIFT, KEY_LSHIFT));
  828. +   KeyMap.push_back(SKeyMap(GLFW_KEY_RIGHT_SHIFT, KEY_RSHIFT));
  829. +   KeyMap.push_back(SKeyMap(GLFW_KEY_LEFT_CONTROL,  KEY_LCONTROL));
  830. +   KeyMap.push_back(SKeyMap(GLFW_KEY_RIGHT_CONTROL,  KEY_RCONTROL));
  831. +   KeyMap.push_back(SKeyMap(GLFW_KEY_LEFT_ALT,  KEY_LMENU));
  832. +   KeyMap.push_back(SKeyMap(GLFW_KEY_RIGHT_ALT,  KEY_RMENU));
  833. +
  834. +   //KeyMap.push_back(SKeyMap(SDLK_PLUS,   KEY_PLUS));
  835. +   KeyMap.push_back(SKeyMap(GLFW_KEY_COMMA,  KEY_COMMA));
  836. +   KeyMap.push_back(SKeyMap(GLFW_KEY_MINUS,  KEY_MINUS));
  837. +   KeyMap.push_back(SKeyMap(GLFW_KEY_PERIOD , KEY_PERIOD));
  838. +
  839. +   // some special keys missing
  840. +
  841. +   KeyMap.sort();
  842. +}
  843. +
  844. +GLFWwindow *CIrrDeviceGLFW3::getWindow(){
  845. +   return window;
  846. +}
  847. +
  848. +} // end namespace irr
  849. +
  850. +#endif // _IRR_COMPILE_WITH_GLFW3_DEVICE_
  851. +
  852. diff -Naur irrlicht-code-5600-trunk/source/Irrlicht/CIrrDeviceGLFW3.h irrlicht-glfw/source/Irrlicht/CIrrDeviceGLFW3.h
  853. --- irrlicht-code-5600-trunk/source/Irrlicht/CIrrDeviceGLFW3.h  1970-01-01 01:00:00.000000000 +0100
  854. +++ irrlicht-glfw/source/Irrlicht/CIrrDeviceGLFW3.h 2018-01-22 15:54:04.000000000 +0100
  855. @@ -0,0 +1,273 @@
  856. +// Copyright (C) 2002-2012 Nikolaus Gebhardt
  857. +// This file is part of the "Irrlicht Engine".
  858. +// For conditions of distribution and use, see copyright notice in irrlicht.h
  859. +// This device code is based on the original GLFW3 device implementation
  860. +// contributed by Shane Parker (sirshane).
  861. +
  862. +#ifndef __C_IRR_DEVICE_GLFW3_H_INCLUDED__
  863. +#define __C_IRR_DEVICE_GLFW3_H_INCLUDED__
  864. +
  865. +#include "IrrCompileConfig.h"
  866. +
  867. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  868. +
  869. +#include "IrrlichtDevice.h"
  870. +#include "CIrrDeviceStub.h"
  871. +#include "IImagePresenter.h"
  872. +#include "ICursorControl.h"
  873. +
  874. +#include <GLFW/glfw3.h>
  875. +
  876. +namespace irr
  877. +{
  878. +
  879. +   class CIrrDeviceGLFW3 : public CIrrDeviceStub, video::IImagePresenter
  880. +   {
  881. +   public:
  882. +
  883. +       //! constructor
  884. +       CIrrDeviceGLFW3(const SIrrlichtCreationParameters& param);
  885. +
  886. +       //! destructor
  887. +       virtual ~CIrrDeviceGLFW3();
  888. +
  889. +       //! runs the device. Returns false if device wants to be deleted
  890. +       virtual bool run() _IRR_OVERRIDE_;
  891. +
  892. +       //! pause execution temporarily
  893. +       virtual void yield() _IRR_OVERRIDE_;
  894. +
  895. +       //! pause execution for a specified time
  896. +       virtual void sleep(u32 timeMs, bool pauseTimer) _IRR_OVERRIDE_;
  897. +
  898. +       //! sets the caption of the window
  899. +       virtual void setWindowCaption(const wchar_t* text) _IRR_OVERRIDE_;
  900. +
  901. +       //! returns if window is active. if not, nothing need to be drawn
  902. +       virtual bool isWindowActive() const _IRR_OVERRIDE_;
  903. +
  904. +       //! returns if window has focus.
  905. +       bool isWindowFocused() const _IRR_OVERRIDE_;
  906. +
  907. +       //! returns if window is minimized.
  908. +       bool isWindowMinimized() const _IRR_OVERRIDE_;
  909. +
  910. +       //! returns color format of the window.
  911. +       video::ECOLOR_FORMAT getColorFormat() const _IRR_OVERRIDE_;
  912. +
  913. +       //! presents a surface in the client area
  914. +       virtual bool present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0) _IRR_OVERRIDE_;
  915. +
  916. +       //! notifies the device that it should close itself
  917. +       virtual void closeDevice() _IRR_OVERRIDE_;
  918. +
  919. +       //! \return Returns a pointer to a list with all video modes supported
  920. +       virtual video::IVideoModeList* getVideoModeList() _IRR_OVERRIDE_;
  921. +
  922. +       //! Sets if the window should be resizable in windowed mode.
  923. +       virtual void setResizable(bool resize=false) _IRR_OVERRIDE_;
  924. +
  925. +       //! Minimizes the window.
  926. +       virtual void minimizeWindow() _IRR_OVERRIDE_;
  927. +
  928. +       //! Maximizes the window.
  929. +       virtual void maximizeWindow() _IRR_OVERRIDE_;
  930. +
  931. +       //! Restores the window size.
  932. +       virtual void restoreWindow() _IRR_OVERRIDE_;
  933. +
  934. +       //! Get the position of this window on screen
  935. +       virtual core::position2di getWindowPosition() _IRR_OVERRIDE_;
  936. +
  937. +       //! Activate any joysticks, and generate events for them.
  938. +       virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo) _IRR_OVERRIDE_;
  939. +
  940. +       //! Set the current Gamma Value for the Display
  941. +       virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) _IRR_OVERRIDE_;
  942. +
  943. +       //! Get the current Gamma Value for the Display
  944. +       virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ) _IRR_OVERRIDE_;
  945. +
  946. +       //! Get the device type
  947. +       virtual E_DEVICE_TYPE getType() const _IRR_OVERRIDE_
  948. +       {
  949. +               return EIDT_GLFW3;
  950. +       }
  951. +
  952. +       //get the window
  953. +       virtual GLFWwindow *getWindow();
  954. +
  955. +       //! Implementation of the linux cursor control
  956. +       class CCursorControl : public gui::ICursorControl
  957. +       {
  958. +       public:
  959. +
  960. +           CCursorControl(CIrrDeviceGLFW3* dev)
  961. +               : Device(dev), IsVisible(true)
  962. +           {
  963. +           }
  964. +
  965. +           //! Changes the visible state of the mouse cursor.
  966. +           virtual void setVisible(bool visible) _IRR_OVERRIDE_
  967. +           {
  968. +               IsVisible = visible;
  969. +               if ( visible )
  970. +                   glfwSetInputMode(Device->window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
  971. +               else
  972. +                   glfwSetInputMode(Device->window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
  973. +           }
  974. +
  975. +           //! Returns if the cursor is currently visible.
  976. +           virtual bool isVisible() const _IRR_OVERRIDE_
  977. +           {
  978. +               return IsVisible;
  979. +           }
  980. +
  981. +           //! Sets the new position of the cursor.
  982. +           virtual void setPosition(const core::position2d<f32> &pos) _IRR_OVERRIDE_
  983. +           {
  984. +               setPosition(pos.X, pos.Y);
  985. +           }
  986. +
  987. +           //! Sets the new position of the cursor.
  988. +           virtual void setPosition(f32 x, f32 y) _IRR_OVERRIDE_
  989. +           {
  990. +               setPosition((s32)(x*Device->Width), (s32)(y*Device->Height));
  991. +           }
  992. +
  993. +           //! Sets the new position of the cursor.
  994. +           virtual void setPosition(const core::position2d<s32> &pos) _IRR_OVERRIDE_
  995. +           {
  996. +               setPosition(pos.X, pos.Y);
  997. +           }
  998. +
  999. +           //! Sets the new position of the cursor.
  1000. +           virtual void setPosition(s32 x, s32 y) _IRR_OVERRIDE_
  1001. +           {
  1002. +               glfwSetCursorPos (Device->window, x, y);
  1003. +           }
  1004. +
  1005. +           //! Returns the current position of the mouse cursor.
  1006. +           virtual const core::position2d<s32>& getPosition() _IRR_OVERRIDE_
  1007. +           {
  1008. +               updateCursorPos();
  1009. +               return CursorPos;
  1010. +           }
  1011. +
  1012. +           //! Returns the current position of the mouse cursor.
  1013. +           virtual core::position2d<f32> getRelativePosition() _IRR_OVERRIDE_
  1014. +           {
  1015. +               updateCursorPos();
  1016. +               return core::position2d<f32>(CursorPos.X / (f32)Device->Width,
  1017. +                   CursorPos.Y / (f32)Device->Height);
  1018. +           }
  1019. +
  1020. +           //
  1021. +           virtual void setReferenceRect(core::rect<s32>* rect=0) _IRR_OVERRIDE_
  1022. +           {
  1023. +               //Nothing to do here
  1024. +           }
  1025. +
  1026. +           //! Sets the active cursor icon
  1027. +           virtual void setActiveIcon(gui::ECURSOR_ICON iconId) _IRR_OVERRIDE_
  1028. +           {
  1029. +               GLFWcursor* cursor = glfwCreateStandardCursor(GLFW_HRESIZE_CURSOR); //ToDo: tipo de cursor
  1030. +               glfwSetCursor(Device->window, cursor);
  1031. +           }
  1032. +
  1033. +           //! Gets the currently active icon
  1034. +           //virtual gui::ECURSOR_ICON getActiveIcon() const _IRR_OVERRIDE_ = 0;
  1035. +
  1036. +           //! Add a custom sprite as cursor icon.
  1037. +           //virtual gui::ECURSOR_ICON addIcon(const gui::SCursorSprite& icon) _IRR_OVERRIDE_ = 0;
  1038. +           /*{
  1039. +               unsigned char pixels[16 * 16 * 4];
  1040. +               memset(pixels, 0xff, sizeof(pixels));
  1041. +               GLFWimage image;
  1042. +               image.width = 16;
  1043. +               image.height = 16;
  1044. +               image.pixels = pixels;
  1045. +               GLFWcursor* cursor = glfwCreateCursor(&image, 0, 0);
  1046. +           }*/
  1047. +
  1048. +           //! replace the given cursor icon.
  1049. +           //virtual void changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon) _IRR_OVERRIDE_ = 0;
  1050. +
  1051. +           //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work.
  1052. +           //virtual core::dimension2di getSupportedIconSize() const _IRR_OVERRIDE_ = 0;
  1053. +
  1054. +       private:
  1055. +
  1056. +           void updateCursorPos()
  1057. +           {
  1058. +               CursorPos.X = Device->MouseX;
  1059. +               CursorPos.Y = Device->MouseY;
  1060. +
  1061. +               if (CursorPos.X < 0)
  1062. +                   CursorPos.X = 0;
  1063. +               if (CursorPos.X > (s32)Device->Width)
  1064. +                   CursorPos.X = Device->Width;
  1065. +               if (CursorPos.Y < 0)
  1066. +                   CursorPos.Y = 0;
  1067. +               if (CursorPos.Y > (s32)Device->Height)
  1068. +                   CursorPos.Y = Device->Height;
  1069. +           }
  1070. +
  1071. +           CIrrDeviceGLFW3* Device;
  1072. +           core::position2d<s32> CursorPos;
  1073. +           bool IsVisible;
  1074. +       };
  1075. +
  1076. +   private:
  1077. +
  1078. +       //! create the driver
  1079. +       void createDriver();
  1080. +
  1081. +       bool createWindow();
  1082. +
  1083. +       void createKeyMap();
  1084. +
  1085. +       GLFWwindow* window;
  1086. +      
  1087. +#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
  1088. +       core::array<int> Joysticks;
  1089. +#endif
  1090. +
  1091. +       SEvent irrevent;
  1092. +
  1093. +       s32 MouseX, MouseY;
  1094. +       u32 MouseButtonStates;
  1095. +
  1096. +       u32 Width, Height;
  1097. +
  1098. +       bool Resizable;
  1099. +       bool WindowHasFocus;
  1100. +       bool WindowMinimized;
  1101. +
  1102. +       struct SKeyMap
  1103. +       {
  1104. +           SKeyMap() {}
  1105. +           SKeyMap(s32 x11, s32 win32)
  1106. +               : GLFW3Key(x11), Win32Key(win32)
  1107. +           {
  1108. +           }
  1109. +
  1110. +           s32 GLFW3Key;
  1111. +           s32 Win32Key;
  1112. +
  1113. +           bool operator<(const SKeyMap& o) const
  1114. +           {
  1115. +               return GLFW3Key < o.GLFW3Key; //ToDo: revisar
  1116. +           }
  1117. +       };
  1118. +
  1119. +       core::array<SKeyMap> KeyMap;
  1120. +   };
  1121. +  
  1122. +   //ToDo: joysticks
  1123. +
  1124. +} // end namespace irr
  1125. +
  1126. +#endif // _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1127. +#endif // __C_IRR_DEVICE_GLFW3_H_INCLUDED__
  1128. +
  1129. diff -Naur irrlicht-code-5600-trunk/source/Irrlicht/COpenGLDriver.cpp irrlicht-glfw/source/Irrlicht/COpenGLDriver.cpp
  1130. --- irrlicht-code-5600-trunk/source/Irrlicht/COpenGLDriver.cpp  2017-12-31 21:24:55.000000000 +0100
  1131. +++ irrlicht-glfw/source/Irrlicht/COpenGLDriver.cpp 2018-01-22 16:08:53.000000000 +0100
  1132. @@ -24,6 +24,11 @@
  1133.  #include <SDL/SDL.h>
  1134.  #endif
  1135.  
  1136. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1137. +#include <GLFW/glfw3.h>
  1138. +#include "CIrrDeviceGLFW3.h"
  1139. +#endif
  1140. +
  1141.  namespace irr
  1142.  {
  1143.  namespace video
  1144. @@ -52,19 +57,33 @@
  1145.  #endif
  1146.  
  1147.  #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
  1148. -COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceSDL* device)
  1149. -   : CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(), CacheHandler(0),
  1150. -   CurrentRenderMode(ERM_NONE), ResetRenderStates(true), Transformation3DChanged(true),
  1151. -   AntiAlias(params.AntiAlias), ColorFormat(ECF_R8G8B8), FixedPipelineState(EOFPS_ENABLE),
  1152. -   Params(params), SDLDevice(device), ContextManager(0), DeviceType(EIDT_SDL)
  1153. -{
  1154. -#ifdef _DEBUG
  1155. -   setDebugName("COpenGLDriver");
  1156. +   COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceSDL* device)
  1157. +       : CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(), CacheHandler(0),
  1158. +       CurrentRenderMode(ERM_NONE), ResetRenderStates(true), Transformation3DChanged(true),
  1159. +       AntiAlias(params.AntiAlias), ColorFormat(ECF_R8G8B8), FixedPipelineState(EOFPS_ENABLE),
  1160. +       Params(params), SDLDevice(device), ContextManager(0), DeviceType(EIDT_SDL)
  1161. +   {
  1162. +   #ifdef _DEBUG
  1163. +       setDebugName("COpenGLDriver");
  1164. +   #endif
  1165. +
  1166. +       genericDriverInit();
  1167. +   }
  1168.  #endif
  1169.  
  1170. -   genericDriverInit();
  1171. -}
  1172. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1173. +   COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceGLFW3* device)
  1174. +       : CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(), CacheHandler(0),
  1175. +       CurrentRenderMode(ERM_NONE), ResetRenderStates(true), Transformation3DChanged(true),
  1176. +       AntiAlias(params.AntiAlias), ColorFormat(ECF_R8G8B8), FixedPipelineState(EOFPS_ENABLE),
  1177. +       Params(params), GLFW3Device(device), ContextManager(0), DeviceType(EIDT_GLFW3)
  1178. +   {
  1179. +   #ifdef _DEBUG
  1180. +       setDebugName("COpenGLDriver");
  1181. +   #endif
  1182.  
  1183. +       genericDriverInit();
  1184. +   }
  1185.  #endif
  1186.  
  1187.  bool COpenGLDriver::initDriver()
  1188. @@ -295,6 +314,11 @@
  1189.         glFrontFace(GL_CW);
  1190.  #endif
  1191.  
  1192. +#if defined(_IRR_COMPILE_WITH_GLFW3_DEVICE_)
  1193. +   if ( DeviceType == EIDT_GLFW3 )
  1194. +       glFrontFace(GL_CW);
  1195. +#endif
  1196. +
  1197.     clearBuffers(clearFlag, clearColor, clearDepth, clearStencil);
  1198.  
  1199.     return true;
  1200. @@ -319,6 +343,14 @@
  1201.     }
  1202.  #endif
  1203.  
  1204. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1205. +   if ( DeviceType == EIDT_GLFW3 )
  1206. +   {
  1207. +       glfwSwapBuffers(this->GLFW3Device->getWindow());
  1208. +       status = true;
  1209. +   }
  1210. +#endif
  1211. +
  1212.     // todo: console device present
  1213.  
  1214.     return status;
  1215. @@ -4382,15 +4414,30 @@
  1216.  #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
  1217.  IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
  1218.         io::IFileSystem* io, CIrrDeviceSDL* device)
  1219. -{
  1220. -#ifdef _IRR_COMPILE_WITH_OPENGL_
  1221. -   return new COpenGLDriver(params, io, device);
  1222. -#else
  1223. -   return 0;
  1224. -#endif //  _IRR_COMPILE_WITH_OPENGL_
  1225. -}
  1226. +   {
  1227. +   #ifdef _IRR_COMPILE_WITH_OPENGL_
  1228. +       return new COpenGLDriver(params, io, device);
  1229. +   #else
  1230. +       return 0;
  1231. +   #endif //  _IRR_COMPILE_WITH_OPENGL_
  1232. +   }
  1233.  #endif // _IRR_COMPILE_WITH_SDL_DEVICE_
  1234.  
  1235. +// -----------------------------------
  1236. +// GLFW3 VERSION
  1237. +// -----------------------------------
  1238. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1239. +IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
  1240. +       io::IFileSystem* io, CIrrDeviceGLFW3* device)
  1241. +   {
  1242. +   #ifdef _IRR_COMPILE_WITH_OPENGL_
  1243. +       return new COpenGLDriver(params, io, device);
  1244. +   #else
  1245. +       return 0;
  1246. +   #endif //  _IRR_COMPILE_WITH_OPENGL_
  1247. +   }
  1248. +#endif // _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1249. +
  1250.  } // end namespace
  1251.  } // end namespace
  1252.  
  1253. diff -Naur irrlicht-code-5600-trunk/source/Irrlicht/COpenGLDriver.h irrlicht-glfw/source/Irrlicht/COpenGLDriver.h
  1254. --- irrlicht-code-5600-trunk/source/Irrlicht/COpenGLDriver.h    2017-08-21 15:53:01.000000000 +0200
  1255. +++ irrlicht-glfw/source/Irrlicht/COpenGLDriver.h   2018-01-22 05:15:08.000000000 +0100
  1256. @@ -14,6 +14,7 @@
  1257.     class CIrrDeviceWin32;
  1258.     class CIrrDeviceLinux;
  1259.     class CIrrDeviceSDL;
  1260. +   class CIrrDeviceGLFW3;
  1261.     class CIrrDeviceMacOSX;
  1262.  }
  1263.  
  1264. @@ -51,6 +52,10 @@
  1265.         COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceSDL* device);
  1266.  #endif
  1267.  
  1268. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1269. +       COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceGLFW3* device);
  1270. +#endif
  1271. +
  1272.         bool initDriver();
  1273.  
  1274.         //! destructor
  1275. @@ -502,6 +507,10 @@
  1276.             CIrrDeviceSDL *SDLDevice;
  1277.         #endif
  1278.  
  1279. +       #ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1280. +           CIrrDeviceGLFW3 *GLFW3Device;
  1281. +       #endif
  1282. +
  1283.         IContextManager* ContextManager;
  1284.  
  1285.         E_DEVICE_TYPE DeviceType;
  1286. diff -Naur irrlicht-code-5600-trunk/source/Irrlicht/Irrlicht.cpp irrlicht-glfw/source/Irrlicht/Irrlicht.cpp
  1287. --- irrlicht-code-5600-trunk/source/Irrlicht/Irrlicht.cpp   2017-11-28 22:54:18.000000000 +0100
  1288. +++ irrlicht-glfw/source/Irrlicht/Irrlicht.cpp  2018-01-22 05:16:50.000000000 +0100
  1289. @@ -30,6 +30,10 @@
  1290.  #include "CIrrDeviceSDL.h"
  1291.  #endif
  1292.  
  1293. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1294. +#include "CIrrDeviceGLFW3.h"
  1295. +#endif
  1296. +
  1297.  #ifdef _IRR_COMPILE_WITH_FB_DEVICE_
  1298.  #include "CIrrDeviceFB.h"
  1299.  #endif
  1300. @@ -85,6 +89,11 @@
  1301.             dev = new CIrrDeviceSDL(params);
  1302.  #endif
  1303.  
  1304. +#ifdef _IRR_COMPILE_WITH_GLFW3_DEVICE_
  1305. +       if (params.DeviceType == EIDT_GLFW3 || (!dev && params.DeviceType == EIDT_BEST))
  1306. +           dev = new CIrrDeviceGLFW3(params);
  1307. +#endif
  1308. +
  1309.  #ifdef _IRR_COMPILE_WITH_FB_DEVICE_
  1310.         if (params.DeviceType == EIDT_FRAMEBUFFER || (!dev && params.DeviceType == EIDT_BEST))
  1311.             dev = new CIrrDeviceFB(params);
  1312. diff -Naur irrlicht-code-5600-trunk/source/Irrlicht/Irrlicht-gcc.cbp irrlicht-glfw/source/Irrlicht/Irrlicht-gcc.cbp
  1313. --- irrlicht-code-5600-trunk/source/Irrlicht/Irrlicht-gcc.cbp   2017-08-23 18:41:15.000000000 +0200
  1314. +++ irrlicht-glfw/source/Irrlicht/Irrlicht-gcc.cbp  2018-01-22 05:16:02.559571907 +0100
  1315. @@ -765,6 +765,8 @@
  1316.         <Unit filename="CIrrDeviceLinux.h" />
  1317.         <Unit filename="CIrrDeviceSDL.cpp" />
  1318.         <Unit filename="CIrrDeviceSDL.h" />
  1319. +       <Unit filename="CIrrDeviceGLFW3.cpp" />
  1320. +       <Unit filename="CIrrDeviceGLFW3.h" />
  1321.         <Unit filename="CIrrDeviceStub.cpp" />
  1322.         <Unit filename="CIrrDeviceStub.h" />
  1323.         <Unit filename="CIrrDeviceWin32.cpp" />
  1324. diff -Naur irrlicht-code-5600-trunk/source/Irrlicht/Makefile irrlicht-glfw/source/Irrlicht/Makefile
  1325. --- irrlicht-code-5600-trunk/source/Irrlicht/Makefile   2017-11-06 15:39:37.000000000 +0100
  1326. +++ irrlicht-glfw/source/Irrlicht/Makefile  2018-01-22 05:17:14.248548410 +0100
  1327. @@ -44,7 +44,7 @@
  1328.  IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)
  1329.  IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRNormalMap.o CTRStencilShadow.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o
  1330.  IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CWADReader.o CZipReader.o CPakReader.o CNPKReader.o CTarReader.o CMountPointReader.o irrXML.o CAttributes.o lzma/LzmaDec.o
  1331. -IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o leakHunter.o     CProfiler.o utf8.o
  1332. +IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceGLFW3.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o leakHunter.o   CProfiler.o utf8.o
  1333.  IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o CGUIImageList.o CGUITreeView.o CGUIProfiler.o
  1334.  ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
  1335.  JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jccolor.o jpeglib/jcdctmgr.o jpeglib/jchuff.o jpeglib/jcinit.o jpeglib/jcmainct.o jpeglib/jcmarker.o jpeglib/jcmaster.o jpeglib/jcomapi.o jpeglib/jcparam.o jpeglib/jcprepct.o jpeglib/jcsample.o jpeglib/jctrans.o jpeglib/jdapimin.o jpeglib/jdapistd.o jpeglib/jdatadst.o jpeglib/jdatasrc.o jpeglib/jdcoefct.o jpeglib/jdcolor.o jpeglib/jddctmgr.o jpeglib/jdhuff.o jpeglib/jdinput.o jpeglib/jdmainct.o jpeglib/jdmarker.o jpeglib/jdmaster.o jpeglib/jdmerge.o jpeglib/jdpostct.o jpeglib/jdsample.o jpeglib/jdtrans.o jpeglib/jerror.o jpeglib/jfdctflt.o jpeglib/jfdctfst.o jpeglib/jfdctint.o jpeglib/jidctflt.o jpeglib/jidctfst.o jpeglib/jidctint.o jpeglib/jmemmgr.o jpeglib/jmemnobs.o jpeglib/jquant1.o jpeglib/jquant2.o jpeglib/jutils.o jpeglib/jcarith.o jpeglib/jdarith.o jpeglib/jaricom.o
  1336. diff -Naur irrlicht-code-5600-trunk/source/Irrlicht/.vscode/settings.json irrlicht-glfw/source/Irrlicht/.vscode/settings.json
  1337. --- irrlicht-code-5600-trunk/source/Irrlicht/.vscode/settings.json  1970-01-01 01:00:00.000000000 +0100
  1338. +++ irrlicht-glfw/source/Irrlicht/.vscode/settings.json 2018-01-22 04:24:10.777545696 +0100
  1339. @@ -0,0 +1,5 @@
  1340. +{
  1341. +    "files.associations": {
  1342. +        "*.tcc": "cpp"
  1343. +    }
  1344. +}
  1345. \ No hay ningún carácter de nueva línea al final del fichero
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement