Main Site login Signup

Efficient way to render to Monogame Texture2D?

I've seen a lot of talk about implementing my own ISurface but no actual examples of how I'd do that, there was one in a gist but that gist is gone now...

Ideally I'd like to keep everything on the GPU, as ultimately that's where I need it (I'm working on SteamVR Dashboard Overlays, which you pass an OpenGL Texture ID to), of course it's also a lot more efficient too.

Anyone got an example of the best way to go about this? I've tried using Mashal to copy the BitmapSurface buffer into a byte array and then into a texture on the BitmapSurface.Updated event but it's way, way too slow - scrolling the page looks incredibly choppy. Oddly though, while scrolling was slow this fish demo was reasonably speedy (not as speedy as in Chrome though)

When using EnableGPUAcceleration, access to the GPU buffer (whether it be OGL or DX11 render target) would be incredibly helpful here I think.

asked Jun 16, 2016 at 04:18 PM avatar image BenWoodford 0
more ▼
(comments are locked)
10|1100 characters needed characters left

1 answer: sort voted first

If you are having issues with your rendertarget being progressively resized when drawing it elsewhere, you could simply have an off-screen rendertarget with a set size that you duplicate your completed RT. Presently a day everybody is looking the best answer for writing an immaculate one. For satisfying it they rely on essay writing organization. Online essay writing organization will turn into an impeccable guide in essay writing.

answered Nov 22, 2016 at 09:19 AM avatar image AustinBaker 0
more ▼
(comments are locked)
10|1100 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.