1
0
forked from 0ad/0ad
Commit Graph

34 Commits

Author SHA1 Message Date
37b30901b3 Removes C++ code for conditional defines removed in f29d059617.
Differential Revision: https://code.wildfiregames.com/D4551
This was SVN commit r26661.
2022-03-15 22:13:22 +00:00
95b13cda13 Adds const to Material and CShaderProgram::Binding methods, removes a redundant variable from ModelRenderer
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2598
This was SVN commit r23445.
2020-01-26 21:32:12 +00:00
651cf8b364 Split CColor from Shapes.
Reviewed By: wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1515
This was SVN commit r22051.
2019-01-13 15:38:41 +00:00
b18f74da44 Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
caf89fa04e Rename ps/Overlay(.h|.cpp) to ps/Shapes(.h|.cpp), fixes a TODO located in graphics/Overlay.h.
The file name did not match the content.

Also little cleanup of some unnecessary includes.

This was SVN commit r16431.
2015-03-15 18:06:32 +00:00
618fe81814 Check when loading an actor that it defines all the texture samplers required by its material. Print out a readable error otherwise. Fixes #1613 (note that this does not check for unnecessary samplers as that is non-trivial and does not lead to graphical glitches).
Also add a shortcut for some defines to clean-up material files slightly
and make the link between sampler and shader more explicit.

This was SVN commit r16427.
2015-03-15 11:37:26 +00:00
ac335f37c8 Fix some Clang warnings about unused private members
This was SVN commit r14023.
2013-10-19 00:53:58 +00:00
eceae8be5c Fix crash when setting rally point
This was SVN commit r13908.
2013-09-29 14:02:47 +00:00
994ebd9836 Add a list of statically-constructed CStrIntern strings
Switch all the constant strings in graphics code to use the new
variables.
This avoids the cost of instantiating CStrInterns at runtime every
frame.

This was SVN commit r13906.
2013-09-29 13:19:52 +00:00
555deea136 Fix conditional defines to not construct new CShaderDefines frequently
CShaderDefines is designed to be efficient to copy and compare, but not
to construct. Conditional defines were constructing new CShaderDefines
for many models every frame.

Precompute all the possible conditional combinations of CShaderDefines
when a material is first loaded, so they can be looked up at no cost
when rendering.

This was SVN commit r13902.
2013-09-29 00:30:58 +00:00
da8c673a0a ao/parallax/normal/specular/emissive mapping; windy trees; time manager; render queries; conditional defines
This was SVN commit r12300.
2012-08-06 19:10:47 +00:00
f598101c34 Add support for multiple UVs and data driven texture loading. From myconid's patches. Fixes #1493 and fixes #1497.
This was SVN commit r12183.
2012-07-23 22:49:46 +00:00
b7888aea52 Add support for specular materials.
Let materials specify shader uniform values.
Use interned strings for shader uniform/attribute names.
Remove confusing float* cast operator on CVector4D.
Simplify and clean up CVector4D.
Remove non-supported 'old' lighting model.

This was SVN commit r11453.
2012-04-08 15:55:06 +00:00
6bc33fe8bd Update renderer design to be more flexible and data-driven based on material and shader definitions.
Support conditional expressions in shader effect XML files.
Consolidate fixed-function model rendering into the shader system.
Remove lots of now-obsolete renderer code.
Move shader defines from std::map to new class with interned data, for
performance.
Move texture from model into material.
Alleviate singletonitis.
Remove obsolete lodbias setting.
Remove unused terrain shadow transparency.

This was SVN commit r11423.
2012-04-03 18:44:46 +00:00
4bf59b9a7d More GLES compatibility, mainly around terrain rendering.
This was SVN commit r11059.
2012-02-13 14:02:14 +00:00
d295dacb9b # Add new renderer mode based on GL_ARB_fragment_program.
Change lighting model for new maps to allow better overbrightness.
Cache player colours instead of loading from scripts every time the
renderer wants them.

This was SVN commit r9123.
2011-03-26 20:17:21 +00:00
d805e764c5 # Render unit silhouettes when behind buildings.
Fixes #144.
Start using stencil buffer.
Simplify materials a little.

This was SVN commit r9076.
2011-03-18 16:57:54 +00:00
310f3466a8 # Hotloading of actor XML files.
Stop ignoring actor XML animation speeds.
Add decentralised registration of hotloaders.
Move player ID storage into CModel, to simplify CUnit.
Remove obsolete unit ID allocation code.
Remove some material junk.

This was SVN commit r7605.
2010-06-03 01:29:43 +00:00
79ea8213e5 const-correctness
This was SVN commit r7355.
2010-03-17 22:51:47 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
3c411dd174 large batch of Dehydra static code analysis fixes
(mostly passing arguments by const reference and checking LibError
return codes)

This was SVN commit r6214.
2008-07-12 10:45:11 +00:00
c0ed950657 had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).

it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.

after several hours, the code now requires fewer casts and less
guesswork.

other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.

This was SVN commit r5942.
2008-05-11 18:48:32 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
c817566222 # housekeeping
replaced all (*) CStr / CStrW by-value params with const reference. hoo
boy.

please always perform this optimization (actually standard idiom) when
writing the code - it takes little work, tells the next guy that the
string won't be modified, and makes a large performance difference.

(* where possible.. a few require other changes and will follow later)

This was SVN commit r4151.
2006-07-20 14:37:58 +00:00
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
d2948937a0 Fixed prop player-colouring. Allowed per-object colours. (Coming soon: data to demonstrate it.)
This was SVN commit r2113.
2005-04-07 04:29:07 +00:00
NoMonkey
d7b3d6b0c7 Added a new material, "player_trans.xml" which will give a model player color. So now if you want a player to be colored, just add this material!
This was SVN commit r1830.
2005-01-27 02:52:26 +00:00
38b30e5eb4 Corrected ICC errors and some warnings. Removed some unnecessarily verbose logging. Did minor things.
This was SVN commit r1718.
2005-01-13 00:17:31 +00:00
Calefaction
955ddcf9a1 More programmable pipeline updates
This was SVN commit r1280.
2004-10-30 21:57:46 +00:00
011666f393 Minor fixes for Linux/GCC
This was SVN commit r1201.
2004-09-26 21:21:34 +00:00
Calefaction
b1c269b72e Complete materials checkin
This was SVN commit r1197.
2004-09-24 03:52:03 +00:00
Calefaction
831053d680 Update to the material system
This was SVN commit r1193.
2004-09-23 05:10:03 +00:00
Calefaction
4fff66cfce Initial import of material code. MaterialReader is implemented and functional. Currently models do not attempt to load materials, nor does the renderer use them.
This was SVN commit r1192.
2004-09-23 04:00:56 +00:00