15#ifndef vtkWin32OpenGLDXRenderWindow_h
16#define vtkWin32OpenGLDXRenderWindow_h
18#include "vtkRenderingOpenGL2Module.h"
24struct ID3D11DeviceContext;
25struct ID3D11Texture2D;
27VTK_ABI_NAMESPACE_BEGIN
88 void SetSize(
int width,
int height)
override;
95 vtkSetMacro(SharedTextureSamples,
int);
96 vtkGetMacro(SharedTextureSamples,
int);
106 void BlitToTexture(ID3D11Texture2D* color, ID3D11Texture2D* depth =
nullptr);
156 bool CreateTexture(UINT format, UINT bindFlags, ID3D11Texture2D** output);
157 void UpdateTextures();
160 std::unique_ptr<vtkInternals> Impl;
163 int SharedTextureSamples = 0;
a simple class to control print indentation
VTK render window providing OpenGL-DirectX interop.
void Unlock()
Lock/Unlock the shared texture.
vtkWin32OpenGLDXRenderWindow()
void Initialize() override
Overridden to create the D3D device, context and texture.
void SetColorTextureFormat(UINT format)
Specify the DXGI format of the D3D color texture shared with this render window.
void BlitToTexture(ID3D11Texture2D *color, ID3D11Texture2D *depth=nullptr)
Blits the internal D3D shared texture into color and optionally depth.
void RegisterSharedDisplayFramebuffer()
Register the DisplayFramebuffer of this window as a D3D shared texture.
void SetD3DDeviceContext(void *context)
Use external D3D11DeviceContext.
void InitializeDX()
Initialize D3D adapter, device and shared texture.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkWin32OpenGLDXRenderWindow() override
ID3D11Device * GetDevice()
Returns the D3D device associated to this render window.
void RegisterSharedTexture(unsigned int colorId, unsigned int depthId=0)
Register/Unregister the OpenGL textures designated by colorId and depthId with this render window int...
void Lock()
Lock/Unlock the shared texture.
static vtkWin32OpenGLDXRenderWindow * New()
ID3D11Texture2D * GetD3DSharedDepthTexture()
Returns the D3D texture shared with this render window.
void SetAdapterId(LUID uid)
Specify the DGXI adapter to be used for initialization.
ID3D11Texture2D * GetD3DSharedTexture()
Returns the D3D texture shared with this render window.
void SetD3DDeviceContext(ID3D11DeviceContext *context)
Use external D3D11DeviceContext.
void SetSize(int width, int height) override
Overridden to resize the internal D3D shared texture.
void UnregisterSharedTexture()
Register/Unregister the OpenGL textures designated by colorId and depthId with this render window int...
void BlitToTexture(void *color, void *depth=nullptr)
Blits the internal D3D shared texture into color and optionally depth.
void RegisterSharedRenderFramebuffer()
Register the RenderFramebuffer of this window as a D3D shared texture.