Commit graph

578 commits

Author SHA1 Message Date
Daniel Gibson
105fdb0624 Fix dedicated server for Windows
* the OpenAL function definitions mustn't include __declspec(dllimport)
  => fixed by pretending to compile OpenAL statically
* glimp.cpp shouldn't be used in dedicated-only mode (as it was already
  the case on Linux and OSX)
  => No special handling for ID_DEDICATED needed in glimp.cpp, as it's not
   used anyway
* add APIENTRY to every gl function in stub_gl.cpp for compatibility
  with windows headers and MSVC
* remove GL/gl.h #include from win_local.h as it's not needed
* in qgl.h, when building dedicated server for windows, redefine WINGDIAPI
  to nothing for SDL_opengl.h #include to get rid off __declspec(dllimport)
  by using #pragma push_macro and pop_macro, because our stub is no dll.

Fixes https://github.com/dhewm/dhewm3/issues/39
2012-11-12 20:18:00 +01:00
Daniel Gibson
1f25568762 Remove duplicate functions from openal_stub.cpp + extern C
Some functions were duplicated, the only difference was a const in one
parameter. The definitions in the header were with const, so I kept
those versions.
Also, the functions in the header are pure C, so add extern "C",
this fixes issues with MSVC and the formerly duplicated functions.
2012-11-12 20:15:08 +01:00
Daniel Gibson
fa8f092e67 Unset key modifiers when regaining focus to unset ALT
There used to be a bug (discussed in #40), that ALT was still set after
using ALT-Tab. Thus when next pressing enter fullscreen was toggled.
This should now be fixed by unsetting the modifiers when focus is
regained (SDL_ACTIVEEVENT or SDL_WINDOWEVENT_FOCUS_GAINED).
2012-09-08 16:45:07 +02:00
Daniel Gibson
844cd2d8a8 Don't un-grab mouse when taking screenshots (fixes #18)
On windows un-grabbing (or possibly re-grabbing) the mouse seems to
mess up the view angly (view is centered afterwards), see
https://github.com/dhewm/dhewm3/issues/18
That's fixed by not releasing the mouse (there is no reason to do that
anyway).
2012-08-27 21:27:05 +02:00
dhewg
1b1787bb50 Disable the warning if the mouse grab request fails
This fails on some SDL drivers and just spams the console.
2012-07-28 12:54:25 +02:00
dhewg
9e15847083 Don't use alpha bits for the GL config
Wayland actually uses this.
2012-07-28 12:51:02 +02:00
Daniel Gibson
df81835de0 Fix several bugs from iodoom3 bugtracker
Apply 94cd0ee5 to d3xp as well.
2012-07-20 21:08:04 +02:00
dhewg
89071f1f57 Provide a stub for GLimp_GrabInput()
Fixes compilation of the dedicated server.
2012-07-20 21:04:04 +02:00
dhewg
227e8ee5c9 Add SDL2 support to framework/Common.cpp 2012-07-20 21:02:59 +02:00
dhewg
918e06cf00 Add SDL2 support to sys/osx/DOOMController.mm 2012-07-20 17:41:40 +02:00
dhewg
ed121102f4 Add SDL2 support to sys/win32/SDL_win32_main.c 2012-07-20 17:34:38 +02:00
dhewg
f120900000 SDL2's SDL_TimerID is not a pointer anymore 2012-07-20 17:34:38 +02:00
dhewg
454bebf99f Add SDL2 support in sys/glimp.cpp 2012-07-20 17:34:37 +02:00
dhewg
4f2f855105 Add SDL2 support in sys/events.cpp 2012-07-20 17:34:36 +02:00
dhewg
b8765ccf22 Move GrabInput() and rename to GLimp_GrabInput()
SDL2 supports multiple windows, and the grabbing is set per
window, so move it to sys/glimp.cpp.
2012-07-20 17:34:34 +02:00
dhewg
6dcf07974d Cleanup GrabInput()
Convert to bitflags to ease moving it.
2012-07-20 17:34:34 +02:00
dhewg
a75387c55e Add SDL2 support in sys/threads.cpp 2012-07-20 17:34:33 +02:00
dhewg
368bf2819c Log the SDL version 2012-07-20 17:34:32 +02:00
dhewg
264fdfa10e Add SDL2 support for the build system
Defaults to off, tree doesn't yet compile with SDL2.
2012-07-20 17:34:32 +02:00
dhewg
5639720c1c Add FindSDL2.cmake for SDL2
This is just a modified version of FindSDL.cmake
2012-07-20 16:43:39 +02:00
dhewg
826d0f7b7b cmake: set SDL_BUILDING_LIBRARY for win32 and osx
While that's a lie it makes FindSDL skip SDLmain, which we have
in tree and compile ourselves.
2012-07-20 16:43:38 +02:00
dhewg
e62e3870a3 Don't link against OpenGL
Dynamically load all symbols at runtime.
This in in preparation for SDL2/OpenGLES.
2012-07-20 16:43:37 +02:00
dhewg
63fdea82b4 Get rid of wglext.h
Good riddance.
2012-07-20 16:43:37 +02:00
dhewg
ac921bc99f Get rid of editor specific win32 vars
We don't compile any mfc crap for our own good, so get rid of these.
2012-07-20 16:43:36 +02:00
dhewg
227fac443d Fix description of r_swapInterval
This isn't specific to wgl.
2012-07-20 00:13:07 +02:00
dhewg
bf922dfc59 Get rid of glConfig.wgl_extensions_string
Unused and nobody cares.
2012-07-20 00:13:05 +02:00
dhewg
30d5cb16d0 Disable editor related rendering
These use OpenGL calls, which are useless on all platforms without
editor support.
2012-07-20 00:13:05 +02:00
dhewg
7f3fc825ed Get rid of GetCardCaps()
Useless now.
2012-07-20 00:13:04 +02:00
dhewg
3cdc5cec5c Get rid of unused var allowNV30Path 2012-07-20 00:13:03 +02:00
dhewg
de1b7b9adb Remove spurious call to SetBackEndRenderer()
Like the comment above said, this is invalid and can't work.
The backend is properly set via R_InitOpenGL().
2012-07-20 00:13:03 +02:00
dhewg
f4de0ed8c1 Remove the deprecated arb renderer 2012-07-20 00:13:02 +02:00
dhewg
a5678d2368 Remove the monochrome hack
This was only used for the nv20 renderer.
2012-07-20 00:13:02 +02:00
dhewg
6aa9b3602e Remove the deprecated nv20 renderer 2012-07-20 00:13:01 +02:00
dhewg
3f67a28abe Remove the deprecated nv10 renderer 2012-07-20 00:13:00 +02:00
dhewg
138b7b1def Remove the ATI fragment shader emulation
This was only used by the r200 renderer on OSX.
2012-07-20 00:12:59 +02:00
dhewg
4b67aae8fe Remove the deprecated r200 renderer 2012-07-20 00:12:59 +02:00
dhewg
4675ecb6d3 Get rid of precompiled.[h|.cpp]
Both unused, except for the mfc editors, which don't compile anyway.
2012-07-20 00:12:58 +02:00
dhewg
2cad07c38e Delete util_stub.cpp
Unused.
2012-07-20 00:12:57 +02:00
dhewg
e0fd437ba9 Don't warn about uppercase chars in filenames
Only print those in developer mode.
2012-07-20 00:12:56 +02:00
dhewg
d9bc9c6484 Silence warnings for removed cvars in ChoiceWindow
Disables these warnings:
WARNING: idChoiceWindow::InitVars: gui 'guis/mainmenu.gui' window
'ADVNet5Primary' references undefined cvar 'net_serverAllowServerMod'
WARNING: idChoiceWindow::InitVars: gui 'guis/mainmenu.gui' window
'SNDBPrimary' references undefined cvar 's_driver'

