rendertarget

GDI rendering to direct2D ID2D1BitmapRenderTarget is always transparent

倖福魔咒の 提交于 2019-12-07 08:18:40
问题 I want to port my movie rendering software from DirectDraw to Direct2D. Because of compatibility issues, GDI rendering needs to be done on top of the image. To optimize performance I want to implement some kind of backbuffer mechanism, but there seems to be a problem with the alpha channel information, all GDI drawing appears somehow transparent . I create a ID2D1HwndRenderTarget for my window handle and and a ID2D1Bitmap to copy the images to. The pixelformat of the bitmap is DXGI_FORMAT

Changing RenderTarget Results in Purple Screen?

↘锁芯ラ 提交于 2019-12-07 06:19:56
问题 I'm attempting to change RenderTargets at runtime, so I can draw some elements at runtime, manipulate them and then finally draw the texture to the screen. Problem is, the screen turns purple if I change the RenderTarget at runtime. Here's the code I've got in Draw: RenderTarget2D tempTarget = new RenderTarget2D(GraphicsDevice, 128, 128, 1, GraphicsDevice.DisplayMode.Format, GraphicsDevice.PresentationParameters.MultiSampleType, GraphicsDevice.PresentationParameters.MultiSampleQuality,

Add render target to default framebuffer of QOpenGLWidget

眉间皱痕 提交于 2019-12-06 11:29:23
I'd like to add a second render target to the default framebuffer of a QOpenGLWidget. The reason is that I'd like to implement object picking and check whether the user hit an object by rendering a segmentation mask into gl_FragData[1] . Unfortunately, you can only retrieve the GLuint handle from the widget and there is no constructor of QOpenGLFramebufferObject that takes in the handle and there is no other option to retrieve the framebuffer. Is there any possibility to attach another texture to the default frame buffer of the widget without workarounds? The only two options I can think of

GDI rendering to direct2D ID2D1BitmapRenderTarget is always transparent

五迷三道 提交于 2019-12-05 16:20:11
I want to port my movie rendering software from DirectDraw to Direct2D. Because of compatibility issues, GDI rendering needs to be done on top of the image. To optimize performance I want to implement some kind of backbuffer mechanism, but there seems to be a problem with the alpha channel information, all GDI drawing appears somehow transparent . I create a ID2D1HwndRenderTarget for my window handle and and a ID2D1Bitmap to copy the images to. The pixelformat of the bitmap is DXGI_FORMAT_B8G8R8A8_UNORM , the alpha mode is D2D1_ALPHA_MODE_IGNORE . The HwdRenderTarget is GDI compatible, so my

Changing RenderTarget Results in Purple Screen?

时光怂恿深爱的人放手 提交于 2019-12-05 08:26:07
I'm attempting to change RenderTargets at runtime, so I can draw some elements at runtime, manipulate them and then finally draw the texture to the screen. Problem is, the screen turns purple if I change the RenderTarget at runtime. Here's the code I've got in Draw: RenderTarget2D tempTarget = new RenderTarget2D(GraphicsDevice, 128, 128, 1, GraphicsDevice.DisplayMode.Format, GraphicsDevice.PresentationParameters.MultiSampleType, GraphicsDevice.PresentationParameters.MultiSampleQuality, RenderTargetUsage.PreserveContents); GraphicsDevice.SetRenderTarget(0, tempTarget); GraphicsDevice.Clear