Commit graph

205 commits

Author SHA1 Message Date
Tim Angus
f478761e07 Use SDL 2 instead of SDL 1.2 2013-01-17 18:20:03 +00:00
SmileTheory
af77b93597 #5818 - Modular renderer and Rend2 support for MSVC. 2013-01-07 20:30:49 -08:00
Zachary Slater
20a77764dd Increase various arbitrary limits - Bug #5463 2013-01-06 01:36:39 -08:00
Zack Middleton
6bc0e6fae4 Merge changes to GL_Cull from Rend2 into opengl1 renderer, behavior is the same. 2012-10-26 07:40:57 +00:00
Zack Middleton
3dfd2dac7e Split Rend2's printing OpenGL extensions string (> 1024 characters) into separate function and merged into opengl1 renderer. (Fixes bug #5559.) 2012-10-26 07:23:49 +00:00
Zack Middleton
037565293f From /dev/humancontroller:
to further reduce confusion, rename constants like MAX_ENTITIES to MAX_REFENTITIES
2012-10-17 21:20:29 +00:00
Zack Middleton
bc4ca164e0 From /dev/humancontroller:
really fix the confusion with game entity and refentity numbers

for any natural number M, the following is logical as a whole:
- the array size for refentities is M;
- the refentity number limit is M-1, ie., each refentity number is in [0..M-1];
- the special number for the world is M.

before r1429, the code was roughly the following:

// constants related to the game, should not be used by the renderer

// renderer stuff
refEntity_t refEntities[MAX_ENTITIES];
int numRefEntities = 0;

void addRefEntity(refEntity_t re)
{
	if (numRefEntities >= ENTITYNUM_WORLD)
		return; // full
	refEntities[numRefEntities++] = re;
}

void render(int num)
{
	if (num == ENTITYNUM_WORLD)
		renderWorld();
	else
		renderRefEntity(refEntities[num]);
}

so before r1429,
- the array size for refentities was 1023;
- the refentity number limit was 1021, ie., each refentity number was in [0..1021]; and
- the special number for the world entity was 1022.
this was a small waste of memory, as the last array element wasn't used.

r1429 changed
	if (numRefEntities >= ENTITYNUM_WORLD)
to
	if (numRefEntities >= MAX_ENTITIES).

this creates the following configuration:
- the array size for refentities is 1023;
- the refentity number limit is 1022, ie., each refentity number is in [0..1022]; and
- the special number for the world entity is 1022.

r1429 just makes things worse: it allows 1 more refentity to be added, but that entity doesn't get drawn anyway, as its number will be equal to the special number for the world. this is a small waste of not only memory, but also processing time.

perhaps in XreaL,

