1
0
forked from 0ad/0ad
Commit Graph

16 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
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
dcf5a2667f CLogger: Use cppformat instead of sys_vswprintf.
sys_vswprintf relies on platform-specific printf implementations, which
vary widely between platforms (in handling of truncation, return values,
use of %s/%S/%hs/%ls for mixing char and wchar_t strings, etc) and are
therefore a pain.

Use cppformat's fmt::sprintf instead, which has very similar syntax to
sprintf but is more C++ish and is portable.

Also, wchar_t is stupid, so use char* strings (which are expected to be
UTF-8) in CLogger. This creates a bit of a pain with changing all
callers to convert to char* strings, but that's their fault for not
using UTF-8 already.

Refs #3011.

This was SVN commit r16182.
2015-01-22 20:30:05 +00:00
30e851ab90 Forward-declare CShaderProgramPtr, to avoid pulling in more headers than necessary and to hypothetically reduce build times by a minuscule amount.
This was SVN commit r15481.
2014-07-02 22:36:45 +00:00
b1c081e36d Set svn:eol-style=native, fix some inconsistent line endings
This was SVN commit r14299.
2013-12-06 00:42:50 +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
91169c82c7 Optimise rendering of scrollable text boxes by clipping
Add optional clipping rectangle to CTextRenderer. Strings that are
printed
outside the vertical extent of the clipping rectangle will be
immediately
skipped. This greatly reduces the cost of large scrollable text boxes.

This was SVN commit r14019.
2013-10-18 16:05:02 +00:00
751558d894 Optimise text rendering by batching
When CTextRenderer is given multiple strings with no differences other
than position, render them in a single glDrawElements call to reduce
driver overhead.

Also avoid some unnecessary copies of std::wstrings.

This helps performance a bit with large GUI text boxes.

This was SVN commit r14018.
2013-10-18 16:02:48 +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
c888c00377 Avoid unnecessary use of printf in text renderer.
This was SVN commit r11154.
2012-02-25 17:14:47 +00:00
531b40578a More GLES compatibility.
Add config option to disable hardware cursors on Windows.

This was SVN commit r11053.
2012-02-12 20:45:31 +00:00
db85833655 More GLES compatibility.
Move more rendering code to shader API.

This was SVN commit r11050.
2012-02-12 13:20:49 +00:00
41e3bad341 More build fixes for FreeBSD.
Adds BSD sysdep.
Adds support for MAKE variable, overriding make command in our build
scripts.
Fixes more files not ending with newline.

This was SVN commit r10994.
2012-01-31 00:06:56 +00:00
cc5a0fba4e Use shader API for GUI text.
Flip GUI quads so we don't have to disable back-face culling.

This was SVN commit r10989.
2012-01-30 00:27:23 +00:00
63572a5247 Fix build
This was SVN commit r10986.
2012-01-29 20:16:47 +00:00
04c63a4093 Clean up some text rendering to avoid relying on deprecated GL matrix state.
Use scissor instead of deprecated clip planes for GUI text.
Remove unused support for generic font names.

This was SVN commit r10985.
2012-01-29 20:04:21 +00:00