Commit graph

128 commits

Author SHA1 Message Date
Denis Pauk
660412a525 cmake: update for minimal build
Fixes #28
2024-09-22 22:14:11 +03:00
Yamagi
53b738f77b
Merge pull request #1128 from protocultor/ref_gles1
OpenGL ES 1.0 renderer
2024-08-12 09:02:40 +02:00
Denis Pauk
f688ea599f cin: support 24bit pcx images 2024-08-11 15:40:33 +03:00
Jaime Moreira
bbdaadb104 Removed link to desktop OpenGL library for gles1
Done for all platforms, CMakeLists included. Unneeded with glad.
Renderer fallback logic now includes gles1, just before soft:
custom -> gl3 -> gles3 -> gl1 -> gles1 -> soft.
2024-08-03 12:39:23 -04:00
protocultor
f41cc545c6
Merge branch 'yquake2:master' into ref_gles1 2024-08-03 10:15:04 -04:00
Yamagi
c72d0c1b39 Add back linker options somehow lost in 8cedbb0.
Closes #1129, fixed by @ArminiusTux.
2024-07-29 19:18:48 +02:00
Jaime Moreira
03227f1ed6 OpenGL ES 1.0 refresher (GLES1 for friends)
Variant of GL1, meant for embedded/mobile devices only.
Build it with "make with_gles1".
For Windows, you'll need MSYS2 and a decent ANGLE implementation
(probably not worth the trouble).
Building with CMake only works in Linux, so it has been commented out.
2024-07-27 23:15:12 -04:00
Jaime Moreira
50aebd2de4 GL1 unified draw calls, init
Implemented a batching procedure, to try to group meshes in a buffer
and use a final GL call to draw them all in one step, instead of the
many GL draw calls existing today.
For now, only 2D textures are included, especifically console text
("conchars"), scrap and tiles. It's not worth doing this for
individual 2D elements (e.g. crosshair).
2024-07-15 06:56:02 -04:00
Yamagi
78c951d620 Implement SDL3 into the CMakeLists.txt. 2024-04-07 11:01:45 +02:00
Yamagi
8cedbb0694 Port the Windows platform backend including Makefile support to SDL3.
This also fixes a long standing bug with the Windows part of the
Makefile linking -lSDL2 into q2ded.exe.
2024-04-07 11:01:45 +02:00
Yamagi
4967b9d0ca Update miniz to e5700656b34b732f8d4e5df87cb0de00a6c8f319. 2023-11-24 09:26:14 +01:00
Yamagi
90402c3f85 Move miniz into a subdirectory.
An upcoming update will add several files, having miniz in it's own
subdirectory makes it clear what belongs to it an whit to unzip.
2023-11-23 18:21:44 +01:00
Jaime Moreira
9821c4b0a2 Show correct replacement for gl_lightmap cvar
Typos corrected
2023-08-26 19:18:24 -04:00
David CARLIER
d7a6535d01 fix cmake assumption on x86 arch.
set wrongly on i386 even tough the cpu is x86`_64`.
2023-08-05 11:12:19 +01:00
David Carlier
7775257121 cmake build fix adding missing compilation unit. 2023-02-16 19:35:27 +00:00
Daniel Gibson
651503d48a Fix build with VisualC++'s internal CMake
.. which doesn't set CMAKE_GENERATOR_PLATFORM

so set YQ2ARCH in src/common/header/common.h when building with MSVC
2023-01-16 06:02:26 +01:00
Denis Pauk
ae13c7e034 Share MD2/SP2 files 2022-10-17 22:43:39 +03:00
David Carlier
2301ce0f78 Fix cmake's C11 build and removing C99 flag then. 2022-09-16 21:27:32 +01:00
Daniel Gibson
e124ddb4d0 GLES3 support in CMake 2022-04-27 00:33:46 +02:00
David Carlier
20171efc15 cmake build fix common linker settings. 2022-03-22 20:25:17 +00:00
David Carlier
cd641cfb9a cmake adding SYSTEMDIR variable to complete SYSTEMWIDE_SUPPORT option. 2022-03-17 12:10:54 +00:00
Daniel Gibson
34a8c3833f Some CMake improvements
- make sure MSVC builds in parallel
- make sure game.dll ends up in the correct directory
- set yquake2 as VS debugger start project
2022-03-12 17:01:37 +01:00
Daniel Gibson
16c97f6ece CMake: MSVC build is cleaner now (and shows less warnings)
- suppress some compiler warnings
- don't pass GCC/clang-specific flags to MSVC