ENTITYNUM_WORLD is a game entity constant, and has nothing to do with refentities. a new REFENTITYNUM_WORLD constant should be added to denote the special number for the world, and that constant should be used in the renderer code in place of ENTITYNUM_WORLD. so define such a constant, and let it be equal to MAX_ENTITIES, which is 1023.
2012-10-17 21:17:37 +00:00
Thilo Schulz
c9fc250532 Incorrect number of overbright bits printed by GfxInfo_f() (#5510) - fix by Serge Belyshev 2012-07-01 16:59:20 +00:00
Zack Middleton
ad5c5c32a6 REFACTOR [reletive -> relative]
From /dev/humancontroller.
2012-06-18 16:32:03 +00:00
Zack Middleton
f3e7012bdb REFACTOR [a vs an]
From /dev/humancontroller.
2012-06-18 16:31:16 +00:00
Zack Middleton
5abf7e3d84 #5503 - SIGSEGV with r_vertexlight 1 in missionpack (patch by Serge Belyshev). 2012-05-07 23:06:00 +00:00
Thilo Schulz
d2b035eb73 Fix (#5312) introduced by rev 2103 2012-05-04 15:59:52 +00:00
Zack Middleton
1db2124a65 Moved dpi variable inside BUILD_FREETYPE ifdef. 2012-04-07 16:34:21 +00:00
Zack Middleton
a55a059abc Fixed some issues found using clang static analyzer. 2012-04-07 02:53:42 +00:00
Zack Middleton
b211b35853 Use FreeType include macros instead of filenames directly (per the API docs), patch by Radegast. 2012-04-02 17:23:46 +00:00
Zack Middleton
de1360f268 Fixed up warning messages in tr_font.c 2012-03-29 06:35:33 +00:00
Zack Middleton
c8e790e4af Use tabs in tr_font.c 2012-03-29 05:42:30 +00:00
Zack Middleton
5e9c7f5b37 Removed set but not used variable 'satLevels' from tr_font.c. 2012-03-29 05:31:18 +00:00
Zack Middleton
4b7a623cc0 Make sure font glyph shader names are null-terminated. 2012-03-29 05:28:09 +00:00
Zack Middleton
94fb80f021 Fixed possibly placing a font glyph (at the beginning of a row) past the bottom of a font cache image. 2012-03-29 05:15:46 +00:00
Zack Middleton
f15a3cca21 Fixed writing pre-rendered font TGAs, needed to flip image. 2012-03-29 04:49:36 +00:00
Zack Middleton
ea0102d403 - Added support for enabling FreeType Support (make USE_FREETYPE=1).
- Fixed compiling tr_font.c for dynamic renderer.
2012-03-29 04:05:13 +00:00
Thilo Schulz
dfd3245c38 Fix build for new modular renderer on MacOSX 2011-12-15 21:12:38 +00:00
Zack Middleton
34b22e9119 Reverted r2209... 2011-12-08 23:34:51 +00:00
Zack Middleton
93d1d0f83e Show warning when renderer cannot load model after checking all supported formats, instead of after each format. 2011-12-08 23:17:37 +00:00
Thilo Schulz
3ecd92ed91 Add color combination green-magenta for anaglyph 2011-11-18 12:47:42 +00:00
Zack Middleton
0724458818 Fixed usage of various entity defines. 2011-11-05 01:02:35 +00:00
Zack Middleton
4e59ef714b Print developer message when renderer runs out of free entities. 2011-11-05 00:56:26 +00:00
Tim Angus
fd986dae06 * Fix various warnings with GCC and clang 2011-10-27 21:32:28 +00:00
Tim Angus
675e7a641a * clang support 2011-10-21 22:48:53 +00:00
Thilo Schulz
bc3e989967 Bug 5199 - IQM joint matrices wrong, patch by James Canete 2011-09-19 22:15:24 +00:00
Zack Middleton
1469df546e Reverted r2145 per Timbo's suggestion. 2011-08-11 20:57:39 +00:00
Zack Middleton
1609d1c42b - Added r_mode -2 for using display resolution.
- Changed q3_ui's very high video settings use display resolution.
2011-08-11 05:14:42 +00:00
Thilo Schulz
8ab91bde8e - Fix already defined command warnings for minimize
- Fix recursive CL_Shutdown warning and "command already defined" warnings when quitting while playing on a server that changed the gamedir.
2011-08-01 10:16:40 +00:00
Thilo Schulz
5a1449bd51 Add forgotten file for last rev 2011-08-01 01:30:54 +00:00
Thilo Schulz
40dfcee06e Modular rendering system. Patch by use.less01
This might break MSVC builds. I'll take care of it later
2011-08-01 01:19:55 +00:00
Thilo Schulz
23f6fd1633 Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings 2011-07-29 12:27:00 +00:00
Thilo Schulz
1ea7ab1f42 Fix menu corruption on IRIX (#5097), patch by Rainer Canavan 2011-07-29 11:42:57 +00:00
Thilo Schulz
66f0777552 - Bug 5083 - Cross compiling for 64bit is missing libcurl.a
- Fix a compiler warning for cross compile
2011-07-18 16:32:36 +00:00
Thilo Schulz
9dc32d55e2 Bug 4812 - GCC __attribute__ annotations for printf, non-returning functions etc., patch by linux@youmustbejoking.demon.co.uk and Zack Middleton 2011-07-18 14:56:57 +00:00
Thilo Schulz
c52bfbd5a8 All patches by Zack Middleton:
- Bug 5057  - Two weapon number range checks allows invalid number
- Bug 5058  - Railgun explosion cannot be colorized
- Bug 5059  - Client's railgun does not glow in third person and mirror
- Bug 5060  - Warning in RAVENMD4 R_GetAnimTag cross compiling with amd64-mingw32
2011-06-27 23:53:40 +00:00
Thilo Schulz
dc24d7649c patch by Zack Middleton (#5044)
- Fix a few comments in tr_local.h
- A bit of refactoring of the cpp macros
2011-06-16 22:28:13 +00:00
Thilo Schulz
9219cde4e8 - Small change to search path order - local files not in .pk3s take precedence over files in pk3s. Should make life easier for modders/mappers wanting to override textures that are already contained in some older pk3
- Make VM loading more robust, change loading order: when vm_* == 0 first try loading DLL, then QVM in *each* search directory/path
- Fix FS_FileForHandle that would return a FILE pointer to invalid file handle 0
2011-06-15 22:09:26 +00:00
Thilo Schulz
03201aff22 - Add MASM assembler files for MSVC x64 projects to support vm_x86 in x64 mode
- Clean up ftol()/snapvector() mess
- Make use of SSE instructions for ftol()/snapvector() if available
- move ftol/snapvector pure assembler to inline assembler, this will add x86_64 and improve support for different calling conventions
- Set FPU control word at program startup to get consistent behaviour on all platforms
2011-06-13 09:56:39 +00:00
Thilo Schulz
c2b7f5173f Fix forgotten IQM2 support in iqm.h, patch by Zack Middleton 2011-06-11 20:20:30 +00:00
Thilo Schulz
b96c1c8279 Fixes to IQM support, by Zack Middleton
- Bug 5029 - IQM skin support for upper case surface names
 - Bug 5030 - IQM version 2 support
 - Bug 5031 - Animated IQMs cause segfault
 - Bug 5032 - IQM does not setup tag axis/origin correctly
 - Bug 5033 - IQM bounds swap and segfault issues
2011-06-11 15:16:25 +00:00
Thilo Schulz
4b9ab42c2c Remove newlines from Com_Error calls, patch by DevHC 2011-05-14 14:32:43 +00:00
Thilo Schulz
5f63ab9160 Choose better alignment for heavy-duty rendering structures, patch by Matt Turner (#4981) 2011-05-09 23:39:40 +00:00
Thilo Schulz
2ae1bf3dcd IQM skin support and print limit info, make other limit info consistent, patch by Zack Middleton (#4978) 2011-05-06 11:43:07 +00:00
Thilo Schulz
45824008d9 Remove C99 code constructs from IQM code, patch by gimhael (#4974) 2011-05-05 13:33:43 +00:00