Skip to content

Tnc mgcb output - #7

Open
SirDragonClaw wants to merge 699 commits into
SirDragonClaw:developfrom
nkast:tncMGCBoutput
Open

Tnc mgcb output#7
SirDragonClaw wants to merge 699 commits into
SirDragonClaw:developfrom
nkast:tncMGCBoutput

Conversation

@SirDragonClaw

Copy link
Copy Markdown
Owner

No description provided.

@nkast
nkast force-pushed the tncMGCBoutput branch 2 times, most recently from 4ad4434 to 4ad421b Compare January 20, 2017 11:04
nkast and others added 22 commits April 21, 2017 06:33
Platforms that use the `GraphicsDeviceManager.Legacy.cs` (GL?) will
default to Reach profile. Just like the DX platforms since 3.6. Although
the profile is not enforced in any way on GL platforms.
[Linux Installer] Fix getting username that should run mdtool
Fix scroll wheel events on Windows Universal
…rtedGraphicsProfile

Remove GraphicsDevice.GetHighestSupportedGraphicsProfile()
Implement GetHashCode and ToString methods for Joystick
Fixed Gamepad DPad on Android
* Abort FileWatcher loop if ThreadAbortException is encountered.

* Simplified code
-Move property MaxTextureAnisotropy from GraphicsCapabilities.OpenGL.cs
to GraphicsCapabilities.cs
-Enforce MaxAnisotropy limit when we create SamplerState [DX].
GL already doing something similar
https://github.com/MonoGame/MonoGame/blob/7c3d6870a38f8a5e479e64d935d692f2610e1cda/MonoGame.Framework/Graphics/States/SamplerState.OpenGL.cs#L72

Feature level 9.1 Max Anisotropy = 2.
9.2 and up is 16.

Fixes: MonoGame#5674
Added Joystick.IsSupported property
Improve GamePadThumbSticks code
dneelyep and others added 28 commits September 29, 2017 21:19
Fixed the Pipeline tool to handle Importers without a DisplayName
…onoGame#5977)

* Fixed the Scissor rect calculation on DesktopGL

* Add Unit tests
Use desktop assembly of XAudio for DX projects
Currently if we hit a content problem on android the error
is swallowed. We need to throw it on the UI thread so that
it will get caught by the app exception handler.
This PR fixes some cases where ETC1 fallback wasn't working as expected, and expands the fallback support to allow NPOT and non-square textures to fall back to 16-bit formats instead of failing.

More unit tests added for texture compression.

If no rect is passed to Texture2D.SetData() that takes an optional rect, it passes the call to the full texture PlatformSetData instead for performance reasons.

Remove a try..catch on Android that was hiding ContentLoadException thrown during content load.

Fixes MonoGame#5983
The normalized value is not used in the Method after that.
In the beginning it creates a normalized copy of the plane.
Matrix.CreateReflection() normalizes/alters the *input* value
* Calculate the Client Bounds a bit later.
Fixes MonoGame#5935

* Use GetRealSize where we can
* [OpenGL] Rework Android Framebuffer Support

OpenTK removal also removed some support for frame buffers
on older devices. The old code was a bit of a mess with
mutliple FrameBuffer classes each doing the same thing.

This commit reworks the code to have one OpenGL FramebufferHelper
and moves all the loading of OpenGL extensions into the OpenGL.cs
class where they belong.

As a result GraphicsCapabilites was reworked to use the `Extensions`
property on the `GL` class. We also needed to rework when the
OpenGL entry points are loaded so ensure we have a current context.
If we don't we cannot get the extension strings from opengl since
it required a current context.

* Remvoed logging for Android

* Fixed problem of trying to create GLES 3.0 when its not supported
* GetBackBufferData implementation for OpenGL (Others are just stubs currently).

Docs:
http://msdn.microsoft.com/en-us/library/ff434115.aspx
http://stackoverflow.com/questions/1352864/how-to-get-uiimage-from-eaglview/1945733

