Commit Graph

5085 Commits

Author SHA1 Message Date
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
4e9570cd0f Fix unnecessary CShaderConditionalDefines copy, and inline some functions
This was SVN commit r13904.
2013-09-29 02:05:02 +00:00
f075571502 Fix slightly expensive GetSystemShaderDefines()
Only recompute when any relevant parameters have changed, then return
the cached value.

This was SVN commit r13903.
2013-09-29 01:00:11 +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
28ce5f3458 It might be better to issue a LOGWARNING when Spatial queries are too large. Opening the crash window seems a bit too much for something that can be recovered from.
This was SVN commit r13898.
2013-09-24 21:50:46 +00:00
e370af8d4e Fix rally point rendering on saved games. Fixes #1762. Patch by mimo
This was SVN commit r13897.
2013-09-24 20:27:18 +00:00
cd51540725 This was SVN commit r13892. 2013-09-22 18:13:19 +00:00
2a613f8236 Removes mostly useless video memory detection, fixes another crash with Nvidia Optimus on Windows, fixes #2145, #2138
This was SVN commit r13891.
2013-09-22 18:07:33 +00:00
5287af8967 Increased SpatialQueryArray max results from 1024 to 2048. This is a temporary fix until the Search and Prune solution is implemented.
This was SVN commit r13888.
2013-09-22 04:37:46 +00:00
9781b67cf4 Changes the Console to expose global functions to scripts instead of properties.
Fixes #2140
Refs #1886

This was SVN commit r13884.
2013-09-21 14:48:19 +00:00
12e2428495 Changes the Renderer to expose global functions to scripts instead of using CJSObject.
Fixes #2137
Refs #1886

This was SVN commit r13877.
2013-09-21 08:24:45 +00:00
d252e245ef Optimise fixed multiplies on MSVC x86
On MSVC, casting i32 to i64 then multiplying gets compiled into a call
to __allmul, which is slow. Use the __emul intrinsic instead.

GCC 4.6+ appears optimise this case automatically and doesn't need any
special handling.

This reduces the cost of ComputeShortPath by about 50% (testing AI vs AI
on Oasis 01).

This was SVN commit r13873.
2013-09-20 20:17:54 +00:00
bfe0b79b91 Better fix of Grid memory leak, refs #1842
This was SVN commit r13869.
2013-09-18 01:21:36 +00:00
9f2a850a95 Fixes buggy operators and memory leak in Grid class, refs #1842
This was SVN commit r13866.
2013-09-17 00:28:22 +00:00
5d9b2b95b0 Ticket #2127 - Performance and style improvements in scriptinterface.
No real behavior changes, only code maintenance.

Fixed signed/unsigned mismatch in EntityMap.h

This was SVN commit r13865.
2013-09-16 19:10:06 +00:00
1b6a5fa802 This was SVN commit r13861. 2013-09-15 21:37:05 +00:00
2a5ec404d1 Further reverted RangeManager sorting to stable_sort, since possibly with different STL implementations, the order of entities might change and cause OOS.
Overflowing elements in SpatialQueryArray are now reported with
debug_warn, but can be ignored and the program will continue working,
but further entities will be truncated.

This was SVN commit r13860.
2013-09-15 21:11:20 +00:00
9694eec8b8 As per ticket #1707. Some minor improvements to spatial subdivision. Makes way for future changes in RangeManager.
Right now merely improves memory usage.

This was SVN commit r13854.
2013-09-15 14:03:53 +00:00
126e550d68 Delete bogus file
This was SVN commit r13841.
2013-09-14 12:19:22 +00:00
c28151c1c1 Put tooltips on a diet.
This was SVN commit r13835.
2013-09-13 23:49:46 +00:00
5304bc9d6a Changes GameView to expose global functions to scripts instead of using CJSObject.
Fixes #2126
Refs #1886

This was SVN commit r13826.
2013-09-12 12:40:05 +00:00
05422ad545 Avoid slightly-expensive QueryInterface() calls
Add CEntityHandle which wraps an entity_id_t and also has a pointer to a
per-entity array of IComponents. QueryInterface/CmpPtr on a handle just
involve a couple of pointer dereferences instead of a map lookup.

This requires sizeof(void*) per registered interface type per entity,
which is currently ~0.5KB per entity, which shouldn't be a problem.

This was SVN commit r13825.
2013-09-11 20:41:53 +00:00
b1bd61938e add file notification to Mac ticket 514, also change name of class FileInfo to CFileInfo to ease Mac development
This was SVN commit r13821.
2013-09-10 14:17:04 +00:00
d037d97d55 disable querying of local entities with a component. Avoids OOS problems. Patch thanks to historicbruno. Fixes #2119
This was SVN commit r13820.
2013-09-10 12:27:59 +00:00
04ed87bf28 Display error messages instead of breaking into the debugger when we don't have rights to save a map in Atlas. Fixes #1941.
This was SVN commit r13818.
2013-09-09 23:31:22 +00:00
b2862f14da Avoid continual libxml2 memory leak in simulation-test mode
This was SVN commit r13817.
2013-09-09 20:22:42 +00:00
7a0e91ab23 Fixes undefined behavior in Atlas error display, fixes #2115
This was SVN commit r13808.
2013-09-08 03:35:05 +00:00
16c9724c24 Fix release build scripts
Exclude dev.cfg from the Windows installer.
Use the correct filename for the Windows installer.
Update some paths to match the new EC2 build process.

