Commit graph

77 commits

Author SHA1 Message Date
Stephen Saunders
2ffb89c80e Fix builtin/VR case sensitivity on linux, fix r_useValidationsLayers on macOS when USE_MoltenVK set 2022-10-23 08:45:53 -04:00
Stephen Saunders
86bcffdd00 Build / Source changes for NVRHI on SDL, source cleanup for clang C++17 std, initial macOS NVRHI implementation 2022-10-21 23:46:42 -04:00
Robert Beckebans
f1139f7a33 Fixed unknown event 772 error on Linux 2022-05-09 14:07:19 +02:00
Robert Beckebans
c23709c2db Formatted code with Astyle 2022-02-12 12:55:46 +01:00
Stephen Saunders
0c6e72be37 Improve Vulkan instance extension setup, add Vulkan instance and driver info to gfxInfo
(cherry picked from commit 631358eda14468bdc3f8dd5c0ed7998b8e0be0eb)
2022-01-19 23:40:45 -05:00
Stephen Saunders
c80d601276 Remove all X11_XCB platform-specific code from RBDoom3BFG 2021-07-30 14:08:44 -04:00
Robert Beckebans
d430f6a1fd Astyle 2021-07-08 08:40:03 +02:00
Stephen Saunders
041db6b348 Capture mouse properly on macOS when outside of window, fixes issue #584 2021-06-15 01:53:35 -04:00
Robert Beckebans
dbbcea94c5 Pull request cleanup 2021-04-29 16:32:15 +02:00
Robert Beckebans
0964c02bcf Ran Astyle 2021-04-29 15:20:45 +02:00
Stephen Saunders
0aae6f0902 macOS support for OpenGL and MoltenVK, demo recording/playback improvements 2021-04-19 14:32:52 -04:00
Robert Beckebans
af701aea33 Vulkan works on Kubuntu 19.10, g++ and open source drivers for the AMD RX 580 2020-03-22 15:29:24 +01:00
Robert Beckebans
bcb61ce306 Applied Astyle 2020-03-22 12:23:52 +01:00
Eric Womer
596fbb18ca RenderBackend.h:
* Renamed vkwindow to sdlWindow in struct vulkanContext_t to matche the rest of the struct naming conventions.

Image_VK.cpp:
  * disabled printing "Vulkan Image alloc " to the terminal, flooding it
  with data

RenderBackend_VK.cpp:
  * Re-enabled r_vkEnableValidationLayers enabling/disabling Vulkan
  validation checking, I had it hard-coded to true for testing reasons.
  * static void DestroySwapChain():
    * I don't know if the changes I introduced here are helping or not,
    or even doing anything, so this part can be ignored or changed back.
  * GL_StartFrame() and GL_BlockingSwapBuffers():
    * VkResult for these two functions, vkAcquireNextImageKHR and
    vkQueuePresentKHR, don't need to return VK_SUCCESS for the
    application to be valid, so handle them differently here. There may
    be others like this, but I don't know.

qvk.h:
  * Since VK_USE_PLATFORM_* is defined in the CMakeLists.txt file, for
  now anyways, use them to wrap the correct platform headers instead of
  defining them here.

sdl_vkimp.cpp:
  * Some debug printing changes, from GL to Vulkan, since this is for
  the Vulkan API.
2020-01-01 14:31:28 -05:00
Eric Womer
e9ef21ce5c SDL2/Vulkan on Linux, still broken for Doom3BFG 2019-12-30 15:20:15 -05:00
Eric Womer
528da79001 Merge branch 'kung' into vulkan-merge-2 2019-12-29 12:14:29 -05:00
Eric Womer
f1e650e2c4 Applying KungFuJesus's patch from
https://github.com/RobertBeckebans/RBDOOM-3-BFG/issues/398#issuecomment-569442019
2019-12-29 11:12:34 -05:00
Robert Beckebans
4a6af2d609 Applied new Astyle settings 2019-11-11 20:27:44 +01:00
Robert Beckebans
eb60a374fe Fixed Linux build under Kubuntu 18.10 2019-10-04 11:56:37 +02:00
Robert Beckebans
a884b08010 Astyle 2016-05-10 09:55:37 +02:00
Ivan Vashchaev
3171686814 Support SDL2 GameController API
On OS X DualShock4 works perfectly
2016-02-12 20:53:24 +03:00
Daniel Gibson
0fbf83fa49 Implemented Sys_[SG]etClipboardData() for SDL backend
SDL2 only, SDL1.2 doesn't have functions to handle the clipboard
2015-08-02 19:23:26 +02:00
Daniel Gibson
90b1ff0b65 Format Code with AStyle 2.05.1 2015-02-09 00:29:57 +01:00
Robert Beckebans
4c596dcf0d Fixed Gamepad LS and RS in PDA screen. refs #214 2015-02-05 20:11:09 +01:00
Daniel Gibson
015748f823 SDL backend: generate SE_MOUSE_LEAVE events
The SDL backend now creates SE_MOUSE_LEAVE events when the mouse leaves
the window (both SDL1.2 and SDL2). For some reason, both the SWF GUI
backend and CEGUI are interested in this.
2015-01-28 17:32:35 +01:00
Daniel Gibson
aa51d38b3c Support up to 16 mouse buttons (SDL-only)
Mostly necessary because SDL doesn't properly return mouse buttons X1/X2
on Linux/X11, see https://bugzilla.libsdl.org/show_bug.cgi?id=2310

Not sure if this is possible with Windows, DIMOFS_BUTTON7 seems to be
the highest constant there.

