Commit Graph

949 Commits

Author SHA1 Message Date
Benau
2eca3164b8 Improve cursor positioning for RTL text 2019-06-14 19:27:18 +08:00
Benau
65a54cbd8b Fix color emoji scaled wrongly with overbright color 2019-06-12 01:18:36 +08:00
Benau
1707ac7e1e Use GlyphLayout to draw list widget 2019-06-11 16:29:35 +08:00
Benau
44796bc8c0 Use a better way to erase top text 2019-06-11 15:05:46 +08:00
Benau
591bd0c3af Use utf16 for java string to stringw conversion 2019-06-10 16:09:07 +08:00
Benau
28cc2838a8 Add color emoji 2019-06-10 10:35:42 +08:00
Benau
89e3bcd11b Update stk edit box to be more i18n friendly 2019-06-10 00:43:31 +08:00
Benau
acb9054dcb Use libraqm for text layout 2019-06-09 11:26:00 +08:00
Benau
43d322c634 Add libraries for emoji and complex text 2019-06-09 10:06:50 +08:00
Reiner Herrmann
07b6a16000 Fix several spelling/grammar errors (#3951)
found by lintian
2019-06-04 19:04:18 -04:00
Benau
d487a2e72e Clear text when closing keyboard if onEnterPressed returns true 2019-05-28 15:21:06 +08:00
Benau
6216d003b6 Code clean up 2019-05-28 01:47:41 +08:00
Benau
336300b997 Allow showing different soft keyboard in android 2019-05-27 16:34:16 +08:00
Benau
72c61e412a Fix compiler warnings 2019-05-27 13:13:51 +08:00
Benau
d3ef05b37c Remove unused functions 2019-05-27 12:41:28 +08:00
Benau
a96071f9d3 Make android callback thread safe 2019-05-27 12:17:08 +08:00
Benau
febad27342 Prevent copying text to non focused widget in STK.
It can happen if user uses the arrows in hacker keyboard to change
widget focus
2019-05-27 11:09:28 +08:00
Benau
34e680bfbd Allow copying from STK edit box to android edit text 2019-05-25 22:19:15 +08:00
Benau
27f0f8c961 Move hideNavBar to java for native android keyboard 2019-05-21 16:31:59 +08:00
Benau
1814472214 Improve screen keyboard handling for android (tv)
And remove some android ifdef for wayland on screen keyboard later
2019-05-21 12:43:20 +08:00
Benau
d5246e5291 Move the screen and touchscreen events horizontally for screen keyboard 2019-05-21 01:46:14 +08:00
Benau
766c971339 Try to save keyboard height for moving screen with it later 2019-05-19 17:41:51 +08:00
Benau
ede56a3cf8 Move show and hide keyboard to java memeber function 2019-05-18 15:35:25 +08:00
Benau
0e1c0d1541 Allow handling ACTION_MULTIPLE for unicode and voice message 2019-05-18 09:15:58 +08:00
David Carlier
3b699034f9 register keyword removal 2019-04-30 21:20:08 +01:00
Benau
1b6ab86ab0 Fix crashing in MSVC 2019 2019-04-17 08:20:14 +08:00
Deve
157dc89cd2 Disable sse2 in libsquish for some known unsupported architectures 2019-04-05 21:43:34 +02:00
Deve
7b58c439fc Fixed a crash on nvidia when recreating egl context 2019-03-14 22:56:38 +01:00
samuncle
1acc6ecea0 Display the version of the engine 2019-03-11 23:26:44 +01:00
Deve
3c7673ccfc Revert waiting for mapped window before reading dimensions.
It causes issues on some systems.
2019-03-06 21:05:48 +01:00
Deve
c35c0af590 Merge remote-tracking branch 'origin/fix-xbox360-stick-buttons' 2019-02-14 22:15:45 +01:00
Deve
f69b1e7cf7 Add missing ifdef 2019-02-06 21:53:42 +01:00
Deve
6060e57d43 Sleep some time after changing resolution, so that window manager will be notified before we read window size 2019-02-06 21:53:42 +01:00
Deve
d0d036c372 Make sure that window is mapped before reading dimensions 2019-02-06 21:53:42 +01:00
Deve
cb8ee53edc Add environment variable to force legacy fullscreen on linux 2019-01-28 21:52:35 +01:00
hiker
9ea6e85205 Fix thumb-stick buttons on xbox controller. 2019-01-22 21:25:51 +11:00
hiker
7d688b241c Merge branch 'fix-wiiuse-uninstallation' 2019-01-20 01:45:31 +11:00
hiker
aea2739e9d Changed default library mode for wiiuse back to be static, not shared. 2019-01-15 18:23:21 +11:00
Deve
104afbd5f0 Don't break early when finding best monitor mode 2019-01-13 22:11:46 +01:00
deve
046f94394d Fixed server only build 2019-01-11 06:30:43 +01:00
Kevin Zheng
23706f4795 Fix build on FreeBSD 2019-01-10 00:07:05 +01:00
Deve
15ffc98369 Detect if there is touch device available 2019-01-09 22:04:50 +01:00
Sebastian Krzyszkowiak
20310f9dbc IrrDeviceWayland: set pointer position on touch down 2019-01-09 20:43:14 +01:00
deve
d961aa9521 Simulate mouse for single touch events on wayland 2019-01-09 10:57:39 +01:00
Sebastian Krzyszkowiak
51ca86b416 IrrDeviceWayland: initialize m_touch variable 2019-01-09 10:05:24 +01:00
Deve
8257d9eeee Handle touch events on wayland device 2019-01-08 22:31:37 +01:00
Deve
15e741fa04 Fixed compilation 2019-01-06 21:35:46 +01:00
Deve
b0ff15873e Fixed cmake warning 2019-01-03 20:53:08 +01:00
hiker
082d64c3d8 Merge branch 'wiiuse-update' of git://github.com/STK-helper/stk-code into STK-helper-wiiuse-update 2019-01-03 17:30:44 +11:00
Deve
e6081e64b2 Use xdg decoration for server-side decorations 2018-12-25 01:18:17 +01:00
Kevin Zheng
95564c4d74 Fix build with joystick on FreeBSD (#3660) 2018-12-22 21:49:15 -05:00
Kevin Zheng
ca419f8d59 Fix build without _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ (#3659) 2018-12-22 21:13:03 +01:00
Deve
ddbe42680d Add experimental support for system screen keyboard on android.
Disabled by default, needs screen_keyboard = 3 in config.xml
2018-12-01 00:43:17 +01:00
Benau
b3e41db14b Add EMT_STK_GRASS for GLES2 to draw grass material without vertex color
Now EMT_TRANSPARENT_ALPHA_CHANNEL_REF in GLES2 can be used with vertex
color
2018-11-30 23:33:30 +08:00
Benau
874895ba11 Use STKTextBillboard for legacy pipeline for correct glyph metrics 2018-11-30 23:01:43 +08:00
Benau
8b825bf7df Fix meter missing in race gui for GLES 2 2018-11-30 18:47:15 +08:00
QwertyChouskie
2253dc9db9 Update to 0.15.4, with fix for Windows compilation 2018-11-28 11:18:32 -08:00
QwertyChouskie
0c5d728c48 Update Wiiuse library to 0.15.3, fixes support for newer Wiimotes on Linux 2018-11-26 09:58:53 -08:00
Deve
cdb3d2cae5 Fixed a crash when opening broken xml file 2018-11-22 22:09:05 +01:00
River Marks
665c8a8cec Fix for when attempting to input a server IP address on the num pad (#3603)
The decimal key was not registering on the number pad as the decimal
key, it was deleting the numbers of the IP address making it impossible
to use the num pad solely for entering an IP.

Fixes #3602
2018-11-20 11:37:18 +01:00
Deve
060855c710 Check wayland version in cmake.
Fixed #3579.
2018-11-17 21:56:23 +01:00
hiker
0221e2f6d1 Merge branch 'master' of github.com:supertuxkart/stk-code 2018-11-16 23:48:47 +11:00
Deve
7cc4c92b31 Fixed compilation with current mesa.
It fixes #3557.
2018-11-14 20:59:00 +01:00
hiker
5c14ce86d7 Merge branch 'master' of github.com:supertuxkart/stk-code 2018-11-13 17:55:56 +11:00
hiker
724a5d94ba Merge branch 'master' of github.com:supertuxkart/stk-code 2018-10-31 23:20:53 +11:00
Benau
c25c12e7a5 Disable jpg logging to make it thread safe 2018-10-31 13:26:34 +08:00
Benau
c1ed846e1e Remove X11 header usage if server only 2018-10-31 12:28:49 +08:00
Deve
6722f57b06 Fixed possible crash on 64-bit mingw build 2018-10-21 21:52:15 +02:00
Deve
9cbf15c1a2 Update to stable xdg shell 2018-10-14 22:11:30 +02:00
Benau
724ca795f0 Add the required code for advanced meta library animation handling 2018-10-13 00:43:59 +08:00
hiker
17ab076858 Fixed various compiler warnings for 64-bit windows compilation. 2018-10-11 23:27:08 +11:00
Deve
7cde4bcd36 Fixed wrong comment 2018-10-10 00:29:21 +02:00
Deve
ba1da58f0b Don't change current working directory.
It causes issues with multithreading.
Fixes #3498
2018-10-09 21:42:16 +02:00
Deve
efe68fef94 Disable billboard text rendering in GLES legacy pipeline 2018-10-07 23:27:19 +02:00
Deve
0c5b1a3999 Always show current reolution in options 2018-10-04 21:55:00 +02:00
Benau
e7aa03f1bf Try an up-to-date current frame bone-child attachment in legacy pipeline 2018-09-28 23:33:51 +08:00
Deve
2ac0e5fd07 Avoid a crash when path is empty.
Happened for me few times, but reason unknown.
2018-09-23 22:53:11 +02:00
Benau
37cf5ac459 Add delete vertex buffer to save memory for no graphics 2018-09-12 15:30:57 +08:00
Deve
e3b3a369d0 Allow to choose monitor with environment variable 2018-09-06 22:06:40 +02:00
Deve
19ad3df8fa Revert a workaround for 32bit angelscript compilation.
It's unclear which gcc versions are affected.
2018-08-24 23:25:59 +02:00
Deve
ad8b30b5d3 Recreate libchildprocess after apk upgrade also when device has non-typical internal data dir 2018-08-23 23:08:27 +02:00
Deve
2ac8387761 Read data path from ApplicationInfo structure instead of hardcoded /data/data/... 2018-08-23 00:21:20 +02:00
Deve
54c9fb97fa Use higher values as a fallback for unknown keycodes on android 2018-08-21 21:36:39 +02:00
Deve
ba6bbd4133 More key codes for keyboard on android 2018-08-21 21:18:35 +02:00
Deve
07fd42ee3c Add support for unicode characters for hardware keyboard on android 2018-08-20 23:34:51 +02:00
Deve
80fd62c7d8 More fixes for global_android_app 2018-08-16 22:30:15 +02:00
Deve
52d6e93bdc Hide navbar only for android >= 4.4. 2018-07-27 20:55:31 +02:00
Deve
ef27fdaba8 Fixed a crash on exit 2018-07-27 00:05:39 +02:00
Deve
b7a11e68ad Hide navigation bar for more comfortable playing and more screen space 2018-07-26 22:34:56 +02:00
Deve
5d9614295e Allow to handle window state events directly in main thread 2018-07-26 22:21:41 +02:00
Deve
a08cccceaa Use our copy of native app glue 2018-07-26 22:20:53 +02:00
Marianne Gagnon
973b29980d Fix #3347 2018-07-23 19:58:15 -04:00
hiker
a1ba27bc45 Try again to fix our build environment in server only mode. 2018-07-23 15:40:25 +10:00
Benau
b6c893b03e Try to fix server only build in linux 2018-07-23 13:27:14 +08:00
hiker
d18e963ea6 Added Benau's new version. 2018-07-23 12:51:59 +10:00
hiker
39e218b2dc Try to fix server-only build ... now non-server build is broken :( 2018-07-23 09:28:12 +10:00
Deve
b5c3910fe8 Fixed android x86 compilation.
Ugly, but there is no better solution atm.
2018-07-10 21:22:14 +02:00
Deve
aa0a51c31a Fixed angelscript compilation with 32bit gcc 2018-07-07 23:36:02 +02:00
Benau
4099afb25f Remove image related code and library dependencies in server only build 2018-07-07 09:27:39 +08:00
QwertyChouskie
c4f0a71ef0 Add macOS to travis builds, fix server-only builds on macOS, msc. fixes (#3339)
* Use thread number from Travis docs
The other number is probably incorrect.
See https://github.com/travis-ci/travis-ci/issues/4696

* Add macOS to travis builds

* Remove unnecessary libraries
Not sure why these were added in the first place.
First commit that added them: 6aecb42e42

* Fix server-only build on macOS
2018-07-03 19:37:57 -04:00
Deve
e44266b526 Always set blend func in GLES 2.0.
It's often changed in STK engine and the value stored in irrlicht variable may be invalid.

Fixes #3296
2018-06-12 22:25:46 +02:00
hiker
dc36f743ab Fixed compiler warnings. 2018-06-01 00:21:25 +10:00
Deve
ed2d57996d Fixed libsquish compilation on arm 2018-05-25 21:08:00 +02:00
Deve
bcd856d7b2 Avoid not needed enet modification.
Link needed libraries in cmake file in the same way as mingw build.
2018-05-21 21:23:45 +02:00
Benau
34b8a07d80 Add proper line breaking 2018-05-21 11:19:18 +08:00
Deve
f2325e9140 Grab mouse on linux when panning is enabled 2018-05-18 22:35:54 +02:00
Deve
15f79b0f95 Add key binding for azerty layout 2018-05-09 21:11:24 +02:00
Deve
fe42da5b04 Avoid conflicts with key codes when fallback keycode is used 2018-05-08 21:59:11 +02:00
Deve
78d9f2065c Add some key names for azerty layout 2018-05-08 21:22:46 +02:00
hiker
b1013f6030 Merge remote-tracking branch 'origin/network_improvements' into game_protocol 2018-03-31 00:38:57 +11:00
Deve
0471202c9c Fixed stupid isAccelerometerActive condition 2018-03-20 20:55:26 +01:00
Deve
38a4e06a6c Avoid window size to be larger than available space.
When window size is equal to screen resolution and user selected windowed mode, we can assume that he wants maximized window.
2018-03-14 22:47:31 +01:00
Deve
022dd68a17 Some fixes for gamepad on android 2018-03-06 23:23:15 +01:00
Deve
e00074cb14 Some work on gamepad support on android.
Still it works only for single gamepad, but at least it's preconfigured and google shouldn't complain about stupid button names.
2018-03-06 00:19:01 +01:00
Deve
4157eef894 Get device orientation only if accelerometer is used 2018-03-02 21:38:15 +01:00
Benau
43cf29af86 Merge remote-tracking branch 'origin/network_improvements' 2018-03-02 17:39:16 +08:00
Deve
0ee00ad1e5 Make accelerometer values relative to device orientation 2018-02-28 22:01:30 +01:00
Deve
6b4fb50876 Convert tabs to spaces 2018-02-27 23:24:29 +01:00
Deve
36c6ea52ae Allow to detect device rotation for better accelerometer support 2018-02-27 23:24:29 +01:00
Benau
6536a311b3 Allow logging save only to a file 2018-02-27 13:22:58 +08:00
Deve
bfb862645d Print some debug info 2018-02-14 22:28:55 +01:00
hiker
b3243a3589 Merge branch 'speed-cap-to-physics' 2018-02-09 09:38:34 +11:00
Deve
a18351c052 Some fixes for gamepad buttons 2018-02-08 22:34:53 +01:00
Deve
5e8343a068 Add basic gamepad support for android 2018-02-08 01:24:35 +01:00
hiker
2e3e594967 Merge remote-tracking branch 'origin/master' into speed-cap-to-physics 2018-02-06 11:27:02 +11:00
Deve
8742420c23 Allow to navigate with dpad 2018-02-05 22:54:50 +01:00
hiker
884e966ab9 Added capability to handle setting the maximum speed first to 0, and then
later to a higher value (which happens in overworld, which sets max speed
to 0, but the value got later overwritten with the normal supertuxkart max_speed
handling.
2018-02-05 16:11:19 +11:00
Deve
48cde3e041 Try to create 32bit visual for gles if 24bit failed.
People need it for Odroid boards.
2018-02-02 22:15:31 +01:00
Deve
50ad5eed33 Try to fix VS build 2018-01-30 23:44:55 +01:00
Deve
4529189048 Upgrade enet 2018-01-30 23:10:30 +01:00
leper
47dc4bdbaa Remove enet modifications. Fixes #21. 2018-01-30 22:06:07 +01:00
Deve
853084e75a Fixed mingw compilation 2018-01-29 22:14:43 +01:00
Deve
3345fa6e51 Try to fix travis.
It reverts commit:
https://sourceforge.net/p/angelscript/code/2278/

It looks that it's impossible to detect "real" clang version using compiler definitions, so that we can't check if std::is_trivially_default_constructible is available.

I mean that clang 4.0 on my machine is "newer" than clang 5.0 on travis, because it tries to use gcc 4.8 headers:

/usr/lib/gcc/*x86_64-linux-gnu/4.8*/../../../../include/c++/4.8/type_traits:1211:12:
note: 'has_trivial_default_constructor' declared here
    struct has_trivial_default_constructor

At this stage we can just disable AS_CAN_USE_CPP11 for clang. It was disabled for clang before our angelscript upgrade, so that it's not worse than before.

Note that I don't use clang and I don't really know what are our requirements (for example for Mac OS build). Feel free to revert it after travis upgrade.
2018-01-29 20:48:15 +01:00
Deve
5aaf3a9c39 Comment out unused wayland code to avoid compilation errors with clang 2018-01-26 21:41:39 +01:00
Deve
4802c4d11c Avoid cmake warning 2018-01-26 21:20:33 +01:00
Igor Gnatenko
aec7ca0ce9 libs: update angelscript to 2.32.0
Fixes: https://github.com/supertuxkart/stk-code/issues/2528
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-01-26 21:19:01 +01:00
Deve
effa23d952 Some minor fixes in linux device 2018-01-15 23:15:27 +01:00
Benau
813b08bc73 Fix #3091 2018-01-14 10:19:37 +08:00
Benau
59045cd064 Merge remote-tracking branch 'origin/master' 2018-01-13 15:44:57 +08:00
Deve
e46a18ab61
Merge pull request #3060 from akien-mga/update-glew
GLEW: Update to pristine upstream 2.1.0
2018-01-13 00:22:18 +01:00
Deve
f220bb14f4 More improvements in wayland device 2018-01-12 22:31:21 +01:00
Benau
b1f1afb9c5 Use SSE2 in windows build for faster libsquish 2018-01-12 17:47:18 +08:00
Deve
6f4c1f41da More work with xdg shell 2018-01-11 19:03:01 +01:00
Benau
7859a00967 Remove unused mesh code 2018-01-11 13:38:08 +08:00
Benau
68ceceb6e3 Remove unused texture code 2018-01-11 12:47:02 +08:00
Deve
55ea7625b3 Create xkb context before registry listener is created 2018-01-10 22:05:27 +01:00
Deve
4f9b46b20c More work with xdg_shell 2018-01-10 21:31:54 +01:00
Deve
74b071494c Some work on xdg shell support 2018-01-09 23:41:34 +01:00
Deve
b17920cf4c Use server-side decorations for KDE wayland for now 2018-01-08 23:08:23 +01:00
Deve
f7654d3867 Fixed a crash with disabled repeating keys on wayland 2018-01-08 21:12:50 +01:00
Deve
5af835505c Don't send too many useless events on touch move 2018-01-07 23:49:39 +01:00
Deve
9afbf9a772 Don't return fatal error if wayland libraries are not found 2018-01-07 21:11:37 +01:00
Deve
6ce1573cfd Some cleanup 2018-01-07 02:22:58 +01:00
Deve
b0afa6ab3d Add srgb attrib in egl only if requested 2018-01-07 02:22:58 +01:00
Deve
f6111d04fd Use explicit display type in egl if possible. 2018-01-07 02:22:58 +01:00
Benau
5293a0dbef Add b3d loader for SP 2018-01-06 12:07:22 +08:00
Benau
590850eacf Add dynamic draw call for skidmarks 2017-12-28 16:14:09 +08:00
Deve
87d43063ed Assume that "HandleSRGB == false" means "don't care".
It solves the issue with nvidia when HandleSRGB is set to false.
2017-12-25 23:59:49 +01:00
Benau
7797115867 Add SP for correct normal and easier shader system 2017-12-25 14:00:10 +08:00
Benau
3607c7d520 Adjust irrlicht CSkinnedMesh class for .spm
The last frame in .spm is usable
2017-12-02 15:24:05 +08:00
Benau
2161efd9c4 Allow configure animation set through scripting 2017-12-02 02:36:43 +08:00
Rémi Verschelde
2a093cde0a GLEW: Update to pristine upstream 2.1.0
Previous version was a modified GLEW 1.11.0 (2014). The STK modifications meant
to address https://sourceforge.net/p/glew/patches/40/ which is now fixed since
GLEW 2.0.0.

Here's the diff between pristine 1.11.0 and STK's version before this patch:
```diff
diff --git a/lib/glew/src/glew.c b/lib/glew/src/glew.c
index a78f14e1e..f8df0d758 100644
--- a/lib/glew/src/glew.c
+++ b/lib/glew/src/glew.c
@@ -296,30 +296,6 @@ static GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuin
   return GL_FALSE;
 }

-#include <string.h>
-#include <stdlib.h>
-
-/* A simple open addressing hashset for extensions on OpenGL 3+. */
-static const char ** ext_hashset = NULL;
-size_t ext_hashset_size = 0;
-
-static unsigned hash_string(const char * key)
-{
-  unsigned hash = 0;
-  unsigned i = 0;
-  for (; i < strlen(key); ++i)
-  {
-    hash += key[i];
-    hash += (hash << 10);
-    hash ^= (hash >> 6);
-  }
-  hash += (hash << 3);
-  hash ^= (hash >> 11);
-  hash += (hash << 15);
-
-  return hash;
-}
-
 /*
  * Search for name in the extensions string. Use of strstr()
  * is not sufficient because extension names can be prefixes of
@@ -328,37 +304,14 @@ static unsigned hash_string(const char * key)
  */
 static GLboolean _glewSearchExtension (const char* name, const GLubyte *start, const GLubyte *end)
 {
-  if (ext_hashset != NULL)
+  const GLubyte* p;
+  GLuint len = _glewStrLen((const GLubyte*)name);
+  p = start;
+  while (p < end)
   {
-    unsigned hash = hash_string(name);
-
-    /*
-     * As the hashset is bigger than the number of extensions
-     * this will eventually break.
-     */
-    while(1)
-    {
-        unsigned index = hash % ext_hashset_size;
-        if (ext_hashset[index] == NULL)
-            break;
-
-        if (!strcmp(ext_hashset[index], name))
-            return GL_TRUE;
-
-        hash++;
-    }
-  }
-  else
-  {
-    const GLubyte* p;
-    GLuint len = _glewStrLen((const GLubyte*)name);
-    p = start;
-    while (p < end)
-    {
-      GLuint n = _glewStrCLen(p, ' ');
-      if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE;
-      p += n+1;
-    }
+    GLuint n = _glewStrCLen(p, ' ');
+    if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE;
+    p += n+1;
   }
   return GL_FALSE;
 }
@@ -10099,13 +10052,9 @@ static GLboolean _glewInit_GL_WIN_swap_hint (GLEW_CONTEXT_ARG_DEF_INIT)
 /* ------------------------------------------------------------------------- */

 GLboolean GLEWAPIENTRY glewGetExtension (const char* name)
-{
+{
   const GLubyte* start;
   const GLubyte* end;
-
-  if (ext_hashset != NULL)
-      return _glewSearchExtension(name, NULL, NULL);
-
   start = (const GLubyte*)glGetString(GL_EXTENSIONS);
   if (start == 0)
     return GL_FALSE;
@@ -10165,39 +10114,9 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
     GLEW_VERSION_1_2   = GLEW_VERSION_1_2_1 == GL_TRUE || ( major == 1 && minor >= 2 ) ? GL_TRUE : GL_FALSE;
     GLEW_VERSION_1_1   = GLEW_VERSION_1_2   == GL_TRUE || ( major == 1 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
   }
-
-  if (major >= 3) /* glGetString method is deprecated */
-  {
-    GLint n, i;
-    glGetIntegerv(GL_NUM_EXTENSIONS, &n);
-    glGetStringi = (PFNGLGETSTRINGIPROC)glewGetProcAddress((const GLubyte*)"glGetStringi");
-
-    free(ext_hashset); /* In case we get called a second time. */
-
-    ext_hashset_size = (n * 3) / 2;
-    ext_hashset = calloc(ext_hashset_size, sizeof(const char *));
-    for (i = 0; i < n; ++i)
-    {
-      const char * extension;
-      unsigned hash;
-
-      extension = (const char *)glGetStringi(GL_EXTENSIONS, i);
-      hash = hash_string(extension);
-
-      while(ext_hashset[hash % ext_hashset_size] != NULL)
-        hash++;
-
-      ext_hashset[hash % ext_hashset_size] = extension;
-    }
-
-    extStart = 0;
-  }
-  else
-  {
-    /* query opengl extensions string */
-    extStart = glGetString(GL_EXTENSIONS);
-  }

+  /* query opengl extensions string */
+  extStart = glGetString(GL_EXTENSIONS);
   if (extStart == 0)
     extStart = (const GLubyte*)"";
   extEnd = extStart + _glewStrLen(extStart);
@@ -14064,9 +13983,6 @@ GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
   GLXEW_VERSION_1_2 = GL_TRUE;
   GLXEW_VERSION_1_3 = GL_TRUE;
   GLXEW_VERSION_1_4 = GL_TRUE;
-  /* Check if GLX display is available */
-  if (glXGetCurrentDisplay == NULL || glXGetCurrentDisplay() == NULL)
-    return GLEW_OK;
   /* query GLX version */
   glXQueryVersion(glXGetCurrentDisplay(), &major, &minor);
   if (major == 1 && minor <= 3)
```
2017-11-22 12:04:46 +01:00
Deve
252403c9cc Avoid semi-transparent window on some compositors 2017-11-10 22:48:48 +01:00
Deve
3baefcd6a7 Initialize FeatureAvailable array to false for legacy pipeline.
It has been broken in commit 271a26eaf0.

It solves some issues with etnaviv gallium driver. It may also solve a crash on old intel 965gm on windows, but I can't test it atm.
2017-11-07 22:54:36 +01:00
Benau
b28574eb46 Fix b3d with more than 4 weights per vertex 2017-10-25 13:11:54 +08:00
Benau
fc2e05c0a6 Use a trick to make skinned mesh shader branchless 2017-10-22 13:03:45 +08:00
Benau
7252a38da1 Fix skinning glitches possible in (some) cards 2017-10-22 02:17:37 +08:00
Benau
0d96906d54 Use texture buffer (texture2d in gles) for skinning 2017-10-19 13:31:07 +08:00
Benau
fa48d099f2 Fix the remaining msvc warnings 2017-10-17 10:51:52 +08:00
Benau
88e15147b8 Merge remote-tracking branch 'origin/win-64bit' 2017-10-17 00:55:22 +08:00
Deve
1a250c5b74 Hopefully fixed rare crash in createVideoModeList.
Assume that the window was null.
2017-09-30 23:43:29 +02:00
Deve
34a3207f91 Fixed android compilation 2017-09-27 23:20:35 +02:00
Deve
afbdbaeee8 Remove unused files.
Both Console and FB don't work with opengl driver. And the software driver is not even included in stk sources. So I don't think that it will be ever used.
2017-09-27 23:07:44 +02:00
Deve
de116c7e4c Fixed possible issue with changing resolution 2017-09-27 22:24:40 +02:00
Deve
e2c0f83fb0 Move patform specific code from irr_driver to irrlicht devices 2017-09-27 17:37:56 +02:00
Benau
3cd2f403e0 Force re-skin when getMesh with hardware skinning on
Actually spm has a built in way to use mesh without bothering bind
pose
2017-09-20 01:27:52 +08:00
Deve
71334bac5b Move xrandr to irrlicht cmake file and also fixed indentations 2017-09-18 22:14:43 +02:00
Deve
66cebbdbe7 Add cmake scripts that find egl and wayland libraries 2017-09-18 21:50:34 +02:00
Deve
f6fa44f0df Request srgb colorspace on wayland 2017-09-17 21:51:07 +02:00
Deve
e615ff67d6 Don't use gl functions that are not available in core context.
Fixes some driver warnings.
2017-09-12 23:49:35 +02:00
Deve
dec9948d0b Make sure we don't write out of array.
It shouldn't happen, but code below assumes that visualAttrBuffer has its full size, so just in case...
2017-08-23 00:13:57 +02:00
Deve
b03e108902 Handle a case when request for srgb-capable framebuffer failed.
It fixes #2902.
2017-08-22 23:53:04 +02:00
Benau
a00b878919 Use transposed matrix everywhere 2017-08-17 01:26:08 +08:00
hiker
f3d56b37df Merge branch 'master' into win-64bit 2017-08-16 17:29:57 +10:00
Benau
3031fabcf9 Add spm loader 2017-08-16 13:48:27 +08:00
hiker
5a2b92d79d Merge branch 'master' into improve-xbox-gamepad-support 2017-08-14 10:05:26 +10:00
Deve
71bbafadbd Fixed memory leaks in gles 2017-08-13 22:02:55 +02:00
Deve
ee5bdad926 Move output/seat listener to better place 2017-08-13 01:38:21 +02:00
Deve
fd4ab9d88f Fixed possible uninitialized variable in gles renderer 2017-08-13 01:38:21 +02:00
Deve
cf868df93f Fixed memory leaks in wayland device 2017-08-13 01:38:21 +02:00
hiker
5b68e18df4 Fix cygwin support. 2017-08-11 09:38:58 +10:00
hiker
86d5e11c13 Merge branch 'improve-xbox-gamepad-support' of github.com:supertuxkart/stk-code into improve-xbox-gamepad-support 2017-08-09 20:32:13 +10:00
hiker
e03c0849ce Fixed previous commit - got confused with the #undef :P 2017-08-09 20:30:44 +10:00
hiker
d46b03b317 Hopefully fixed cygwin build problems. 2017-08-09 17:54:29 +10:00
Benau
ea97258b65 Add scripting code for throwing banana monkeys 2017-08-09 12:23:37 +08:00
hiker
6f5b1d2a55 Merge branch 'improve-xbox-gamepad-support' of github.com:supertuxkart/stk-code into improve-xbox-gamepad-support 2017-08-09 10:23:52 +10:00
hiker
11a587dd30 Merge branch 'improve-xbox-gamepad-support' of github.com:supertuxkart/stk-code into improve-xbox-gamepad-support 2017-08-09 10:15:35 +10:00
hiker
c3cd7ceaa2 Merge branch 'master' into improve-xbox-gamepad-support 2017-08-08 23:08:14 +10:00
hiker
b440511c95 Fixed incorrect right thumbstick mapping. 2017-08-08 21:55:28 +10:00
hiker
bd5eb89cc0 Use XInput 9.1 which does not need an installer and works on most
windows platforms. Move the linking to irrlicht cmake.
2017-08-08 21:44:32 +10:00
hiker
e6c2c3df95 Revert to using guidProduct for all existing code, but the correct guidInstance
for detecting XInput devices only.
2017-08-07 09:15:09 +10:00
hiker
891e439264 Remapped XInput to be the same as DirectInput buttons, so that
existing configs works as expected. Hard-coded 6 axis for xbox
controller to allow for triggers to be reported as two different
axis (instead of as one axis). Updated gamepad config to use
proper names for triggers.
2017-08-06 22:56:59 +10:00
hiker
68d41a07ba Now actually use XInput to read the joystick events for all
XInput devices.
2017-08-05 00:34:51 +10:00
hiker
f431730278 Fixed recognition of XInput devices. 2017-08-05 00:12:22 +10:00
hiker
d3da93f368 Try to use a Microsoft function to detect XInput devices when using
DirectInput - atm not working yet :(
2017-08-03 09:24:50 +10:00
Deve
1d2ff0bc47 Remove more unused files 2017-08-02 22:03:01 +02:00
Qwerty Chouskie
14ea69dc90 Cleanup V2 2017-08-02 09:29:15 -07:00
hiker
22208365d2 Switch to direct input for joystick handling. 2017-08-02 08:13:24 +10:00
hiker
1e5d2643be Bugfix: incorrect index. 2017-08-02 08:13:04 +10:00
hiker
cc6a1a3909 Started to add XInput support (to be able to distinguish the two
triggers).
2017-08-01 17:48:18 +10:00
hiker
85ee217d77 Converted tab to spaces. 2017-08-01 17:19:52 +10:00
Deve
09a735c25e Use key names in android device too 2017-07-20 22:58:12 +02:00
Deve
7a92708fd3 Use key names in wayland device 2017-07-20 22:58:12 +02:00
Deve
0dba3c8f67 Add a prefix to irrlicht key codes 2017-07-20 22:58:11 +02:00
Deve
1fd6a8aa86 Make sure that we are not using files from our zlib/libpng when STK is compiled with shared libraries.
It's possible that STK was using these files for compilation when cmake was run from main directory. In this case compiled files are stored in stk-code/lib, so that CMAKE_CURRENT_BINARY_DIR is stk-code/lib/irrlicht rather than stk-code/build/lib/irrlicht and we include whole lib/libpng rather than non-existing directory.
2017-07-10 21:14:28 +02:00
Deve
9b7f3d70dd One more place where we were linking with glu.
It doesn't really matter, but it's better that our linux package doesn't depend on it.
2017-07-05 21:49:31 +02:00
Deve
2bf99aef1d Remove useless gles defines from irrlicht cmake file 2017-07-04 23:32:57 +02:00
Deve
c6ea07eacc Remove unused gles 1.0 code 2017-07-04 23:30:09 +02:00
Deve
09262a606b Add missing copyright.
The EGL context manager has been written from scratch, so our copyright should be fine.
2017-07-04 22:55:08 +02:00
Deve
f672088a04 Tweak closing android device 2017-07-04 22:43:11 +02:00
Deve
23277066a4 Some fixes for egl config.
Added a fallback with basic configuration if requested config failed.
Also better check if choose config is success (num_configs can be >0 even if egl config is null)
2017-06-24 21:39:58 +02:00
Deve
78b9b92efa Fixed gles compilation.
We include CIrrDeviceLinux in our edit box widget and it doesn't respect irrlicht cmake flags, so that it tries to include opengl headers even if we selected gles renderer. Just move it to the cpp file to avoid redeclaration errors.
2017-06-23 23:51:33 +02:00
Deve
72358371f7 Some fixes for video mode list on android.
Should be a bit safer when user wants to close the game very early (i.e. when assets are extracting) and we get destroy event before irr_driver is actually initialized.
2017-06-19 22:59:27 +02:00
Marianne Gagnon
e4f2d0b1d5 Fix OS X build following libpng upgrade 2017-06-05 20:52:46 -04:00
Deve
15ce5b4ebf Fixed windows compilation 2017-06-05 21:54:44 +02:00
Deve
ccf3893abb Apply our modifications to libpng cmake script 2017-06-05 21:16:22 +02:00
Deve
9ebdb5fd00 Update libpng to newer version in order to fix some vulnerabilities.
I decided to just make a bug-fix update and keep the 1.5.x series because newer versions may also need the zlib update.
2017-06-05 21:10:38 +02:00
Deve
37a2752162 Use newer seat version if possible 2017-05-31 23:47:19 +02:00
Deve
212411fb49 Allow to repeat keys 2017-05-31 22:31:46 +02:00
Deve
d6e5e04666 One more tweak 2017-05-31 22:29:28 +02:00
Deve
c13f812290 Simplify previous commit and also fix the double egl context deletion 2017-05-30 21:39:30 +02:00
Deve
26a6c49fc1 Add missing break 2017-05-30 00:34:39 +02:00
Deve
e00995d099 Allow to use GLES renderer with Wayland device.
It would be nice to simplify it a bit, i.e. decide if OpenGL context should be created on device side or driver side, use single constructor in GLES driver etc... But I'm not really sure how it will look like after Benau's space partitioning work, so some refactoring postponed till later.
2017-05-30 00:30:00 +02:00
Deve
c8137fc0fa Add a possibility to set a window class in irr device.
This makes one ugly #ifdef less in the irr_driver.cpp.
2017-05-25 21:26:31 +02:00
Deve
b5f2e4d163 Allow to set window caption 2017-05-25 20:49:10 +02:00
Deve
0c18090669 Minor simplifications for keyboard on wayland 2017-05-25 17:27:08 +02:00
Deve
8989cc97b5 Some fixes for keyboard on wayland 2017-05-24 01:17:25 +02:00
Deve
bc25bc4435 Keep consistency with other irrlicht defines 2017-05-18 20:48:42 +02:00
Deve
abde57cd4a Add mouse wheel event 2017-05-17 22:44:22 +02:00
Deve
36368041ee Mostly cleanup and style modifications 2017-05-17 22:43:56 +02:00
Deve
f99bc25845 Avoid semi-transparent window 2017-05-15 21:17:03 +02:00
Deve
961ac4d79e Better fix for glew 2017-05-14 00:06:54 +02:00
Deve
1966d3f072 Use x11 functions in irr_driver only if x11 device was created 2017-05-14 00:05:36 +02:00
Deve
da802d836d Some fixes for mouse cursor. 2017-05-12 22:58:33 +02:00
Deve
ba39e88680 Update cursor when visibility is changed 2017-05-12 21:47:51 +02:00
Deve
23c428160f Some fixes 2017-05-12 00:57:01 +02:00
Deve
70dc99ca6c Fixed some non-working keys.
We can't include linux/input.h because it breaks irrlicht keys.
2017-05-06 23:25:00 +02:00
Deve
632a759ee6 Allow to choose device type using environmental variable 2017-05-06 22:38:05 +02:00
Deve
e02a8f4448 Allow to make single build with both x11 and wayland device 2017-05-06 21:53:32 +02:00
Deve
2f1b61b798 Remember mouse button states 2017-05-05 23:04:18 +02:00