This was SVN commit r13802.
2013-09-06 19:43:45 +00:00
e19b470a42 fix music glitchyness when game loses focus trac #2090
This was SVN commit r13799.
2013-09-06 02:46:13 +00:00
53a5781c66 Increase simulation script runtime size again. Refs #1436, #1966 and #2035.
This was SVN commit r13794.
2013-09-01 23:29:21 +00:00
df190cbbd1 fix issues with menu mode and playlist, harden code and clear out ambient noises at game end, fixes #2066
This was SVN commit r13784.
2013-08-29 13:20:55 +00:00
89430de468 Okay, do what f5ab6255d0 was supposed to do.
This was SVN commit r13773.
2013-08-26 04:17:26 +00:00
b10a01645f Revert f5ab6255d0. I accidentally somehow committed my whole working tree on this computer....
This was SVN commit r13772.
2013-08-26 04:15:36 +00:00
f5ab6255d0 General scrollbar improvements. Patch by Josh. Fixes #2080.
- Don't show the scrollbar when the contents aren't overflowing the
visible area.
- Fix bugs in minimum bar sizing.
- Add capability to set a maximum bar size.
- Correct outdated/incorrect comments.

This was SVN commit r13771.
2013-08-26 03:06:08 +00:00
f106d7714a Fix a swap between reflections and refractions in config.cfg . Disabling "Render Reflections" now reverts to the skybox for better results.
Allows to oversaturate in Atlas' HDR settings.

This was SVN commit r13752.
2013-08-24 14:44:38 +00:00
957c51727b Improve on-water shadows. Fix an issue with foam looking static. Add anisotropic filtering (x4) to the water normal texture for testing.
This was SVN commit r13750.
2013-08-24 14:12:39 +00:00
630301918c Fix the command line -autostart-aidiff to default to 2 (new medium)
This was SVN commit r13746.
2013-08-24 09:55:06 +00:00
c1dcbe4176 update TLB table
refs #2074

This was SVN commit r13741.
2013-08-23 06:42:48 +00:00
0a0bd83cf0 Adds L4 cache detection for some new Haswell CPUs, fixes #2074
This was SVN commit r13736.
2013-08-21 23:18:35 +00:00
deb64d36fc Fix rendering artifacts with novbo=true gentangents=true
glDrawRangeElements needs to know the range of vertexs that are used
by the index array. With VBOs it doesn't really matter if the range
is wrong (all the vertexes are in GPU memory anyway), but with CPU
vertex arrays the driver has to memcpy the given range of data, so
incorrect bounds will result in garbage data being rendered.

With gentangents, the rendered mesh can have more vertexes than the
original CModelDef, but was rendered with the CModelDef's vertex count.

Use the correct vertex count instead.

Refs #2050.

This was SVN commit r13734.
2013-08-21 21:01:32 +00:00
52d6a8036d This was SVN commit r13725. 2013-08-21 05:37:28 +00:00
f947fa6afe Fixes stack overflow in stack dump logic, by special-casing boost::unordered types, fixes #1813.
Adds INIT_HAVE_DISPLAY_ERROR init flag to correctly override
ah_display_error in Atlas (InitVfs was overriding it again), but don't
use it because it's ugly and broken, refs #1729

This was SVN commit r13724.
2013-08-20 21:07:42 +00:00
ee877a46c7 Switch X and Z loops in the foam generation, possible speed improvement.
This was SVN commit r13720.
2013-08-20 08:55:33 +00:00
54bbbb9797 Boost 1.54 deprecates Boost.Signal. Use Boost.Signal2 for >= 1.54.
This was SVN commit r13716.
2013-08-19 22:11:54 +00:00
1739a381c1 Fix crash when editing terrain near map edges.
The values in CMessageTerrainChanged can be overestimates that exceed
the normal map boundaries, and should be clamped before looping over
them.

This was SVN commit r13714.
2013-08-19 19:19:34 +00:00
0ca841b92b Suppress unused local typedef warnings when including SpiderMonkey headers.
This was SVN commit r13713.
2013-08-19 18:26:44 +00:00
0c16980408 Fix tests.
This was SVN commit r13709.
2013-08-19 10:55:35 +00:00
b770c41f0b Removes shadow casting and receiving on preview entities, patch started by ericb, fixes #1771
This was SVN commit r13706.
2013-08-18 22:17:57 +00:00
0888cf6c23 Fix Linux build
This was SVN commit r13701.
2013-08-18 11:28:52 +00:00
29b5021f97 Fix my previous commit because obviously I had forgotten something.
This was SVN commit r13699.
2013-08-18 09:42:02 +00:00