Commit Graph

60 Commits

Author SHA1 Message Date
Paul Chote
91807cb53c Remove redundant StyleCop definitions. 2014-12-25 10:10:57 +01:00
Paul Chote
3086cc6154 Disable SA1024 and SA1035.
These rules generate many false positives, and do not help with code readability within OpenRA.
2014-12-25 10:10:57 +01:00
Paul Chote
1317101662 Add support for hardware cursors. 2014-12-23 22:09:22 +13:00
RoosterDragon
f0f02dff5c Dispose of graphics resources deterministically.
Textures, FrameBuffers and VertexBuffers allocated by the Sdl2 Renderer were only being released via finalizers. This could lead to OpenGL out of memory errors since resources may not be cleaned up in a timely manner. To avoid this, IDisposable has been implemented and transitively applied to classes that use these resources.

As a side-effect some static state is no longer static, particularly in Renderer, in order to facilitate this change and just for nicer design in general.

Also dispose some bitmaps.
2014-12-22 17:34:01 +00:00
Paul Chote
6b1505b71d Add an aspect ratio correction flag to VqaPlayerWidget. 2014-10-11 23:05:34 +13:00
steelphase
628463f920 remove copy local
remove copy local from project references
2014-10-08 02:29:14 -04:00
ImagoTrigger
eb2124bb89 Adds ability to paste text (ctrl/cmd+v) into chat. 2014-09-13 09:41:59 +12:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
RoosterDragon
e0d8d8cf80 Clean up project settings.
- Create single platform config named x86 and have all projects target x86.
- Remove Release config (broken anyway).
- For the Debug config, ensure TRACE and DEBUG constants are set and unsafe code is allowed for all projects (same as the makefile).
- Warn level 4 and optimizations off were removed from the config automatically by VS (it assumes these values by default, and these match the makefile).
- The CrashDialog project can reuse the icon from the Game project as long as the path is set correctly.
- Fix TS project so it builds (I know it's going but its annoying that the project must be unloaded).
2014-06-20 19:29:54 +01:00
Gordon Martin
89c9499909 Removing requirement to restart game after applying changes to mouse focus option. The setting now defaults to 'false' as it is likely to be disruptive to players who are used to the usual behaviour in windowed mode. 2014-06-12 22:57:25 +01:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
ScottNZ
40e9fb93d6 Revert project file changes by RoosterDragon which would cause the TD mod to fail to load for some reason on Windows (de7a837d94, #5403).
VS will also generate a warning if it tries to source an icon from somewhere not in the project directory, so added it to the CrashDialog folder.
2014-05-26 00:07:30 +12:00
Chris Forbes
5eb61dbdd2 Merge pull request #5411 from RoosterDragon/general-clean
General Cleanup
2014-05-25 11:03:03 +12:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
RoosterDragon
de7a837d94 Unify settings for solution and project setups.
Create a single solution platform named x86.
Ensure both Debug and Release configs build to the root for all projects.
Ensure all Release configs generate pdbs.
2014-05-23 08:16:09 +01:00
reaperrr
f7506b8a79 Fix warning message when compiling under Windows (MSBuild/VS). 2014-05-13 14:45:53 +02:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Matthias Mailänder
67cd0645a4 update to .NET 4.0 2014-04-09 20:20:26 +12:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
71c6124c10 Tidy renderer dependencies. 2013-10-30 22:31:34 +13:00
ScottNZ
b654b65d8d Close game interface before showing crash form and don't show it at all on dedicated servers. 2013-08-29 01:30:29 +12:00
Paul Chote
a1dd7cff7b Support additive blending for D2K explosions. 2013-08-14 17:31:02 +12:00
Matthias Mailänder
59b700fcde StyleCop clean renderer DLLs 2013-08-07 15:42:34 +02:00
Matthias Mailänder
79355bbb32 remove unused AssemblyInfos 2013-08-07 15:42:29 +02:00
Matthias Mailänder
f02bfbf0c2 disable StyleCop rules SA1115 and SA1116
closes #3562
2013-08-07 13:50:23 +02:00
Matthias Mailänder
a35a046ede disable more StyleCop rules based on @pchote's wishlist 2013-07-11 20:29:00 +02:00
Matthias Mailänder
8bb5b5700b added StyleCop support
with some rules we disagree with disabled
2013-07-08 19:42:32 +02:00
Paul Chote
52335a37bf Allow/require renderers to enable alpha blending when needed. Fixes voxel shadow issues. 2013-06-15 19:31:52 +12:00
Paul Chote
4c22193446 Remove obsolete Stencil Buffer functions. 2013-06-15 19:31:52 +12:00
Paul Chote
22e6966c8e Texture changes:
* The GL texture id is now readonly.
* Added Size property.
* Added GetData() for reading data back from the GPU.
* Added SetEmpty() for creating an empty texture of a given size.
2013-06-15 19:16:07 +12:00
Paul Chote
4c8c010506 Expose FBOs to engine code. 2013-06-15 19:16:07 +12:00
Paul Chote
f6264eeba4 Expose stencil buffer to render code.
The intention is to provide a layer for tracking shadow
rendering, so a single bit is sufficient for now.
2013-06-04 20:25:21 +12:00
Paul Chote
1b34c7d6b9 Expose depth buffer to render code. 2013-06-04 20:25:21 +12:00
Paul Chote
9566385aac Add renderer support for additional vec* uniforms. 2013-06-04 20:25:20 +12:00
Paul Chote
064938378f Add renderer support for matrix uniforms. 2013-06-04 20:25:20 +12:00
Paul Chote
21e8e3a78d Remove unnecessary duplication between renderers. 2013-03-08 00:07:26 +13:00
Paul Chote
786c3b1f1a Rename uniform setters to avoid future ambiguity. 2013-03-04 19:06:42 +13:00
James Dunne
aac78773f4 Upgraded to VS2010 2012-06-26 20:39:56 -05:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
16fa2f2c1e sort file lists in projectfiles, fix newlines 2011-09-16 08:57:11 +12:00
Chris Forbes
3051b147f5 fix whitespace in NullGraphicsDevice 2011-08-09 08:51:36 +12:00
Chris Forbes
a79cc0a0e0 drop unused parameter on IGraphicsDevice.Clear() 2011-08-09 08:51:36 +12:00
Paul Chote
6183621a72 Scale line-width to match zoom. 2011-07-25 22:23:17 +12:00
Chris Forbes
b0ccc58516 remove unused vsync parameter from renderers 2011-07-17 17:55:52 +12:00
Chris Forbes
dcd9627c22 fixed #989: don't do renderer setup in a reflected call. 2011-07-14 20:29:03 +12:00
Chris Forbes
5ecc1ebefc split IGraphicsDevice.{Present,PumpInput} 2011-05-22 22:10:48 +12:00
Chris Forbes
9434dd993a slight cleanup in Renderer 2011-05-22 20:38:57 +12:00
Chris Forbes
4d6b2c7954 IBOless rendering with quads; considerably reduces renderer complexity 2011-05-18 20:42:10 +12:00
Paul Chote
b0425aff3b Renormalize line endings and fix copyright headers again. 2011-04-07 21:15:42 +12:00
Chris Forbes
16cb275a5f fix rendering of very large maps 2011-03-08 19:24:15 +13:00