home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
General
Concept: Switch MP2 to D3D11/D2D rendering
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Lightning303" data-source="post: 1121465" data-attributes="member: 97876"><p>Ok, will try. Was under the impression i had to use the same as the backbuffer, so i checked here: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/171a9df98446c36194ff97ede49f7a7f8cba3692/MediaPortal/Source/UI/SkinEngine/DirectX11/GraphicsDevice11.cs#L205" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/171a9df98446c36194ff97ede49f7a7f8cba3692/MediaPortal/Source/UI/SkinEngine/DirectX11/GraphicsDevice11.cs#L205</a></p><p>But gonna try with those settings.</p><p></p><p></p><p></p><p>Gonna try to finish the other way first, and then have look at this <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>Thanks!</p><p></p><p></p><p>Edit:</p><p>Creating the brush with this target bitmap:</p><p>[code] Bitmap1 captureFrame = new Bitmap1(GraphicsDevice11.Instance.Context2D1, new Size2(bitmapWidth, bitmapHeight), new BitmapProperties1(new PixelFormat(Format.B8G8R8A8_UNorm, AlphaMode.Premultiplied), 96, 96, BitmapOptions.Target));</p><p>[/code]</p><p></p><p>gives this error:</p><p>[code][2015-01-22 18:05:02,490] [9003 ] [DX Render] [ERROR] - AtmoLight: Exception: HRESULT: [0x88990021], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_BITMAP_CANNOT_DRAW/BitmapCannotDraw], Message: Unknown</p><p>[/code]</p><p></p><p>No warnings from MP2 anymore though.</p><p></p><p></p><p>Edit 2:</p><p>Second approach from EVRCallback doest work aswell, or im just to dumb.</p><p></p><p>[code] RenderTarget2DAsset renderTarget = ContentManager.Instance.GetRenderTarget2D("AtmoLight");</p><p> renderTarget.AllocateRenderTarget(bitmapWidth, bitmapHeight);</p><p> renderTarget.Bitmap.CopyFromBitmap(SkinContext.Device11.RenderTarget2D);[/code]</p><p></p><p>throws</p><p></p><p>[code][2015-01-22 21:39:57,380] [10762 ] [DX Render] [ERROR] - AtmoLight: Exception: HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: Falscher Parameter.</p><p>[/code]</p><p></p><p>for copyfrombitmap.</p></blockquote><p></p>
[QUOTE="Lightning303, post: 1121465, member: 97876"] Ok, will try. Was under the impression i had to use the same as the backbuffer, so i checked here: [url]https://github.com/MediaPortal/MediaPortal-2/blob/171a9df98446c36194ff97ede49f7a7f8cba3692/MediaPortal/Source/UI/SkinEngine/DirectX11/GraphicsDevice11.cs#L205[/url] But gonna try with those settings. Gonna try to finish the other way first, and then have look at this :) Thanks! Edit: Creating the brush with this target bitmap: [code] Bitmap1 captureFrame = new Bitmap1(GraphicsDevice11.Instance.Context2D1, new Size2(bitmapWidth, bitmapHeight), new BitmapProperties1(new PixelFormat(Format.B8G8R8A8_UNorm, AlphaMode.Premultiplied), 96, 96, BitmapOptions.Target)); [/code] gives this error: [code][2015-01-22 18:05:02,490] [9003 ] [DX Render] [ERROR] - AtmoLight: Exception: HRESULT: [0x88990021], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_BITMAP_CANNOT_DRAW/BitmapCannotDraw], Message: Unknown [/code] No warnings from MP2 anymore though. Edit 2: Second approach from EVRCallback doest work aswell, or im just to dumb. [code] RenderTarget2DAsset renderTarget = ContentManager.Instance.GetRenderTarget2D("AtmoLight"); renderTarget.AllocateRenderTarget(bitmapWidth, bitmapHeight); renderTarget.Bitmap.CopyFromBitmap(SkinContext.Device11.RenderTarget2D);[/code] throws [code][2015-01-22 21:39:57,380] [10762 ] [DX Render] [ERROR] - AtmoLight: Exception: HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: Falscher Parameter. [/code] for copyfrombitmap. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
General
Concept: Switch MP2 to D3D11/D2D rendering
Contact us
RSS
Top
Bottom