(also made sure it still builds with MinGW)
2022-03-12 17:01:27 +01:00
Daniel Gibson
35232218e9 CMake: Correctly identify CPU architecture, hopefully
because, sadly, CMAKE_SYSTEM_PROCESSOR is almost useless and they don't
have a more useful alternative either :-/
2022-03-12 16:57:14 +01:00
Daniel Gibson
ed918cf423 CMake: Make the game build with Visual Studio (2019 16.8 or newer)
The easiest way to build this is to check out the dhewm3-libs project
(https://github.com/dhewm/dhewm3-libs/) to provide the dependencies
(SDL2, OpenAL, cURL) and set YQUAKE2LIBS accordingly, by passing
-DYQUAKE2LIBS=c:/path/to/dhewm3-libs/i686-w64-mingw32 to cmake.

I wouldn't really recommend building with MSVC - I just somehow made it
work and ignored all the warnings and I have no idea how portable the
resulting binaries are etc. For binaries you actually want to use, please
continue using MinGW-w64. Especially my workaround for VLAs (C99 variable
length arrays) is kinda fishy, particularly if those arrays are allocated
in a loop (that's inly done in ref_gl1.dll's code).

The only reason I did this is that I had to debug on Windows and, at least
for my specific bug, gdb didn't really work with binaries produced by
MingGW-w64 and MSVC's debugger works well with binaries produced by MSVC.

Currently requires VS 2019 16.8 or newer with C11 (/std:c11) because I
couldn't get YQ2_ALIGNAS_TYPE() to work with MSVC without _Alignas().
If we can get this to work, VS2015 or newer might suffice (but not older
versions, because their so called C standardlib didn't provide exotic
functions like snprintf()).

# Conflicts:
#	CMakeLists.txt
2022-03-12 16:55:55 +01:00
David Carlier
ea1d491ff3 cmake limiting the scope of concern to C only and detecting
the compiler from to one particular frontend since it can
happen to have differents for C and C++.
2022-03-02 19:31:37 +00:00
David Carlier
ff3315d5d6 Haiku doc update, little code style fixes. 2022-02-26 08:35:10 +00:00
Yamagi
fb1a2b0ce7 Add a warning that the CMakeLists.txt is unmaintained. 2021-07-23 08:25:07 +02:00
Yamagi
3e0af336d0 Revert "Retire unmaintained CMakeLists.txt."
It turned out that there're some special cases not (yet) covered by the
Makefile. Crossbuilding in specialized chroot environments are one
example.
2021-07-23 08:19:28 +02:00
Yamagi
0763dee264 Retire unmaintained CMakeLists.txt.
I added the CMakeLists.txt 6 or 7 years ago so I could load the code
into Jetbrains Clion. I have moved to another editor years ago and the
cmake stuff is effectively unmaintained since then. We kept it around
in case that we'll do a MSVC port, but that's unlikely at this point.
Since bugreport and problems with the CMakeLists.txt keep coming up,
finally retire them. They can be resurrected from the git history if
we'll ever need them again.

Part of #725.
2021-06-29 11:06:19 +02:00
David Carlier
53c684525f solairs/illumos build fix proposal. 2021-06-13 08:25:56 +01:00
Yamagi
8c297a003f Remove rev_vk from the CmakeLists.txt. 2021-05-28 09:32:42 +02:00
David Carlier
8dc76d54d1 Proposing to make vulkan support eventually optional.
Still some alternative oses does not have vulkan support or not full (e.g. Raspberry).
2020-12-23 09:50:37 +00:00
Yamagi
85b9f84b3d Don't link against the Vulkan loader, load it at runtime. 2020-12-12 14:45:04 +01:00
Denis Pauk
b94afbc6c1 remove unused vk_mem_alloc 2020-12-12 14:45:04 +01:00
Yamagi
0cdfd8f292 Bring the CMakeLists.txt more inline with the Makefile:
* Always set -fvisibility=hidden
* Set -Wl,--no-undefined where it is supported
* Add missing libraries for Windows
2020-10-08 11:44:38 +02:00
David Carlier
0200434187 backtrace support rework proposal.
Linux/Solaris supports it in the libc however, BSD in general, Haiku
relies on an external library.
2020-08-03 10:19:41 +00:00
David Carlier
a2b274d1a5 Haiku porting proposal. 2020-06-20 19:05:55 +00:00
Yamagi
5b327c0417 Don't use yield opcode if unsupported.
This is an enhancement to the previous `yield` work:

* Don't enforce `-march=armv8-a` for aarch64 builds, because it is the
  initial ARMv8 revision and compilers will either use that or something
  newer.
* Refine preprocessor guards around `asm("yield");` so the code isn't
  compiled in if unsupported by the current `-march='.

Submitted by @smcv in #535.
2020-04-03 08:30:41 +02:00
Denis Pauk
eeff4dae43 fix march armv8 2020-03-20 08:01:36 +02:00
David Carlier
558ee70b3e Issue 'yield' in main loop to give CPU time to cool down.
This is functional equvalent to the 'pause' instruction on x86.
2020-03-18 15:50:45 +01:00
Yamagi Burmeister
751b09ba33 Quote the raw architecture string, it might contain whitespaces. 2019-07-31 13:42:28 +02:00
Max Crofts
a43f3873a5 Link SDL with q2ded on Windows
This is in line with what the makefile does.
2019-05-07 19:16:02 +10:00
Max Crofts
332a322d8e Remove frame.c from CMakeLists.txt 2019-05-07 19:15:47 +10:00
Denis Pauk
203bc4b202 Update stb_image and add stb_image_resize code 2019-01-30 22:43:54 +02:00
Denis Pauk
07c472cfd2 Remove adivtab 2019-01-30 22:42:21 +02:00
Yamagi Burmeister
46503018f0 Require cURL in CMakeLists.txt if USE_CURL is defined. 2019-01-05 16:53:00 +01:00
Yamagi Burmeister
2271c0bb91 Add the HTTP and cURL stuff to cmake. 2018-12-20 18:01:38 +01:00
makson96
88e0d21cf0
Use CMake 'GREATER' insted on 'GREATER_EQUAL' 2018-08-26 20:46:55 +02:00
Yamagi Burmeister
692c544f30 Some modernizations to cmake.
* Pass the same compiler flags like make.
* Update FindSDL2.
* Remove unneeded FindOggVorbis.

There still some options missing, like the RPATHes or he ability to
define the system wide installation directory.
2018-08-14 15:29:41 +02:00