Noesis / Managed

NoesisGUI Managed SDK
Other
94 stars 14 forks source link

Texture is abstract #7

Closed aienabled closed 2 years ago

aienabled commented 2 years ago

Hi guys, there is a problem with 3.1.1 (or maybe even 3.1.0 as I've not tried it): https://github.com/Noesis/Managed/blob/825f1668e7c24e10f5ac385c10b6f1d0004dc049/Src/Noesis/Core/Src/Proxies/TextureExtend.cs#L58

The Texture class is abstract: https://github.com/Noesis/Managed/blob/825f1668e7c24e10f5ac385c10b6f1d0004dc049/Src/Noesis/Core/Src/Proxies/Texture.cs#L18

I guess the code above should be changed to new NativeTexture(...).

Regards!

aienabled commented 2 years ago

And there is another issue:

System.EntryPointNotFoundException: Unable to find an entry point named 'Noesis_WrapD3D11Texture' in DLL 'Noesis'.
   at Noesis.Texture.Noesis_WrapD3D11Texture(IntPtr nativePointer, Int32 width, Int32 height, Int32 numMipMaps, Boolean isInverted)

Apparently, there is only Noesis_WrapTexture function available now in Noesis.dll (I'm using runtimes\win-x64\native\Noesis.dll as usual).

Regards!

s-fernandez-v commented 2 years ago

That TextureExtend.cs file should have been removed from the repository when upgrading to 3.1.0, it was replaced by Noesis/Core/Src/Core/Texture.cs

I'm going to fix it now, thanks for reporting it.

aienabled commented 2 years ago

I see. Hmm...so how do I wrap a D3D11 texture to NoesisGUI texture object now?

s-fernandez-v commented 2 years ago

Wrap code is moved to specific RenderDevice implementation:

RenderDeviceD3D11.WrapTexture()
RenderDeviceGL.WrapTexture()
...
aienabled commented 2 years ago

Thank you, Sergio! I was not aware of this change by reading the release notes. It works now.

Regards!