acf1c420c1
Moves management of GL viewports to CRenderer, letting it store the current viewport; calling code can retrieve and restore it later (instead of using deprecated glPush/PopAttrib, previously removed for GLES compatibility by 7dec618898
)
...
This was SVN commit r14235.
2013-11-28 00:57:39 +00:00
7dec618898
Some attempts to fix GLES build in smooth LOS and post proc manager.
...
Replaces glBegin/End with glDrawArrays, GL_QUADS with GL_TRIANGLES, and
replaces glPush/PopAttrib by resetting the viewport manually.
Adjusts GLSL shaders for these changes.
This was SVN commit r14152.
2013-11-12 01:30:17 +00:00
f1613a3c90
Fixes fancy waves build on GLES (replaces GL_QUADS with GL_TRIANGLES)
...
This was SVN commit r14151.
2013-11-12 01:25:32 +00:00
81eabfc934
Fixes basic water rendering on GLES (replaces GL_QUADS with GL_TRIANGLES).
...
Sets SDL2 to use correct profile for GLES.
Cleans up some old SDL 1.3 version checks.
This was SVN commit r14150.
2013-11-12 01:24:04 +00:00
5771bee032
First pass at fixing GLES build - more to come
...
This was SVN commit r14149.
2013-11-12 01:17:16 +00:00
3c47b12cbe
Display texture memory usage in profiler's renderer stats
...
This was SVN commit r14116.
2013-11-09 01:03:23 +00:00
701508922f
Use CStrIntern for font names to reduce lookup cost
...
This was SVN commit r14020.
2013-10-18 16:15:42 +00:00
5778484a77
Refactor text renderer
...
Replace unifont with CFont and CFontManager, since the h_mgr interface
was
needlessly inconvenient.
Load the font textures through CTextureManager, to support dynamic
reloading (e.g. when resetting GL state - see #741 ).
Add CFontMetrics as a convenient wrapper for code that just wants to
measure text.
Fixes #1117 .
This was SVN commit r14016.
2013-10-18 15:53:07 +00:00
e700937fd3
Fix non-SSE x86 builds
...
This was SVN commit r13934.
2013-10-03 18:22:10 +00:00
e449364408
Recompute system shader defines immediately when the relevant inputs change, instead of delaying until ReloadShaders.
...
This fixes an error with autostart and smoothlos=true, where the system
defines were being accessed before the first rendered frame.
This was SVN commit r13923.
2013-09-30 22:39:06 +00:00
e24ce51029
Adds DynamicArena allocator that grows by fixed chunk size, fixes #2142 .
...
Changes fixed size arenas to new dynamic arenas with reasonable chunk
sizes (may require tuning), refs #1842
This was SVN commit r13916.
2013-09-30 01:22:44 +00:00
c2583e42da
Reduce memory allocations in the renderer
...
Use an arena allocator in ShaderModelRenderer::Render, to reduce
the allocation cost in STL containers.
Avoid unnecessary copying of std::vectors.
This was SVN commit r13911.
2013-09-29 14:48:11 +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
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
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
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
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
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
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
29b5021f97
Fix my previous commit because obviously I had forgotten something.
...
This was SVN commit r13699.
2013-08-18 09:42:02 +00:00
a4707bcc16
Change the water manager so incremental updates to the water information is possible. Streamline a few things (and removes a not-really-used calculation to speed things up further). Fixes #2063 , refs #1743 .
...
This was SVN commit r13698.
2013-08-18 09:27:11 +00:00
7ff167e7de
Removes more unused variables, based on patch by Markus, refs #1852 .
...
Adds TODOs to use POT textures in fancy water rendering.
This was SVN commit r13663.
2013-08-15 18:25:32 +00:00
047992e61a
Fixes possible memory leaks by only allocating wave vertex buffers once and only when needed, and releasing them before re-allocating (in case CreateSuperfancyInfo is called multiple times).
...
Checks if wave vertex buffers were allocated before rendering, fixes
#2017
This was SVN commit r13561.
2013-07-15 03:26:48 +00:00
595c964d77
Make water specular more visible and fixes a few cases where it would actually hardly appear when it should.
...
Adds the ability to access an element in a dropdown box by typing the
first letters (Refs #1532 ).
This was SVN commit r13556.
2013-07-14 12:17:07 +00:00
408c30e061
Probably fixes #2021 . Optimization for foam generation while I'm at it (it's faster now, but there's a new temporary array of the size of the map)
...
This was SVN commit r13555.
2013-07-14 08:06:07 +00:00
facd447d0f
Hopefully fixes GCC warning about narrowing conversion in C++11, fixes #1851
...
This was SVN commit r13470.
2013-06-11 02:40:49 +00:00
17bb997e0e
Fixes memory leak in CVertexBuffer::Release, patch by Markus, fixes #1933
...
This was SVN commit r13423.
2013-05-23 23:16:36 +00:00
94c57085e9
Makes some classes NONCOPYABLE, based on patch by Markus, refs #1852
...
This was SVN commit r13419.
2013-05-22 21:40:56 +00:00
d7dcd3b26c
Use prefix increment operator for iterators (for consistency), refs #1852 , #1064
...
This was SVN commit r13418.
2013-05-22 18:41:13 +00:00
136f1891c1
Fixes a fix about a fix on the waterManager. Fixes #1891
...
This was SVN commit r13411.
2013-05-21 08:55:49 +00:00
9a0749f3c9
Make sure to actually prevent Atlas from trying to render coastal waves. Fixes #1925
...
This was SVN commit r13386.
2013-05-01 06:47:49 +00:00
d9540ad7f6
Fixes MSVC build error and warning
...
This was SVN commit r13375.
2013-04-27 22:43:22 +00:00
4233acfa36
Slight clean up of the water code. Uses vertex data instead of a texture for foam. Should be faster to generate and render. Still no Atlas support.
...
This was SVN commit r13374.
2013-04-27 12:20:42 +00:00
a317cd9cba
Fixes memory leak and removes unused code in WaterManager, fixes #1891 , refs #1852
...
This was SVN commit r13337.
2013-04-03 03:30:10 +00:00
a87019ea5a
Render initial game view during loading screen, to begin loading assets and eliminate ugly terrain blending artifacts. Refs #1663
...
This was SVN commit r13181.
2013-02-22 07:32:22 +00:00
abd98ad581
Re: disable foam and coastal waves in Atlas until properly optimized (this time with 100% more it-does-not-bug). Refs #1743
...
(sorry about the last time, should not blindly commit).
This was SVN commit r13146.
2013-02-03 15:49:41 +00:00
f51e129628
Temporary revert of revert from 38b0c0eb72
to fix water maps in Atlas, refs #1743
...
This was SVN commit r13138.
2013-01-31 23:03:09 +00:00
38b0c0eb72
Reverts some changes: Atlas now won't recompute the water foam on terrain change, thus reducing the lag until I properly optimize it. refs #1743
...
This was SVN commit r13120.
2013-01-26 17:10:12 +00:00
75a23856cf
Fix some static analysis warnings
...
This was SVN commit r13101.
2013-01-21 20:33:25 +00:00
276f0a41a0
New Year's clean-up.
...
Throw a warning if a invalid (not present) AI is specified in a map.
Replace the last occurences of jubot with qbot.
Exclude the common siege templates from the Units Demo map.
Fix an error with flying units.
Replace CFG_GET_SYS_VAL with CFG_GET_USER_VAL and rename it to
CFG_GET_VAL to reflect its behaviour better.
Fix linker error with clang 3.2. Refs 1588.
Remove some useless includes.
This was SVN commit r13031.
2013-01-01 18:33:53 +00:00
61734c48d4
Fix a logic error that lead to reflections always being rendered. Might ref #1744
...
This was SVN commit r13013.
2012-12-23 10:50:30 +00:00
e7ef6a57ad
Fixes some build errors from the OS X 10.5 SDK, refs #1768
...
This was SVN commit r12998.
2012-12-18 22:58:34 +00:00
5c94761c3e
Fixes use of NULL for non-pointer type, fixes #1765
...
This was SVN commit r12997.
2012-12-18 22:52:55 +00:00
a4a060cd86
Fixes build warning and cleans up a few things
...
This was SVN commit r12895.
2012-11-26 02:28:35 +00:00
f456112492
Shadowmapping bugfixes and tweaks.
...
This was SVN commit r12884.
2012-11-25 18:35:59 +00:00
d4ea031334
Fix a warning, a bug, and modifies the setting for the Cycladic Archipelagos maps.
...
This was SVN commit r12838.
2012-11-10 07:48:43 +00:00
76676b1e38
Fix a non-fatal GL error, fix me forgetting to commit a file, remove the "3D" waviness setting as it was mostly redundant with HQ.
...
This was SVN commit r12822.
2012-11-05 12:14:04 +00:00