Commit graph

347 commits

Author SHA1 Message Date
Ronald Kinard
5c16a91fd6 Render most flats and sides with texture arrays.
This breaks stencil buffer clipping, transparent flats, the whole
nine yards.

Unfortunately, this is about as far as I will be taking this
approach to cleaning up OpenGL. It's unfortunate, but this
renderer is basically unsalvagable. I will have to rewrite it
completely from scratch to get what I want out of this.
2015-04-01 20:48:54 -05:00
Ronald Kinard
084cf8e60b Use AA trees for managing vertex array buckets.
Might as well leverage an existing data structure, right? AA trees
use numbers as keys and we can iterate through them in order. I'm
surprised this was in the codebase!
2015-04-01 18:49:40 -05:00
Ronald Kinard
a604624f29 Merge branch 'master' into cleanup-opengl
Re-synchronize with master for build system changes.
2015-04-01 09:42:07 -05:00
Ronald Kinard
5bf1e5b75f Add vertex buckets interface. 2015-04-01 09:41:16 -05:00
Ronald Kinard
54f25c8f2f Add resizeable vertex array data structure.
This will be used for the vertex array buckets when building the
render lists for each FSurfaceInfo being used by the hardware
renderer. Generally, we will replace DrawPolygon calls with
operations to fill these resizeable arrays, one for each
FSurfaceInfo. After the initial BSP node draw call, we will go
through the buckets calling DrawPolygon on each one.
2015-04-01 02:46:01 -05:00
Ronald Kinard
d7b3795a82 Merge branch 'fix-windows-compile'
Closes STJr/SRB2!4.
2015-03-24 23:04:44 -05:00
Ronald Kinard
53680903e5 Fix compilation and debugging on Windows.
Core code has too many #define dependencies on interface-specific
defines. This means that it's currently not possible to safely
separate the core and interface code into different contexts. The
core code should be refactored to accomadate for this because we
should not have any interface-specific code in core in the first
place.

This reverts the static library SRB2Core from a7135094 and instead
adds the core sources to the SRB2SDL2 target directly.

So frustrating...
2015-03-24 19:32:58 -05:00
Ronald Kinard
d1d05fad3b Remove unused 'stride' variable in DrawPolygon.
This is an artifact of the last commit that I was using because I had
misunderstood the meaning of the stride argument for the array
pointers.
2015-03-08 23:37:26 -05:00
Ronald Kinard
fe7d19cc57 Use vertex arrays to draw in DrawPolygon for OpenGL.
This should introduce a minor performance boost for slow CPUs in
OpenGL mode. If it doesn't, it shouldn't be any slower. It also puts
us a little closer to supporting GLES as well.

This introduces several new pgl function pointers that are from
GL 1.1. I do not check for their existence because no driver out in
the wild in active use doesn't support 1.1.
2015-03-08 23:32:15 -05:00
Ronald Kinard
80bde9e042 Merge branch 'master' into cleanup-opengl
Synchronizing new CMake improvements with OpenGL cleanup branch for
ease of development.
2015-03-08 22:03:43 -05:00
Ronald Kinard
2f52a5d34f Added a fatal error message when attempting an in-source build.
In-source builds are pain and suffering and I am going to stop people
from doing them to save them that pain.
2015-03-08 18:47:26 -05:00
Ronald Kinard
c43b41e183 Fix generation of SRB2DD target.
It still won't compile correctly. But this should avoid the error
messages related to it.
2015-03-08 04:30:07 -05:00
Ronald Kinard
8472075960 Prepend ASM sources with the current source directory in CMake.
This fixes generation with USEASM enabled.
2015-03-08 04:16:16 -05:00
Ronald Kinard
a713509493 Refactor CMake to allow source grouping and separation of interfaces.
Core and SDL2 are two separate targets now. Core is a static library
that is linked into SRB2SDL2. The sources for both are separated.
When using an IDE like Visual Studio or Xcode, the source code
organized into groups that explain what that group of sources does.

In the future, "Main" could be split into a few more groups based on
file prefixes, but I think the way it is set up works for now.

Makefile targets are not affected by source_groups and typing `make`
will automatically compile both the "Core" library and SRB2SDL2
itself.
2015-03-08 03:26:54 -05:00
Ronald Kinard
f634a921b1 Remove KOS_GL_COMPATIBILITY.
All the effort I've made to research into what exactly this is has
been moot. Since we really only need to target GLES and GL, we should
just worry about supporting those. Our public builds don't rely on
this at all. This helps readability in the OpenGL code.
2015-03-08 00:11:45 -06:00
Ronald Kinard
e11b3c52fb Remove SHUFFLE define.
Honestly, under no circumstances when GL is compiled into the game
should the PostImgRedraw not be available. Removing this helps
make the GL code slightly more readable.
2015-03-07 23:54:02 -06:00
Ronald Kinard
d13968ae87 Remove MINI_GL_COMPATIBILITY.
The rationale for this is that MiniGL hasn't been relevant for 17
years or longer. Removing it helps cleanup this horrifying section of
the codebase.

