Commit graph

162 commits

Author SHA1 Message Date
Robert Beckebans
d394ae186f Replaced DOOM 3 BFG icon 2021-02-25 19:30:07 +01:00
Robert Beckebans
c0376eacaf Merged some smaller bugfixes from Stephen's branch 2021-02-20 12:03:11 +01:00
Robert Beckebans
58607c2cca Changed r_useOpenGL45 default to 1 on Win and updated docs 2021-02-17 20:52:36 +01:00
Robert Beckebans
72cf7cef86 Smaller potential crashfixes from SS2 engine 2020-12-23 21:02:38 +01:00
Robert Beckebans
c8af9c3b0e Fixed savegame size problem with some user maps 2020-11-06 17:46:29 +01:00
Robert Beckebans
9349b280cc Applied astyle formatting 2020-11-05 01:32:50 +01:00
LWSS
4cd232ca20 GetClockTicks() - keep other arch in mind 2020-10-01 14:59:11 -07:00
LWSS
65f7a305c1 Fix cpu clock-hz inaccuracy on linux 2020-10-01 02:28:58 -07:00
Robert Beckebans
3960b88cc4 Applied Astyle 2020-07-14 18:42:45 +02:00
Robert Beckebans
eeff8100e0 Merge branch 'master' into PBR2 2020-07-14 18:40:48 +02:00
IISergII
7e25d69608 platform_linux.cpp: Added sysconf use for s_numPhysicalCPUCores
when parsing /proc/cpuinfo fails, an alternative method will be used - sysconf() to get s_numPhysicalCPUCores value
2020-06-03 21:52:44 +03:00
Robert Beckebans
6f36e42a43
Merge pull request #399 from shmerl/master
Support XDG base directory specification
2020-05-31 23:02:39 +02:00
Robert Beckebans
f97bfe3eb4 Don't try to create an OpenGL 5.0 context ... 2020-03-28 17:53:39 +01: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
7145d9b3f1 Compiling/Linking/Running, but no rendering, there is audio. glConfig as
a temp fix for the surfaces having a width and height of 0 since
renderSystem->getHeight()/getWidth() access
glConfig.nativeResolutionHeight/Width directly.
2019-12-29 17:05:33 -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
527b1fbfd5 Applied new AStyle settings 2019-11-19 21:33:59 +01:00
Robert Beckebans
08cb9730e3 Merge branch 'master' into vulkan 2019-11-19 21:29:16 +01:00
Robert Beckebans
4a6af2d609 Applied new Astyle settings 2019-11-11 20:27:44 +01:00
Jeffrey N. Johnson
07aa70f27e These changes allow the use of C++11. 2019-11-10 12:33:53 -08:00
Robert Beckebans
a3e8b52170 Ported ImGui light editor from OpenTechBFG 2019-10-28 15:39:00 +01:00
Robert Beckebans
eb60a374fe Fixed Linux build under Kubuntu 18.10 2019-10-04 11:56:37 +02:00
Robert Beckebans
8cdc4aa99c Try to run with OpenGL 4.5 core profile by default on Windows 2018-11-02 13:35:02 +01:00
Robert Beckebans
f180da6f63 Merged more Vulkan code from vkneo 2018-10-05 21:43:55 +02:00
Robert Beckebans
a7d5c16e0a Vulkan CreateInstance Hello World 2018-10-04 00:30:20 +02:00
Robert Beckebans
a917b8c258 Stubbed out all OpenGL code 2018-10-03 23:40:35 +02:00
Robert Beckebans
3d9f9b75db Deleted almost all OpenGL code from _VK backend files 2018-10-03 21:14:28 +02:00
Robert Beckebans
2f3169179a Merge branch 'master' into vkdoom3-merge 2017-09-10 13:44:17 +02:00
shmerl
d23864a3e2 Support XDG base directory specification 2017-09-03 17:07:02 -04:00
Robert Beckebans
736ccadcb3 Started to move files so it can be compared to vkdoom3 2017-09-03 10:22:36 +02:00
Caffeine Code
41f1014ed5 read core count correctly 2017-07-09 22:39:20 +01: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
0e1de30fe9 enhance neo/sys/sys_public.h enum keyNum_t with some missing keys
turns out that both d3bfg and cegui use direct input scancode numbers
to represent keys internally.. now isn't that fucking convenient!

d3bfg was missing some, though, so I added them
2015-01-06 21:22:05 +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