Commit Graph

12 Commits

Author SHA1 Message Date
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
0ef6c7555e Optimise VBO updates.
Some drivers (at least the Intel drivers on Windows) are slow at
incrementally updating a VBO with hundreds of calls to glBufferSubData
every frame. Performance is significantly better if you use
glBufferData(NULL) to tell it to discard all the previous contents, and
then re-upload all the data at once.

Update CVertexBuffer so that GL_DYNAMIC_DRAW/GL_STREAM_DRAW buffers are
handled with the new mechanism. This requires the caller to hold onto
the backing store so it can be re-uploaded when necessary, and needs a
bit more signalling to indicate exactly what needs uploading.

I see an improvement from roughly 60 to 75 fps on Intel HD Graphics
3000, Windows, 1024x768, Siwa Oasis.

This was SVN commit r16241.
2015-01-28 00:48:00 +00:00
vts
34fc883317 Pretty unit selection overlay rings. Fixes #824.
This was SVN commit r11623.
2012-04-22 04:04:02 +00:00
3916c25b84 Optimise vertex skinning code with SSE, based on patch by gruby.
Fixes #905.

This was SVN commit r10499.
2011-11-09 23:11:28 +00:00
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
2011-04-30 13:01:45 +00:00
2f28b07356 Support storing index data in VBOs.
Use index VBOs in model renderers, for performance.
Be more explicit about static/dynamic VBOs.
Add VBO usage to renderer stats.
Clean up some obsolete unused code.

This was SVN commit r9052.
2011-03-13 18:58:09 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +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
8c76dc34af g_keys[] has been made redundant by SDL's key array; use SDL_GetKeyState instead to get address of new keys array
fix W4 warnings (unused param and type conversion mostly)

This was SVN commit r3068.
2005-10-31 16:26:51 +00:00
13697b8512 Stupid bug in VertexArrayIterator template - forgot a return *this.
This was SVN commit r2854.
2005-10-05 16:54:10 +00:00
f1ee2cd66d Add the notion of render paths and an appropriate configuration option.
Add Ogl_Shader and Ogl_Program handle types for shaders/programs loaded
from
files.
In the vertexshader render path, use a vertex program for lighting for
optimization.

This was SVN commit r2853.
2005-10-05 16:42:09 +00:00
a05e712319 Added VertexArray & co. classes to simplify a flexible, render path dependent
vertex array layout.
Add CModelDefRData, a per-CModelDef render data class.

This was SVN commit r2826.
2005-10-02 21:11:11 +00:00