Also passing sdlevent.wheel.y directly as scroll delta
2015-01-28 17:32:35 +01:00
Daniel Gibson
65d1428dd1 Make Unicode input work for SDL
The d3bfg internal SE_CHAR events were documented as "evValue is an
ascii char", but are actually at least UTF-16, as returned by
Windows WM_CHAR events.
We now assume it's UTF-32 (UTF-16 has the same values mostly)
and the SDL backend now puts UTF-32 chars into SE_CHAR events.

In the Windows backend I make sure that no surrogate UTF-16 chars are
emitted + I added support for WM_UNICODE messages.

Now I can input Ümläuts intö the conßole window \o/
2015-01-28 17:32:35 +01:00
Robert Beckebans
d691002296 Bumped engine version to 1.0.3 to prepare for new release 2015-01-18 12:13:24 +01:00
Daniel Gibson
e37671d6ac Change SDL event-handling, mostly for keyboard input
Sys_GetEvent()
* renamed res_none to no_more_events, because that's what the
  caller assumes when getting that event
* don't return res_none on unhandled events, instead get the next event
  until there is a handled event or no more events
  (=> if -> while, return res_none -> continue)
* Mapping to Doom3 keynum handled differently for SDL1 vs SDL2, see below

For SDL2 we don't use SDL_KeyToDoom3Key on the keysym anymore, but map
the SDL2 scancode to Doom3/Direct-Input scancodes instead (the keynum_t
K_* constants are really used as scancodes!).

This mapping is done in sdl2_scancode_mappings.h scancodeToKeyNum[].
In sdl_events.cpp there are static SDLScanCodeToKeyNum() and
KeyNumToSDLScanCode() functions that use this scancodeToKeyNum[] array.

Sys_GetKeyName() now does something sensible for SDL2 by using
KeyNumToSDLScanCode()

This is also used to implement idKeyInput::LocalizedKeyName() for SDL-targets
(for SDL1.2 the behavior doesn't change much, though, as it doesn't have
consistent scancodes - Sys_GetKeyName() will just return NULL and
idKeyInput::LocalizedKeyName() will fall back to the old default)
2015-01-06 21:22:12 +01:00
Daniel Gibson
b9f5d20e93 improved SDL2 textinput handling
strdup() and free() aren't really the right tool if the size of the
buffer is known anyway (and quite small, currently 32 chars)
while at it, I renamed s and s_pos to str and str_pos for better
readability
2015-01-06 21:21:58 +01:00
Robert Beckebans
940d9f8a06 Formatted Code with AStyle 2014-11-25 11:42:08 +01:00
Wintermute0110
bc6cab3ab0 * SDL joystick/gamepad support implemented and working.
* Tested in Linux with both XBox360 wireless and Logitech F710 gamepads.
Should work with any XBox gamepad clone wired/wireless.
* Works well using SDL 1.2 or SDL 2.0
* SDL scan values are currently hard-coded. Note sure how to implement
remapping at the moment (config file, GUI, ...).
2014-11-21 02:47:21 +09:00
Robert Beckebans
d295a6aea9 Disabled usage of OpenGL 3.2 compatibility profiles for Linux #187 2014-11-12 12:34:07 +01:00
Robert Beckebans
f9ff46d03d Removed include of SDL_syswm.h because it creates problems on Kubuntu 14.04 with Mir 2014-08-20 00:30:39 +02:00
Robert Beckebans
05248cce6d AStyle 2014-05-20 09:29:08 +02:00
Radegast
764b067825 Avoid 'unknown event' spam when testing with touchpad. #87 2014-05-19 15:52:33 +01:00
Radegast
812fb78d52 Initial OS X support. #87 2014-05-18 23:14:28 +01:00
Robert Beckebans
0ca7667fd2 Removed glewExperimental = GL_TRUE hack for SDL 2 2014-05-11 12:28:29 +02:00
Robert Beckebans
12fd563fce Merge branch 'advanced-renderer-upgrades' of github.com:RobertBeckebans/RBDOOM-3-BFG into advanced-renderer-upgrades 2014-05-10 15:30:55 +02:00
Robert Beckebans
ade5c434f8 Replaced QGL with GLEW in sdl_glimp.cpp 2014-05-10 15:30:48 +02:00
Robert Beckebans
485417ab41 Removed obsolete sdl_qgl.cpp and fixed some compile errors 2014-05-10 15:29:59 +02:00
Robert Beckebans
3b19aa7991 Added glConfig.vendorType settings for Linux and disabled unused shaders. #90 2014-04-20 17:20:50 +02:00
Robert Beckebans
a315630d7d Changed astyle-code.sh script to use the system astyle which is 2.03 on Kubuntu 13.10 2014-02-23 15:19:11 +01:00
Christoph Korn
264ffcb6f7 Fix typos
Just fix some typos.
2013-12-31 02:23:16 +01:00
Jonathan Young
b3983e582a astyle 2013-09-21 19:37:12 +10:00
Daniel Gibson
1f5579a697 Fix compilation with SDL2 Release
.. they removed ev.key.keysym.unicode - but checking for
SDL_SCANCODE_GRAVE is better anyway to handle console key
2013-08-13 23:08:48 +02:00
Robert Beckebans
cbd696cc67 Merge remote-tracking branch 'DanielGibson/improve-threading' 2013-03-26 09:58:14 +01:00
Robert Beckebans
dcae311b7f Renamed in_kbd to in_keyboard 2013-03-26 09:56:48 +01:00
Daniel Gibson
ae02bb54a1 Make it compile with SDL2 again
For some reason SDL.h (or headers included by it) need some
string functions (like strncmp) in inline-functions (that we
don't even use).
Str.h has #defines preventing their usage.. so #undef those in
the (few) sourcefiles that need SDL headers
2013-03-24 23:44:13 +01:00
Daniel Gibson
5001b49841 try to fix console deadkey problem 2013-03-16 14:32:47 +01:00