Commit Graph

41 Commits

Author SHA1 Message Date
RoosterDragon
9cd55df584 Ensure editorconfig naming styles align with StyleCop SA13XX style rules.
Aligns the naming conventions defined in editorconfig (dotnet_naming_style, dotnet_naming_symbols, dotnet_naming_rule) which are reported under the IDE1006 rule with the existing StyleCop rules from the SA13XX range.

This ensures the two rulesets agree when rejecting and accepting naming conventions within the IDE, with a few edges cases where only one ruleset can enforce the convention. IDE1006 allows use to specify a naming convention for type parameters, const locals and protected readonly fields which SA13XX cannot enforce. Some StyleCop SA13XX rules such as SA1309 'Field names should not begin with underscore' are not possible to enforce with the naming rules of IDE1006.

Therefore we enable the IDE1006 as a build time warning to enforce conventions and extend them. We disable SA13XX rules that can now be covered by IDE1006 to avoid double-reporting but leave the remaining SA13XX rules that cover additional cases enabled.

We also re-enable the SA1311 rule convention but enforce it via IDE1006, requiring some violations to be fixed or duplication of existing suppressions. Most violations fixes are trivial renames with the following exception. In ActorInitializer.cs, we prefer to make the fields private instead. ValueActorInit provides a publicly accessible property for access and OwnerInit provides a publicly accessible method. Health.cs is adjusted to access the property base instead when overriding. The reflection calls must be adjusted to target the base class specifically, as searching for a private field from the derived class will fail to locate it on the base class.

Unused suppressions were removed.
2022-02-07 19:14:45 +01:00
penev92
2f6f214bac Removed a bunch of explicit access modifiers 2022-01-09 18:58:37 +01:00
RoosterDragon
fc5f8fcd31 Fix indent 2021-09-26 15:49:48 +02:00
RoosterDragon
2f955e01f5 Fix style errors 2021-09-26 15:49:48 +02:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Paul Chote
bb15bd20c0 Add support for 16 bit floating point textures. 2021-05-16 14:10:32 +02:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Paul Chote
a6d393f19b Fix a crash when using legacy GL. 2021-05-04 09:46:31 +02:00
RoosterDragon
e11c8436bd Misc changes to reduce allocation:
- Avoid creating new strings in SpriteRenderer.Flush.
- ProductionQueue.CancelUnbuildableItems can exit early if the queue is empty. It can also use a set of names for quicker lookups.
- OpenGL.CheckGLError avoids a Enum.HasFlag call.
2020-10-17 23:48:48 +02:00
Paul Chote
fc844cfa6d Print the GL_RENDERER string to stdout on engine start. 2020-10-12 12:24:22 +02:00
Paul Chote
1ab1c30e39 Remove glGetTexImage/glBindFragDataLocation on GLES.
These functions are not available in GLES3.
2020-10-12 12:24:22 +02:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
Paul Chote
7ebca36a9c Disable debug callbacks on Intel HD 4000. 2020-04-25 21:03:43 +02:00
Paul Chote
dac1f270ce Restore legacy OpenGL 2.1 support. 2020-04-25 21:03:43 +02:00
Paul Chote
91c4179f05 Split GLProfile from GLFeatures. 2020-04-25 21:03:43 +02:00
Paul Chote
7b4019577d Force disable glDebugMessageCallback on Linux+AMD. 2020-02-15 11:38:30 +01:00
Paul Chote
1fada0f2b4 Add KHR suffix as defined by the KHR_debug spec. 2020-01-25 13:44:06 +01:00
Paul Chote
b08f9886be Add Graphics.DisableGLDebugMessageCallback setting. 2020-01-25 13:44:06 +01:00
Paul Chote
d622015b59 Fix Texture.GetData under GLES. 2020-01-12 17:04:23 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Chris Cameron
36c48e1785 feat: Using a glDebugMessageCallback instead of glGetError on devices that support it 2019-10-05 21:26:20 +01:00
Paul Chote
ce8112fb5a Migrate rendering to OpenGL 3.2 / OpenGL ES 3.0. 2019-09-12 18:58:37 +01:00
Paul Chote
91c63034d3 Clean references to disposed textures. 2019-09-12 18:58:37 +01:00
Paul Chote
1d106e71c4 Save screenshots via the frame buffer. 2019-09-04 20:20:04 +02:00
Paul Chote
09dd66fd5a Correctly fix BlendMode.Subtractive alpha handling. 2019-09-04 20:20:04 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
RoosterDragon
696d783a67 Improve out-of-memory logging with more details.
Also ensure that when OpenGL gives an out-of-memory error, we throw an OutOfMemoryException so the improved logging is triggered here too.
2016-09-16 07:35:08 +01:00
Paul Chote
ecebb2a844 Change depth function to <=. 2016-04-15 09:42:28 -04:00
Paul Chote
a8dda39a72 Introduce float3 type. 2016-04-10 09:41:01 -04:00
Paul Chote
bc0efbefd1 Include OpenGL version string in sysinfo. 2016-03-02 21:33:12 +01:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Paul Chote
6b0e4cf645 Unify framebuffer api naming. 2015-12-28 15:15:30 +00:00
Paul Chote
e69c3360f6 Reorganise GL initialisation. 2015-12-28 15:15:29 +00:00
Paul Chote
e63fc00b76 Unify framebuffer api naming. 2015-12-28 14:23:44 +00:00
Paul Chote
4372ed650e Move CheckGlVersion to OpenGL. 2015-12-28 10:59:43 +00:00
Paul Chote
d96a32a89f Move WriteGraphicsLog to OpenGL. 2015-12-28 10:57:43 +00:00
Paul Chote
397ca0f481 Replace MiniTK.Graphics with custom OpenGL shim. 2015-12-27 14:37:07 +00:00