This version is compatible with Windows 8 RTM and Visual Studio 2012 RTM.
New target assemblies released : Signed-net40, Signed-winrt. Nuget packages are now providing signed assemblies.
*Lots* of small enhancements, changes, bug fixes. See complete listing below.
SharpDX.Toolkit, a high level XNA like API for Direct3D11 is under heavy development. The toolkit is not yet part of the distribution but a Beta version should be released by the end of October. Currently implemented:
Friendly constructors for all resources (states, textures, rendertargets, buffers).
Image and Texture loading & saving for various formats (DDS, JPG, PNG, BMP, TIFF, GIF).
A full HLSL Effect / FX system, very similar to legacy FX system, using efficiently Direct3D11, compatible with Windows Desktop and Windows 8 Modern, with a custom compilers. All XNA stock effects (BasicEffect, DualTextureEffect...etc.) were successfully ported to it. The toolkit is coming with its own effect compiler (tkfxc) similar to standard fxc.exe.
Concerning support for Windows Phone 8 (WP8) nothing to announce yet until the official release of the WP8 SDK.
Changes and Fixes
The following listing is automatically generated from commit logs.
ALL
API Breaking changes: Old Color struct was BGRA (1st byte Blue, 2nd byte Green...etc.). It is now RGBA (for consistency with Color3/4). There is a new ColorBGRA struct (used mainly by Direct3D9). Move stock Colors to Color struct. Change mapping D3DCOLOR to SharpDX.ColorBGRA. (changes)
Remove return SharpDX.Result for all methods that are already checking the result. (changes)
Build
Add new configuration for net40. Update all csproj (except Samples/*.csproj). Update build to support new binaries (Standard-net40, Signed-net40), update nuget specs with n40 target. Change all public key for signed assemblies, as the private key was lost. (changes)
Fix app manifest/certificates for Win8 and build (changes)
Fix build for Win8 with latest changes in handling SharpDX.Result (changes)
Fix issue #244. Breaking change for SharpDX.Color. Create SharpDX.ColorBGRA. Update SharpGen mapping to D3DCOLOR to ColorBGRA. Update Color and ColorBGRA for consistency. Remove implicit convertor from Color4 to Color. (changes)
Add support for packed int (used for count). Delayed Reader/Writer initialization based on Mode. Add object[], List<object> serializers. Switchback to AllowNull, AllowIdentity properties instead of methods. Update Tests. (changes)
Add pluggable Image Load/Save through register method (changes)
Add PrimitiveType to all Draw methods. Add SetIndexBuffer / SetVertexBuffers methods. (changes)
Add RenderTarget, ShaderResource and UnorderedAccess view selectors on Texture. Fix GraphicsDevice.SetContent for textures. Change name in GraphicsDeviceFeatures (changes)
Add RenderTarget3D. Add support for correct initial textures for all versions Texture1D,2D,3D (changes)
Add SamplerState object with default states. (changes)
Add several methods from DeviceContext (ClearState, Flush, Draw, Dispatch... etc.) (changes)
Add support for additional bindings in Buffer.Raw constructors (changes)
Add support for all Buffers (Constant, Index, Vertex, Structured, StructuredAppend, StructuredCounter, Raw, RenderTarget) (changes)
Add support for Buffer.GetData/SetData with offsetInBytes handling (changes)
Add support for case insensitive semantic declaration. (changes)
Add support for dynamic attributes Vector2/3/4 to EffectBytecode (changes)
Add support for sub-pass in at runtime (in order to fully support BasicEffect) (changes)
Add support TextureCube, RenderTargetCube. Refactor Texture1/2/3D and RenderTarget1/2/3D. Improves GraphicsDevice.GetData/SetData for textures. (changes)
Add support to save DDS image. Tests completed for DDS. (changes)
Fix constructors for all RenderTarget1D 2D and 3D (changes)
Fix constructors using generics for all Texture. Fix slice selector. Add tests for Texture1D. Fix all resources to use MainDevice instead of current device. (changes)
Fix documentation for BlendState, DepthStencilState, RasterizerState (changes)
Fix GraphicsDevice.GetContent and SetContent. Add MipMapDescription class. Fix Texture.Load and Texture.Save, now fully working and pass tests. \o/ (changes)
Fix handling of Blend/DepthStencil/Rasterizer states at the effect level. Rename GraphicsDevice.Get/SetContent to GetData/SetData and move them to Buffer/Texture. (changes)
GraphicsDevice add check method to retrieve maxium MSAA count (changes)
Improve Constant buffer handling in Effect. (changes)
Improves methods coherence between Texture1D/2D and RenderTarget1D/2D (changes)
Make all effect constant buffers not shared by default (in order to keep compatibility with XNA effects). (changes)
Make constant buffers not shareable by default. Include generated bytecode for StockEffects into the project. Update tkfxc to support generating C# code with embedded effect bytecode. (changes)
Move all DeviceContext dependent operations (Copy/GetData/SetData) to GraphicsDevice (changes)
UpdateSubresource only valid for ResourceUsage.Default and not immutable (changes)
Use count instead of size for Structured and Typed buffers (changes)
Use DDSFlags.None instead of ForceDX10Ext (changes)
Use of Graphics.CurrentSafe for internal usage for all resource creations. (changes)
Work on Texture2D/RenderTarget2D to support Texture arrays, mip levels and multi-samples. (changes)
Work on VertexBuffer/VertexBufferLayout declarations, unfinished. (changes)
Toolkit.Graphics.Compiler
Add support for legacy D3D9 compile expression (VertexShader = compile vs_2_0 VS();). Get translated to vs/ps_4_0_level_9_1 (for 2_0) or level_9_3 (for 3_0) (changes)
[Toolkit] Loading fx filesthanks! it's true there is no vertexshader. i thought that spriteeffect is taking care of the vertex part like it did in xna.
toolkit skyboxHi,
i would like to know what would be the best way to implement a skybox with the toolkit 2.5 dev rel?
Are there any tutorials or examples for that?
I'd like to implement a starmap like skybox in a kind of space game which i built on top of the toolkit...
Compiling SharpDX, SharpDXSamples, and SharpDXToolkitSamples from GithubCompiling SharpDX, SharpDXSamples, and SharpDXToolkitSamples from the Github Sources
Hi everyone, I thought I'd share some of my experiences and workarounds for some of the problems I encountered when trying to compile SharpDX and some of the samples from...
SharpDX VideoPlayerIn my WinForms .NET 4.0 application I want to play video with sound on panel. Anyone can give a simple example to do this? Or at least classes names in al arge set of classes. Thank you!
Can't drawbitmap when use WicRenderTargetI am doing an application on Windows Store Apps, and want to draw some bitmaps and save to a png file.
Code Removed
and I got the error message:
An unhandled exception of type 'System.AccessViolationException' occurred in...