Both cvars have been removed from this tree.
2012-07-20 00:12:56 +02:00
dhewg
2a3d07e174 More logging cleanup 2012-07-20 00:12:55 +02:00
dhewg
373fccbd59 Cleanup OpenGL logging 2012-07-20 00:12:54 +02:00
dhewg
626de63ff5 Cleanup OpenAL logging 2012-07-20 00:12:53 +02:00
dhewg
5e05c5b031 Get rid of s_libOpenAL and s_useOpenAL
Both unused.
2012-07-20 00:12:52 +02:00
dhewg
8aa0a4a9c9 Fix "black box" effect on ase meshes
In 09ea2ca8 we fixed a memset(), but it turns out wiping memory at that
position is wrong in the first place:
If an ase mesh has a GEOMOBJECT/NODE_TM transform matrix before the
GEOMOBJECT/MESH entry, the prior parsed TM will be wiped.
Since a GEOMOBJECT aseObject_t is already calling memset() upon
initialisation, we can just drop the spurios call.

Fixes #13.
2012-07-18 19:53:08 +02:00
dhewg
a96635219c Fix pointer check/access in Sys_InitNetworking()
Reported by scaronni.
Fixes #25.
2012-07-17 18:25:06 +02:00
dhewg
020d1daf92 cmake: indent whitespace fixes 2012-07-10 10:10:35 +02:00
dhewg
f3ce725f8e cmake: Whitespace fixes for consistency 2012-07-09 23:31:35 +02:00
dhewg
28d127b230 cmake: default to build d3xp 2012-07-09 23:12:07 +02:00
dhewg
0b22c8e297 cmake: Remove fugly hack to compile 32bit binaries
This doesn't work on multiarch systems. A proper cmake toolchain file
has to be used instead.
2012-07-09 23:03:12 +02:00