refs MonoGame#1885

* DirectX implementation of PlatformGetBackBufferData

* Tidy up OpenGL implementation of PlatformGetBackBufferData to match and comment the public function

* Fix GL.ReadPixels call for IOS

* More comments on pixel formats by platform

* Support non byte[] for GL GetBackBufferData (Thanks @thefiddler)

* GetBackBufferData Windows Phone support

* Add GL binding for ReadPixels

* Wait for writer so it always completes

* Implement and test GetBackBufferData

* Re-remove GraphicsDevice.PSM (wrong merge)

* Improve OpenGL implementation

* Fix doc about format

* Typo in Protobuild definition

* Improve argument checks

* Revert changes for less garbage in GL impl

* Fix Web

* Fix Windows Phone build

* Fix Windows Universal build

* Flip y coordinate for OpenGL implementation

* Use PresentationParameters.BackBufferFormat

I though the actual BackBufferFormat wasn't stored anywhere, only the
preferred value, but the stuff in PresentationParams are the actual values
so this removes the extra field I added and just uses
PresentationParameters.BackBufferFormat.

* Improve argument checking

* Fix GetBackBufferData for DX

Previously when the Color format was specified (R8G8B8A8) it was changed
to BGRA before creating the swapchain. I think the reason for it is that
flipping the buffer is slightly faster when using BGRA because the native
format is BGRA, so no swizzling is needed when flipping the buffers.
In any case, this is not a breaking change and it makes more sense to use the
requested buffer format. People that want to optimize this far can
just request a BGRA backbuffer to get the fast flipping benefits.

* Remove wrong comment

* Remove GetHighestSupportedGraphicsProfile (wrong merge)

* Let MG MSAA test use GetBackBufferData

* MultiSampleCount was clamped twice for DX

* Improvements to DX GetBackBufferData

This commit essentially does 3 things:
- If a null rect is passed to GetBackBufferData it is passed through to
  PlatformGetBackBufferData so we can use functions that copy the whole
  backbuffer instead of part of it. This is likely more efficient.
  (only DX is handled in this commit, I'll do GL in the next)
- Fix copying MSAA'd backbuffer. In DX you can't copy a texture with MSAA
  to a staging resource directly, you need to copy it to a
  non-multisampled (non-staging) texture first.
- There were some weird duplicate operations happening in
  PlatformGetBackBufferData for DX, so I simplified it.

* Fix Web and GL

* Fix DX11 using

* Use ReflectionHelpers.SizeOf

* Clean up imports and WP preprocessor directive
* Simplified Plane.Normalize()

* use ref version of Vector3.Normalize() in Plane(Vector3, Vector3, Vector3)
…onoGame#6004)

Optimizations to Length and Normalize in Vector3 and Vector4
* Remove leftover WINDOWS_PHONE stuff

* Remove leftover WINDOWS_STOREAPP stuff
…6026)

Commit MonoGame@8b5bc3a#diff-fa10ad1a26f56dc77556dc3503b2028d
changed how mipmaps generation is handled. Part of that fix includes validation logic
executed when setting texture data Texture2D.SetData.

I have a none square texture 256x128 that correctly loaded in the past, but after
commit above I get the following exception on load:

Texture2D.cs:357

throw new ArgumentException("startIndex must be at least zero and smaller than data.Length.", "startIndex");

Turns out that when reading back mipmaps we hit a scenario for none square textures that
set width/height to 1x0 instead of 1x1 for smallest mipmap and that cause allocation of
0 length data buffer that in turn trigger ValidateParams to throw an exception.

Problem is the implementation of Texture2DReader.cs line 78,79:

int levelWidth = width >> level;
int levelHeight = height >> level;

Since that will transform to 1x0 for smallest mipmap of none square textures instead of 1x1.

Fix is to make sure we never get smaller than 1x1 in above statements.
@nkast
nkast deleted the tncMGCBoutput branch January 23, 2018 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.