This possibly breaks upscaling in fullscreen in OpenGL mode.
2015-03-07 23:45:49 -06:00
Ronald Kinard
3d5d61ee87 Remove MSVC netplay warning. 2015-03-04 20:37:37 -06:00
Ronald Kinard
f28b050c07 Append current branch name to comp version string. 2015-03-04 20:15:57 -06:00
Ronald Kinard
e223084982 Use bin output directory. 2015-03-04 20:07:51 -06:00
Alam Ed Arias
2609745b51 it was me, Duo! 2015-02-06 10:22:16 -05:00
Alam Ed Arias
ed0d70feca do not typedef off_t when we do not need to 2015-02-05 17:32:27 -05:00
Alam Ed Arias
542295c863 remove comptime.h from cmake file list 2015-02-05 17:32:26 -05:00
Alam Ed Arias
01d441e6c0 Merge remote-tracking branch 'Furyhunter/ipv6-osx-fix' 2015-02-05 17:04:54 -05:00
Alam Ed Arias
8cccfa558a do not include anything in assets folder unless forced 2015-02-05 17:04:24 -05:00
Ronald Kinard
062a746fdd Further fix IPv4 when IPv6 is available 2015-02-05 15:36:07 -06:00
Ronald Kinard
ae05613460 Fix IPv4 connectivity when IPv6 is enabled 2015-02-05 00:32:54 -06:00
Alam Ed Arias
3d498fe894 VERSIONSTRINGW is funny 2015-02-02 15:21:58 -05:00
Alam Ed Arias
7cf1a1aab8 fixup cmake merge 2015-02-02 14:58:51 -05:00
Alam Ed Arias
244fb0b2b5 Merge remote-tracking branch 'Furyhunter/cmake-update' 2015-02-02 12:52:51 -05:00
Ronald Kinard
e08bd45227 cmake: Separate debug symbols on gcc
Only when actually making the debug target though!
2015-02-01 22:14:52 -06:00
Ronald Kinard
d7015d1492 cmake: Fix nasm/add yasm support
Tested to work on MSVC, mingw-gcc
2015-02-01 21:25:02 -06:00
Ronald Kinard
194ce626e1 cmake: Add nasm support
Enables ASM-NASM and adds tmap*.nas to sdl target.

No idea if this actually works.
2015-02-01 19:18:25 -06:00
Ronald Kinard
8d3b948e1b cmake: Fix compilation for MSVC 2015
snprintf is now available in MSVC 2015!
2015-02-01 19:02:08 -06:00
Ronald Kinard
ec79756c42 cmake: copy DLLs to build directory in MSVC
this is done as a POST_BUILD step
2015-01-31 22:40:36 -06:00
Ronald Kinard
4d3a7dd8fb cmake: fix NDEBUG on Debug
wow i'm stupid
2015-01-29 00:17:47 -06:00
Ronald Kinard
70f046a320 cmake: on mac, check Resources in bundle first.
on non debug, check assets folder in src as well
2015-01-28 23:38:40 -06:00
Ronald Kinard
e54338ef01 cmake: fix Windows linking 2015-01-28 23:20:21 -06:00
Ronald Kinard
57037e4124 cmake: fixes to enable linux compilation
string.c, capitalization, find fixes
2015-01-28 20:15:24 +00:00
Ronald Kinard
68f8a5b0f9 cmake: build bundle and dmg on install/package 2015-01-28 19:29:16 -06:00
Ronald Kinard
0909fce2e3 cmake: Configure source via cmake
silently fixing a bad malloc here too shhhhhhhhh
2015-01-28 18:03:41 -06:00
Ronald Kinard
53799eb390 cmake: Add CPack Package Generation
Generates zips only at the moment
2015-01-28 16:42:05 -06:00
Ronald Kinard
1c9de50ad2 cmake: Search SDL2_main separately for MSVC 2015-01-28 15:33:29 -06:00
Ronald Kinard
20d6a7e675 cmake: exe icon on windows 2015-01-28 02:12:14 -06:00
Ronald Kinard
2f1367aab6 cmake: Fixes to allow MSVC to compile
running is another story
2015-01-28 02:09:03 -06:00
Ronald Kinard
495ea65cc5 Add GME and SDL2_mixer
Also support dynamic/static opengl switching
2015-01-28 01:20:43 -06:00
Ronald Kinard
479ebc3f94 Add Xcode target support
It is really messy at the moment. There is no support for copying the
necessary frameworks and dylibs out to the bundle for distribution, and
it is a frankenstein of manual find_library and find_package which can
sometimes pick up Homebrew dylibs.
2015-01-28 00:58:30 -06:00
Ronald Kinard
05f5ec664a Initial CMake support pass
Compiles the SDL2 target on Windows successfully
2015-01-27 23:46:39 -06:00
Alam Ed Arias
45e8ec34a6 always turn on LFS support when compiling for a Linux/GNU system with libpng support 2015-01-10 17:35:36 -05:00
Alam Ed Arias
e28882a56d oh, nPlaneVerts is a size_t?, well, then we need to use sizeu#() 2015-01-10 17:27:24 -05:00