VTK  9.4.20241230
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkWebGPURenderWindow Class Referenceabstract

WebGPU rendering window. More...

#include <vtkWebGPURenderWindow.h>

Inheritance diagram for vtkWebGPURenderWindow:
[legend]
Collaboration diagram for vtkWebGPURenderWindow:
[legend]

Classes

struct  MappingContext
 
struct  vtkWGPUColorAttachment
 
struct  vtkWGPUDeptStencil
 
struct  vtkWGPUFullScreenQuad
 
struct  vtkWGPUUserStagingPixelData
 

Public Types

typedef vtkRenderWindow Superclass
 
- Public Types inherited from vtkRenderWindow
enum  { PhysicalToWorldMatrixModified = vtkCommand::UserEvent + 200 }
 
typedef vtkWindow Superclass
 
- Public Types inherited from vtkWindow
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkWebGPURenderWindowNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
virtual bool WindowSetup ()=0
 Concrete render windows must create a platform window and initialize this->WindowId.
 
virtual void CreateAWindow ()=0
 Create a not-off-screen window.
 
virtual void DestroyWindow ()=0
 Destroy a not-off-screen window.
 
void Initialize () override
 Creates the WebGPU context, swapchain, depth buffer, color attachment, ...
 
void Start () override
 Start the rendering process for a frame.
 
void End () override
 Update the system, if needed, at end of render process.
 
void Render () override
 Handle opengl specific code and calls superclass.
 
void StereoMidpoint () override
 Intermediate method performs operations required between the rendering of the left and right eye.
 
void Frame () override
 A termination method performed at the end of the rendering process to do things like swapping buffers (if necessary) or similar actions.
 
const char * GetRenderingBackend () override
 What rendering backend has the user requested.
 
void ReadPixels ()
 Reads pixels into the CachedPixelBytes variable.
 
int GetColorBufferSizes (int *rgba) override
 Get the size of the color buffer.
 
void WaitForCompletion () override
 Block the thread until work queue completes all submitted work.
 
int SupportsOpenGL () override
 Does this render window support OpenGL? 0-false, 1-true.
 
const char * ReportCapabilities () override
 Get report of capabilities for the render window.
 
bool InitializeFromCurrentContext () override
 Initialize the render window from the information associated with the currently activated OpenGL context.
 
void ReleaseGraphicsResources (vtkWindow *) override
 Free up any graphics resources associated with this window a value of NULL means the context may already be destroyed.
 
void SetWGPUConfiguration (vtkWebGPUConfiguration *config)
 
 vtkGetSmartPointerMacro (WGPUConfiguration, vtkWebGPUConfiguration)
 
 vtkGetNewMacro (WGPUShaderDatabase, vtkWebGPUShaderDatabase)
 Get a database of all WebGPU shader source codes in VTK.
 
 vtkGetNewMacro (WGPUPipelineCache, vtkWebGPURenderPipelineCache)
 Get the pipeline cache for this renderer.
 
std::string PreprocessShaderSource (const std::string &source) const
 Replaces all include statements in the given source code with source code corresponding to the included file from the database.
 
wgpu::RenderPassEncoder NewRenderPass (wgpu::RenderPassDescriptor &descriptor)
 Create a new render pass encoder on the webgpu device.
 
wgpu::RenderBundleEncoder NewRenderBundleEncoder (wgpu::RenderBundleEncoderDescriptor &descriptor)
 Create a new render bundle encoder on the webgpu device.
 
wgpu::CommandEncoder GetCommandEncoder ()
 Get the currently used command encoder.
 
void CreateCommandEncoder ()
 Initializes a new command encoder.
 
void FlushCommandBuffers (vtkTypeUInt32 count, wgpu::CommandBuffer *buffers)
 Sends a given command buffer to the device queue.
 
wgpu::TextureView GetOffscreenColorAttachmentView ()
 Get a view of the color attachment used in the offscreen render target.
 
wgpu::TextureView GetDepthStencilView ()
 Get a view of the depth-stencil attachment used in the offscreen render target.
 
wgpu::TextureFormat GetDepthStencilFormat ()
 Get the texture format of the depth-stencil attachment.
 
bool HasStencil ()
 Whether the offscreen render target has stencil capabilities.
 
wgpu::Device GetDevice ()
 Get the webgpu device.
 
wgpu::Adapter GetAdapter ()
 Get the webgpu adapter.
 
wgpu::TextureFormat GetPreferredSurfaceTextureFormat ()
 Get the texture format preferred for the surface.
 
unsigned char * GetPixelData (int x, int y, int x2, int y2, int front, int right) override
 Set/Get the pixel data of an image, transmitted as RGBRGB... front in this context indicates that the read should come from the display buffer versus the render buffer.
 
int GetPixelData (int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data, int right) override
 Set/Get the pixel data of an image, transmitted as RGBRGB... front in this context indicates that the read should come from the display buffer versus the render buffer.
 
int SetPixelData (int x, int y, int x2, int y2, unsigned char *data, int front, int right) override
 Set/Get the pixel data of an image, transmitted as RGBRGB... front in this context indicates that the read should come from the display buffer versus the render buffer.
 
int SetPixelData (int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int right) override
 Set/Get the pixel data of an image, transmitted as RGBRGB... front in this context indicates that the read should come from the display buffer versus the render buffer.
 
float * GetRGBAPixelData (int x, int y, int x2, int y2, int front, int right=0) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
int GetRGBAPixelData (int x, int y, int x2, int y2, int front, vtkFloatArray *data, int right=0) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
int SetRGBAPixelData (int x, int y, int x2, int y2, float *data, int front, int blend=0, int right=0) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
int SetRGBAPixelData (int x, int y, int x2, int y2, vtkFloatArray *data, int front, int blend=0, int right=0) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
void ReleaseRGBAPixelData (float *data) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
unsigned char * GetRGBACharPixelData (int x, int y, int x2, int y2, int front, int right=0) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
int GetRGBACharPixelData (int x, int y, int x2, int y2, int front, vtkUnsignedCharArray *data, int right=0) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
int SetRGBACharPixelData (int x, int y, int x2, int y2, unsigned char *data, int front, int blend=0, int right=0) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
int SetRGBACharPixelData (int x, int y, int x2, int y2, vtkUnsignedCharArray *data, int front, int blend=0, int right=0) override
 Set/Get the pixel data of an image, transmitted as RGBARGBA...
 
float * GetZbufferData (int x1, int y1, int x2, int y2) override
 Set/Get the zbuffer data from an image.
 
int GetZbufferData (int x1, int y1, int x2, int y2, float *z) override
 Set/Get the zbuffer data from an image.
 
int GetZbufferData (int x1, int y1, int x2, int y2, vtkFloatArray *buffer) override
 Set/Get the zbuffer data from an image.
 
int SetZbufferData (int x1, int y1, int x2, int y2, float *buffer) override
 Set/Get the zbuffer data from an image.
 
int SetZbufferData (int x1, int y1, int x2, int y2, vtkFloatArray *buffer) override
 Set/Get the zbuffer data from an image.
 
vtkSmartPointer< vtkWebGPUComputeRenderTextureAcquireDepthBufferRenderTexture ()
 Returns a vtkWebGPUComputeRenderTexture ready to be added to a compute pipeline using vtkWebGPUComputePipeline::AddRenderTexture() that "points" to the depth buffer/color texture of this vtkWebGPURenderWindow.
 
vtkSmartPointer< vtkWebGPUComputeRenderTextureAcquireFramebufferRenderTexture ()
 Returns a vtkWebGPUComputeRenderTexture ready to be added to a compute pipeline using vtkWebGPUComputePipeline::AddRenderTexture() that "points" to the depth buffer/color texture of this vtkWebGPURenderWindow.
 
- Public Member Functions inherited from vtkRenderWindow
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkRenderWindowNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
virtual void AddRenderer (vtkRenderer *)
 Add a renderer to the list of renderers.
 
void RemoveRenderer (vtkRenderer *)
 Remove a renderer from the list of renderers.
 
vtkTypeBool HasRenderer (vtkRenderer *)
 Query if a renderer is in the list of renderers.
 
virtual const char * GetRenderingBackend ()
 What rendering backend has the user requested.
 
 vtkGetNewMacro (RenderTimer, vtkRenderTimerLog)
 Get the render timer log for this window.
 
vtkRendererCollectionGetRenderers ()
 Return the collection of renderers in the render window.
 
void CaptureGL2PSSpecialProps (vtkCollection *specialProps)
 The GL2PS exporter must handle certain props in a special way (e.g.
 
void Render () override
 Ask each renderer owned by this RenderWindow to render its image and synchronize this process.
 
virtual void Start ()
 Start the rendering process for a frame.
 
virtual void End ()
 Update the system, if needed, at end of render process.
 
virtual void Initialize ()
 Initializes the rendering process.
 
virtual void Finalize ()
 Finalize the rendering process.
 
virtual void Frame ()
 A termination method performed at the end of the rendering process to do things like swapping buffers (if necessary) or similar actions.
 
virtual void WaitForCompletion ()
 Block the thread until the actual rendering is finished().
 
virtual void CopyResultFrame ()
 Performed at the end of the rendering process to generate image.
 
virtual vtkRenderWindowInteractorMakeRenderWindowInteractor ()
 Create an interactor to control renderers in this window.
 
virtual void StereoUpdate ()
 Update the system, if needed, due to stereo rendering.
 
virtual void StereoMidpoint ()
 Intermediate method performs operations required between the rendering of the left and right eye.
 
virtual void StereoRenderComplete ()
 Handles work required once both views have been rendered when using stereo rendering.
 
virtual void WindowRemap ()
 Remap the rendering window.
 
virtual vtkTypeBool GetEventPending ()
 Check to see if a mouse button has been pressed.
 
virtual int CheckInRenderStatus ()
 Are we rendering at the moment.
 
virtual void ClearInRenderStatus ()
 Clear status (after an exception was thrown for example)
 
virtual void SetInteractor (vtkRenderWindowInteractor *)
 Set the interactor to the render window.
 
void UnRegister (vtkObjectBase *o) override
 This Method detects loops of RenderWindow<->Interactor, so objects are freed properly.
 
virtual bool InitializeFromCurrentContext ()
 Initialize the render window from the information associated with the currently activated OpenGL context.
 
virtual bool IsCurrent ()
 Tells if this window is the current graphics context for the calling thread.
 
virtual void SetForceMakeCurrent ()
 If called, allow MakeCurrent() to skip cache-check when called.
 
virtual const char * ReportCapabilities ()
 Get report of capabilities for the render window.
 
virtual int SupportsOpenGL ()
 Does this render window support OpenGL? 0-false, 1-true.
 
virtual vtkTypeBool IsDirect ()
 Is this render window using hardware acceleration? 0-false, 1-true.
 
virtual int GetDepthBufferSize ()
 This method should be defined by the subclass.
 
virtual int GetColorBufferSizes (int *)
 Get the size of the color buffer.
 
virtual int GetNumberOfDevices ()
 Returns the number of devices (graphics cards) on a system.
 
virtual void SetPhysicalToWorldMatrix (vtkMatrix4x4 *matrix)
 Set physical to world transform matrix.
 
virtual void GetPhysicalToWorldMatrix (vtkMatrix4x4 *matrix)
 Get physical to world transform matrix.
 
virtual bool GetDeviceToWorldMatrixForDevice (vtkEventDataDevice device, vtkMatrix4x4 *deviceToWorldMatrix)
 Store in deviceToWorldMatrix the matrix that goes from device coordinates to world coordinates.
 
virtual int GetCapturingGL2PSSpecialProps ()
 Returns true if the render process is capturing text actors.
 
virtual bool GetInitialized ()
 Get/set whether or not the window has been initilized yet.
 
virtual void HideCursor ()
 Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to display a 3D cursor instead.
 
virtual void ShowCursor ()
 Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to display a 3D cursor instead.
 
virtual void SetCursorPosition (int, int)
 Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to display a 3D cursor instead.
 
virtual void SetCurrentCursor (int)
 Change the shape of the cursor.
 
virtual int GetCurrentCursor ()
 Change the shape of the cursor.
 
 vtkSetFilePathMacro (CursorFileName)
 Set/Get the full path to the custom cursor.
 
 vtkGetFilePathMacro (CursorFileName)
 Set/Get the full path to the custom cursor.
 
virtual void SetFullScreen (vtkTypeBool)
 Turn on/off rendering full screen window size.
 
virtual vtkTypeBool GetFullScreen ()
 Turn on/off rendering full screen window size.
 
virtual void FullScreenOn ()
 Turn on/off rendering full screen window size.
 
virtual void FullScreenOff ()
 Turn on/off rendering full screen window size.
 
virtual void SetBorders (vtkTypeBool)
 Turn on/off window manager borders.
 
virtual vtkTypeBool GetBorders ()
 Turn on/off window manager borders.
 
virtual void BordersOn ()
 Turn on/off window manager borders.
 
virtual void BordersOff ()
 Turn on/off window manager borders.
 
virtual vtkTypeBool GetCoverable ()
 Set/Get whether windows should be coverable (as opposed to always on top).
 
virtual void CoverableOn ()
 Set/Get whether windows should be coverable (as opposed to always on top).
 
virtual void CoverableOff ()
 Set/Get whether windows should be coverable (as opposed to always on top).
 
virtual void SetCoverable (vtkTypeBool coverable)
 Set/Get whether windows should be coverable (as opposed to always on top).
 
virtual vtkTypeBool GetStereoCapableWindow ()
 Prescribe that the window be created in a stereo-capable mode.
 
virtual void StereoCapableWindowOn ()
 Prescribe that the window be created in a stereo-capable mode.
 
virtual void StereoCapableWindowOff ()
 Prescribe that the window be created in a stereo-capable mode.
 
virtual void SetStereoCapableWindow (vtkTypeBool capable)
 Prescribe that the window be created in a stereo-capable mode.
 
virtual vtkTypeBool GetStereoRender ()
 Turn on/off stereo rendering.
 
void SetStereoRender (vtkTypeBool stereo)
 Turn on/off stereo rendering.
 
virtual void StereoRenderOn ()
 Turn on/off stereo rendering.
 
virtual void StereoRenderOff ()
 Turn on/off stereo rendering.
 
virtual void SetAlphaBitPlanes (vtkTypeBool)
 Turn on/off the use of alpha bitplanes.
 
virtual vtkTypeBool GetAlphaBitPlanes ()
 Turn on/off the use of alpha bitplanes.
 
virtual void AlphaBitPlanesOn ()
 Turn on/off the use of alpha bitplanes.
 
virtual void AlphaBitPlanesOff ()
 Turn on/off the use of alpha bitplanes.
 
virtual void SetPointSmoothing (vtkTypeBool)
 Turn on/off point smoothing.
 
virtual vtkTypeBool GetPointSmoothing ()
 Turn on/off point smoothing.
 
virtual void PointSmoothingOn ()
 Turn on/off point smoothing.
 
virtual void PointSmoothingOff ()
 Turn on/off point smoothing.
 
virtual void SetLineSmoothing (vtkTypeBool)
 Turn on/off line smoothing.
 
virtual vtkTypeBool GetLineSmoothing ()
 Turn on/off line smoothing.
 
virtual void LineSmoothingOn ()
 Turn on/off line smoothing.
 
virtual void LineSmoothingOff ()
 Turn on/off line smoothing.
 
virtual void SetPolygonSmoothing (vtkTypeBool)
 Turn on/off polygon smoothing.
 
virtual vtkTypeBool GetPolygonSmoothing ()
 Turn on/off polygon smoothing.
 
virtual void PolygonSmoothingOn ()
 Turn on/off polygon smoothing.
 
virtual void PolygonSmoothingOff ()
 Turn on/off polygon smoothing.
 
virtual int GetStereoType ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoType (int)
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToCrystalEyes ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToRedBlue ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToInterlaced ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToLeft ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToRight ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToDresden ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToAnaglyph ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToCheckerboard ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToSplitViewportHorizontal ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToFake ()
 Set/Get what type of stereo rendering to use.
 
void SetStereoTypeToEmulate ()
 Set/Get what type of stereo rendering to use.
 
virtual void SetAnaglyphColorSaturation (float)
 Set/get the anaglyph color saturation factor.
 
virtual float GetAnaglyphColorSaturation ()
 Set/get the anaglyph color saturation factor.
 
virtual void SetAnaglyphColorMask (int, int)
 Set/get the anaglyph color mask values.
 
void SetAnaglyphColorMask (int[2])
 Set/get the anaglyph color mask values.
 
virtual int * GetAnaglyphColorMask ()
 Set/get the anaglyph color mask values.
 
virtual void GetAnaglyphColorMask (int data[2])
 Set/get the anaglyph color mask values.
 
virtual void SetSwapBuffers (vtkTypeBool)
 Turn on/off buffer swapping between images.
 
virtual vtkTypeBool GetSwapBuffers ()
 Turn on/off buffer swapping between images.
 
virtual void SwapBuffersOn ()
 Turn on/off buffer swapping between images.
 
virtual void SwapBuffersOff ()
 Turn on/off buffer swapping between images.
 
float GetZbufferDataAtPoint (int x, int y)
 Set/Get the zbuffer data from the frame buffer.
 
virtual int GetNeverRendered ()
 This flag is set if the window hasn't rendered since it was created.
 
virtual int GetAbortRender ()
 This is a flag that can be set to interrupt a rendering that is in progress.
 
virtual void SetAbortRender (int)
 This is a flag that can be set to interrupt a rendering that is in progress.
 
virtual int GetInAbortCheck ()
 This is a flag that can be set to interrupt a rendering that is in progress.
 
virtual void SetInAbortCheck (int)
 This is a flag that can be set to interrupt a rendering that is in progress.
 
virtual int CheckAbortStatus ()
 This is a flag that can be set to interrupt a rendering that is in progress.
 
virtual void SetDesiredUpdateRate (double)
 Set/Get the desired update rate.
 
virtual double GetDesiredUpdateRate ()
 Set/Get the desired update rate.
 
virtual int GetNumberOfLayers ()
 Get the number of layers for renderers.
 
virtual void SetNumberOfLayers (int)
 Get the number of layers for renderers.
 
virtual vtkRenderWindowInteractorGetInteractor ()
 Get the interactor associated with this render window.
 
void SetDisplayId (void *) override
 Dummy stubs for vtkWindow API.
 
void SetWindowId (void *) override
 Dummy stubs for vtkWindow API.
 
virtual void SetNextWindowId (void *)
 Dummy stubs for vtkWindow API.
 
void SetParentId (void *) override
 Dummy stubs for vtkWindow API.
 
void * GetGenericDisplayId () override
 Dummy stubs for vtkWindow API.
 
void * GetGenericWindowId () override
 Dummy stubs for vtkWindow API.
 
void * GetGenericParentId () override
 Dummy stubs for vtkWindow API.
 
void * GetGenericContext () override
 Dummy stubs for vtkWindow API.
 
void * GetGenericDrawable () override
 Dummy stubs for vtkWindow API.
 
void SetWindowInfo (const char *) override
 Dummy stubs for vtkWindow API.
 
virtual void SetNextWindowInfo (const char *)
 Dummy stubs for vtkWindow API.
 
void SetParentInfo (const char *) override
 Dummy stubs for vtkWindow API.
 
virtual void SetSharedRenderWindow (vtkRenderWindow *)
 Set/Get an already existing window that this window should share data with if possible.
 
virtual vtkRenderWindowGetSharedRenderWindow ()
 Set/Get an already existing window that this window should share data with if possible.
 
virtual bool GetPlatformSupportsRenderWindowSharing ()
 Set/Get an already existing window that this window should share data with if possible.
 
virtual void SetMultiSamples (int)
 Set / Get the number of multisamples to use for hardware antialiasing.
 
virtual int GetMultiSamples ()
 Set / Get the number of multisamples to use for hardware antialiasing.
 
virtual void SetStencilCapable (vtkTypeBool)
 Set / Get the availability of the stencil buffer.
 
virtual vtkTypeBool GetStencilCapable ()
 Set / Get the availability of the stencil buffer.
 
virtual void StencilCapableOn ()
 Set / Get the availability of the stencil buffer.
 
virtual void StencilCapableOff ()
 Set / Get the availability of the stencil buffer.
 
virtual void SetDeviceIndex (int)
 If there are several graphics card installed on a system, this index can be used to specify which card you want to render to.
 
virtual int GetDeviceIndex ()
 If there are several graphics card installed on a system, this index can be used to specify which card you want to render to.
 
virtual bool GetUseSRGBColorSpace ()
 Set/Get if we want this window to use the sRGB color space.
 
virtual void SetUseSRGBColorSpace (bool)
 Set/Get if we want this window to use the sRGB color space.
 
virtual void UseSRGBColorSpaceOn ()
 Set/Get if we want this window to use the sRGB color space.
 
virtual void UseSRGBColorSpaceOff ()
 Set/Get if we want this window to use the sRGB color space.
 
virtual void SetPhysicalViewDirection (double, double, double)
 Set/get physical coordinate system in world coordinate system.
 
virtual void SetPhysicalViewDirection (double[3])
 Set/get physical coordinate system in world coordinate system.
 
virtual double * GetPhysicalViewDirection ()
 Set/get physical coordinate system in world coordinate system.
 
virtual void GetPhysicalViewDirection (double &, double &, double &)
 Set/get physical coordinate system in world coordinate system.
 
virtual void GetPhysicalViewDirection (double[3])
 Set/get physical coordinate system in world coordinate system.
 
virtual void SetPhysicalViewUp (double, double, double)
 Set/get physical coordinate system in world coordinate system.
 
virtual void SetPhysicalViewUp (double[3])
 Set/get physical coordinate system in world coordinate system.
 
virtual double * GetPhysicalViewUp ()
 Set/get physical coordinate system in world coordinate system.
 
virtual void GetPhysicalViewUp (double &, double &, double &)
 Set/get physical coordinate system in world coordinate system.
 
virtual void GetPhysicalViewUp (double[3])
 Set/get physical coordinate system in world coordinate system.
 
virtual void SetPhysicalTranslation (double, double, double)
 Set/get physical coordinate system in world coordinate system.
 
virtual void SetPhysicalTranslation (double[3])
 Set/get physical coordinate system in world coordinate system.
 
virtual double * GetPhysicalTranslation ()
 Set/get physical coordinate system in world coordinate system.
 
virtual void GetPhysicalTranslation (double &, double &, double &)
 Set/get physical coordinate system in world coordinate system.
 
virtual void GetPhysicalTranslation (double[3])
 Set/get physical coordinate system in world coordinate system.
 
virtual void SetPhysicalScale (double)
 Set/get physical coordinate system in world coordinate system.
 
virtual double GetPhysicalScale ()
 Set/get physical coordinate system in world coordinate system.
 
virtual bool GetEnableTranslucentSurface ()
 Set/Get if we want this window to use a translucent surface with alpha channel support.
 
virtual void SetEnableTranslucentSurface (bool)
 Set/Get if we want this window to use a translucent surface with alpha channel support.
 
virtual void EnableTranslucentSurfaceOn ()
 Set/Get if we want this window to use a translucent surface with alpha channel support.
 
virtual void EnableTranslucentSurfaceOff ()
 Set/Get if we want this window to use a translucent surface with alpha channel support.
 
const char * GetStereoTypeAsString ()
 Returns the stereo type as a string.
 
- Public Member Functions inherited from vtkWindow
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkWindowNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
int * GetActualSize ()
 GetSize() returns the size * this->TileScale, whereas this method returns the size without multiplying with the tile scale.
 
virtual int * GetScreenSize ()
 Get the current size of the screen in pixels.
 
virtual void SetIcon (vtkImageData *)
 Set the icon used in title bar and task bar.
 
virtual VTK_UNBLOCKTHREADS void Render ()
 Ask each viewport owned by this Window to render its image and synchronize this process.
 
virtual void ReleaseGraphicsResources (vtkWindow *)
 Release any graphics resources that are being consumed by this texture.
 
virtual bool DetectDPI ()
 Attempt to detect and set the DPI of the display device by querying the system.
 
vtkTypeBool GetOffScreenRendering ()
 Deprecated, directly use GetShowWindow and GetOffScreenBuffers instead.
 
virtual void MakeCurrent ()
 Make the window current.
 
virtual void ReleaseCurrent ()
 Release the current context.
 
virtual bool EnsureDisplay ()
 These are window system independent methods that are used to help interface vtkWindow to native windowing systems.
 
virtual int * GetPosition ()
 Get the position (x and y) of the rendering window in screen coordinates (in pixels).
 
virtual void SetPosition (int x, int y)
 Set the position (x and y) of the rendering window in screen coordinates (in pixels).
 
virtual void SetPosition (int a[2])
 Get the position (x and y) of the rendering window in screen coordinates (in pixels).
 
virtual int * GetSize ()
 Get the size (width and height) of the rendering window in screen coordinates (in pixels).
 
virtual void SetSize (int width, int height)
 Set the size (width and height) of the rendering window in screen coordinates (in pixels).
 
virtual void SetSize (int a[2])
 Get the size (width and height) of the rendering window in screen coordinates (in pixels).
 
virtual vtkTypeBool GetMapped ()
 Keep track of whether the rendering window has been mapped to screen.
 
virtual bool GetShowWindow ()
 Show or not Show the window.
 
virtual void SetShowWindow (bool)
 Show or not Show the window.
 
virtual void ShowWindowOn ()
 Show or not Show the window.
 
virtual void ShowWindowOff ()
 Show or not Show the window.
 
virtual void SetUseOffScreenBuffers (bool)
 Render to an offscreen destination such as a framebuffer.
 
virtual bool GetUseOffScreenBuffers ()
 Render to an offscreen destination such as a framebuffer.
 
virtual void UseOffScreenBuffersOn ()
 Render to an offscreen destination such as a framebuffer.
 
virtual void UseOffScreenBuffersOff ()
 Render to an offscreen destination such as a framebuffer.
 
virtual void SetErase (vtkTypeBool)
 Turn on/off erasing the screen between images.
 
virtual vtkTypeBool GetErase ()
 Turn on/off erasing the screen between images.
 
virtual void EraseOn ()
 Turn on/off erasing the screen between images.
 
virtual void EraseOff ()
 Turn on/off erasing the screen between images.
 
virtual void SetDoubleBuffer (vtkTypeBool)
 Keep track of whether double buffering is on or off.
 
virtual vtkTypeBool GetDoubleBuffer ()
 Keep track of whether double buffering is on or off.
 
virtual void DoubleBufferOn ()
 Keep track of whether double buffering is on or off.
 
virtual void DoubleBufferOff ()
 Keep track of whether double buffering is on or off.
 
virtual char * GetWindowName ()
 Get name of rendering window.
 
virtual void SetWindowName (const char *)
 Get name of rendering window.
 
virtual int GetDPI ()
 Return a best estimate to the dots per inch of the display device being rendered (or printed).
 
virtual void SetDPI (int)
 Return a best estimate to the dots per inch of the display device being rendered (or printed).
 
void SetOffScreenRendering (vtkTypeBool val)
 Convenience to set SHowWindow and UseOffScreenBuffers in one call.
 
virtual void OffScreenRenderingOn ()
 Convenience to set SHowWindow and UseOffScreenBuffers in one call.
 
virtual void OffScreenRenderingOff ()
 Convenience to set SHowWindow and UseOffScreenBuffers in one call.
 
virtual void SetTileScale (int, int)
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
void SetTileScale (int[2])
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
virtual int * GetTileScale ()
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
virtual void GetTileScale (int &, int &)
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
virtual void GetTileScale (int[2])
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
void SetTileScale (int s)
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
virtual void SetTileViewport (double, double, double, double)
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
virtual void SetTileViewport (double[4])
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
virtual double * GetTileViewport ()
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
virtual void GetTileViewport (double &, double &, double &, double &)
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
virtual void GetTileViewport (double[4])
 These methods are used by vtkWindowToImageFilter to tell a VTK window to simulate a larger window by tiling.
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on.
 
virtual void DebugOff ()
 Turn debugging output off.
 
bool GetDebug ()
 Get the value of the debug flag.
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag.
 
virtual void Modified ()
 Update the modification time for this object.
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
vtkTypeBool InvokeEvent (unsigned long event)
 
vtkTypeBool InvokeEvent (const char *event)
 
std::string GetObjectDescription () const override
 The object description printed in messages and PrintSelf output.
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method.
 
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes.
 
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes.
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string.
 
virtual std::string GetObjectDescription () const
 The object description printed in messages and PrintSelf output.
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
virtual void Delete ()
 Delete a VTK object.
 
virtual void FastDelete ()
 Delete a reference to this object.
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream.
 
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object).
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object).
 
int GetReferenceCount ()
 Return the current reference count of this object.
 
void SetReferenceCount (int)
 Sets the reference count.
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space.
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not.
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkWebGPURenderWindowSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkRenderWindow
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkRenderWindowSafeDownCast (vtkObjectBase *o)
 
static vtkRenderWindowNew ()
 Construct an instance of vtkRenderWindow with its screen size set to 300x300, borders turned on, positioned at (0,0), double buffering turned on.
 
static const char * GetRenderLibrary ()
 What rendering library has the user requested.
 
static const char * GetStereoTypeAsString (int type)
 Returns the stereo type as a string.
 
- Static Public Member Functions inherited from vtkWindow
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkWindowSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
 
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class.
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkWebGPURenderWindow ()
 
 ~vtkWebGPURenderWindow () override
 
virtual std::string MakeDefaultWindowNameWithBackend ()=0
 Construct the window title as "Visualization Toolkit - <WindowSystem> <GraphicsBackend>" Ex: "Visualization Toolkit - X11 Vulkan" "Visualization Toolkit - X11 OpenGL" "Visualization Toolkit - Cocoa Metal" "Visualization Toolkit - Cocoa OpenGL" "Visualization Toolkit - Win32 D3D12".
 
bool WGPUInit ()
 
void WGPUFinalize ()
 
void ConfigureSurface ()
 
void UnconfigureSurface ()
 
void CreateOffscreenColorAttachments ()
 
void DestroyOffscreenColorAttachments ()
 
void CreateDepthStencilTexture ()
 
void DestroyDepthStencilTexture ()
 
void CreateFSQGraphicsPipeline ()
 
void DestroyFSQGraphicsPipeline ()
 
void RecreateComputeRenderTextures ()
 
void RenderOffscreenTexture ()
 
- Protected Member Functions inherited from vtkRenderWindow
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkRenderWindow ()
 
 ~vtkRenderWindow () override
 
virtual void DoStereoRender ()
 
- Protected Member Functions inherited from vtkWindow
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkWindow ()
 
 ~vtkWindow () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events.
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void ObjectFinalize ()
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

bool RenderTexturesSetup = false
 
wgpu::Surface Surface
 
wgpu::CommandEncoder CommandEncoder
 
int SurfaceConfiguredSize [2]
 
wgpu::TextureFormat PreferredSurfaceTextureFormat = wgpu::TextureFormat::BGRA8Unorm
 
vtkWGPUDeptStencil DepthStencil
 
vtkWGPUColorAttachment ColorAttachment
 
vtkWGPUUserStagingPixelData StagingPixelData
 
vtkWGPUFullScreenQuad FSQ
 
struct vtkWebGPURenderWindow::MappingContext BufferMapReadContext
 
vtkNew< vtkTypeUInt8Array > CachedPixelBytes
 
vtkSmartPointer< vtkWebGPUConfigurationWGPUConfiguration
 
vtkNew< vtkWebGPUShaderDatabaseWGPUShaderDatabase
 
vtkNew< vtkWebGPURenderPipelineCacheWGPUPipelineCache
 
int ScreenSize [2]
 
- Protected Attributes inherited from vtkRenderWindow
vtkRendererCollectionRenderers
 
vtkNew< vtkRenderTimerLogRenderTimer
 
vtkTypeBool Borders
 
vtkTypeBool Coverable
 
vtkTypeBool FullScreen
 
int OldScreen [5]
 
vtkTypeBool PointSmoothing
 
vtkTypeBool LineSmoothing
 
vtkTypeBool PolygonSmoothing
 
vtkTypeBool StereoRender
 
int StereoType
 
vtkTypeBool StereoCapableWindow
 
vtkTypeBool AlphaBitPlanes
 
vtkRenderWindowInteractorInteractor
 
vtkSmartPointer< vtkUnsignedCharArrayStereoBuffer
 
vtkSmartPointer< vtkUnsignedCharArrayResultFrame
 
vtkTypeBool SwapBuffers
 
double DesiredUpdateRate
 
int AbortRender
 
int InAbortCheck
 
int InRender
 
int NeverRendered
 
int NumberOfLayers
 
int CurrentCursor
 
float AnaglyphColorSaturation
 
int AnaglyphColorMask [2]
 
int MultiSamples
 
vtkTypeBool StencilCapable
 
int CapturingGL2PSSpecialProps
 
int DeviceIndex
 
bool UseSRGBColorSpace
 
char * CursorFileName
 
double AbortCheckTime
 The universal time since the last abort check occurred.
 
vtkRenderWindowSharedRenderWindow
 
double PhysicalViewDirection [3] = { 0.0, 0.0, -1.0 }
 
double PhysicalViewUp [3] = { 0.0, 1.0, 0.0 }
 
double PhysicalTranslation [3] = { 0.0, 0.0, 0.0 }
 
double PhysicalScale = 1.0
 
bool EnableTranslucentSurface = false
 
bool Initialized = false
 
- Protected Attributes inherited from vtkWindow
char * WindowName
 
int Size [2]
 
int Position [2]
 
vtkTypeBool Mapped
 
bool ShowWindow
 
bool UseOffScreenBuffers
 
vtkTypeBool Erase
 
vtkTypeBool DoubleBuffer
 
int DPI
 
double TileViewport [4]
 
int TileSize [2]
 
int TileScale [2]
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
std::string ObjectName
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkWebGPUComputeOcclusionCuller
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

WebGPU rendering window.

vtkWebGPURenderWindow is a concrete implementation of the abstract class vtkRenderWindow. vtkWebGPURenderer interfaces to the WebGPU graphics library. Application programmers should normally use vtkRenderWindow instead of the WebGPU specific version.

Tests:
vtkWebGPURenderWindow (Tests)

Definition at line 34 of file vtkWebGPURenderWindow.h.

Member Typedef Documentation

◆ Superclass

Definition at line 37 of file vtkWebGPURenderWindow.h.

Constructor & Destructor Documentation

◆ vtkWebGPURenderWindow()

vtkWebGPURenderWindow::vtkWebGPURenderWindow ( )
protected

◆ ~vtkWebGPURenderWindow()

vtkWebGPURenderWindow::~vtkWebGPURenderWindow ( )
overrideprotected

Member Function Documentation

◆ IsTypeOf()

static vtkTypeBool vtkWebGPURenderWindow::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkWebGPURenderWindow::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkRenderWindow.

Reimplemented in vtkSDL2WebGPURenderWindow, vtkWebAssemblyWebGPURenderWindow, and vtkXWebGPURenderWindow.

◆ SafeDownCast()

static vtkWebGPURenderWindow * vtkWebGPURenderWindow::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkWebGPURenderWindow::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkWebGPURenderWindow * vtkWebGPURenderWindow::NewInstance ( ) const

◆ PrintSelf()

void vtkWebGPURenderWindow::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkRenderWindow.

Reimplemented in vtkXWebGPURenderWindow.

◆ WindowSetup()

virtual bool vtkWebGPURenderWindow::WindowSetup ( )
pure virtual

Concrete render windows must create a platform window and initialize this->WindowId.

Upon success, please call WGPUInit().

Implemented in vtkWebAssemblyWebGPURenderWindow, and vtkXWebGPURenderWindow.

◆ CreateAWindow()

virtual void vtkWebGPURenderWindow::CreateAWindow ( )
pure virtual

Create a not-off-screen window.

Implemented in vtkSDL2WebGPURenderWindow, vtkWebAssemblyWebGPURenderWindow, and vtkXWebGPURenderWindow.

◆ DestroyWindow()

virtual void vtkWebGPURenderWindow::DestroyWindow ( )
pure virtual

Destroy a not-off-screen window.

Implemented in vtkSDL2WebGPURenderWindow, vtkWebAssemblyWebGPURenderWindow, and vtkXWebGPURenderWindow.

◆ Initialize()

void vtkWebGPURenderWindow::Initialize ( )
overridevirtual

Creates the WebGPU context, swapchain, depth buffer, color attachment, ...

A call to this function is necessary if a WebGPU Compute class is going to use resources of the render window or its renderers (or resources of the renderers, mappers for example). This is because the resources of the render window are only made available when Initialize() is called.

For example, a vtkWebGPUOcclusionCuller (which uses textures of the render window to do the culling) cannot be setup without these resources being available, hence the need for the Initialize() call.

Reimplemented from vtkRenderWindow.

◆ Start()

void vtkWebGPURenderWindow::Start ( )
overridevirtual

Start the rendering process for a frame.

Reimplemented from vtkRenderWindow.

◆ End()

void vtkWebGPURenderWindow::End ( )
overridevirtual

Update the system, if needed, at end of render process.

Reimplemented from vtkRenderWindow.

◆ Render()

void vtkWebGPURenderWindow::Render ( )
overridevirtual

Handle opengl specific code and calls superclass.

Reimplemented from vtkRenderWindow.

Reimplemented in vtkXWebGPURenderWindow.

◆ StereoMidpoint()

void vtkWebGPURenderWindow::StereoMidpoint ( )
overridevirtual

Intermediate method performs operations required between the rendering of the left and right eye.

Reimplemented from vtkRenderWindow.

◆ Frame()

void vtkWebGPURenderWindow::Frame ( )
overridevirtual

A termination method performed at the end of the rendering process to do things like swapping buffers (if necessary) or similar actions.

Reimplemented from vtkRenderWindow.

Reimplemented in vtkXWebGPURenderWindow.

◆ GetRenderingBackend()

const char * vtkWebGPURenderWindow::GetRenderingBackend ( )
overridevirtual

What rendering backend has the user requested.

Reimplemented from vtkRenderWindow.

◆ ReadPixels()

void vtkWebGPURenderWindow::ReadPixels ( )

Reads pixels into the CachedPixelBytes variable.

◆ GetPixelData() [1/2]

unsigned char * vtkWebGPURenderWindow::GetPixelData ( int  x,
int  y,
int  x2,
int  y2,
int  front,
int  right 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBRGB... front in this context indicates that the read should come from the display buffer versus the render buffer.

Reimplemented from vtkWindow.

◆ GetPixelData() [2/2]

int vtkWebGPURenderWindow::GetPixelData ( int  x,
int  y,
int  x2,
int  y2,
int  front,
vtkUnsignedCharArray data,
int  right 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBRGB... front in this context indicates that the read should come from the display buffer versus the render buffer.

Reimplemented from vtkWindow.

◆ SetPixelData() [1/2]

int vtkWebGPURenderWindow::SetPixelData ( int  x,
int  y,
int  x2,
int  y2,
unsigned char *  data,
int  front,
int  right 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBRGB... front in this context indicates that the read should come from the display buffer versus the render buffer.

Reimplemented from vtkRenderWindow.

◆ SetPixelData() [2/2]

int vtkWebGPURenderWindow::SetPixelData ( int  x,
int  y,
int  x2,
int  y2,
vtkUnsignedCharArray data,
int  front,
int  right 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBRGB... front in this context indicates that the read should come from the display buffer versus the render buffer.

Reimplemented from vtkRenderWindow.

◆ GetRGBAPixelData() [1/2]

float * vtkWebGPURenderWindow::GetRGBAPixelData ( int  x,
int  y,
int  x2,
int  y2,
int  front,
int  right = 0 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ GetRGBAPixelData() [2/2]

int vtkWebGPURenderWindow::GetRGBAPixelData ( int  x,
int  y,
int  x2,
int  y2,
int  front,
vtkFloatArray data,
int  right = 0 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ SetRGBAPixelData() [1/2]

int vtkWebGPURenderWindow::SetRGBAPixelData ( int  x,
int  y,
int  x2,
int  y2,
float *  data,
int  front,
int  blend = 0,
int  right = 0 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ SetRGBAPixelData() [2/2]

int vtkWebGPURenderWindow::SetRGBAPixelData ( int  x,
int  y,
int  x2,
int  y2,
vtkFloatArray data,
int  front,
int  blend = 0,
int  right = 0 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ ReleaseRGBAPixelData()

void vtkWebGPURenderWindow::ReleaseRGBAPixelData ( float *  data)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ GetRGBACharPixelData() [1/2]

unsigned char * vtkWebGPURenderWindow::GetRGBACharPixelData ( int  x,
int  y,
int  x2,
int  y2,
int  front,
int  right = 0 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ GetRGBACharPixelData() [2/2]

int vtkWebGPURenderWindow::GetRGBACharPixelData ( int  x,
int  y,
int  x2,
int  y2,
int  front,
vtkUnsignedCharArray data,
int  right = 0 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ SetRGBACharPixelData() [1/2]

int vtkWebGPURenderWindow::SetRGBACharPixelData ( int  x,
int  y,
int  x2,
int  y2,
unsigned char *  data,
int  front,
int  blend = 0,
int  right = 0 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ SetRGBACharPixelData() [2/2]

int vtkWebGPURenderWindow::SetRGBACharPixelData ( int  x,
int  y,
int  x2,
int  y2,
vtkUnsignedCharArray data,
int  front,
int  blend = 0,
int  right = 0 
)
overridevirtual

Set/Get the pixel data of an image, transmitted as RGBARGBA...

Reimplemented from vtkRenderWindow.

◆ GetZbufferData() [1/3]

float * vtkWebGPURenderWindow::GetZbufferData ( int  x1,
int  y1,
int  x2,
int  y2 
)
overridevirtual

Set/Get the zbuffer data from an image.

Reimplemented from vtkRenderWindow.

◆ GetZbufferData() [2/3]

int vtkWebGPURenderWindow::GetZbufferData ( int  x1,
int  y1,
int  x2,
int  y2,
float *  z 
)
overridevirtual

Set/Get the zbuffer data from an image.

Reimplemented from vtkRenderWindow.

◆ GetZbufferData() [3/3]

int vtkWebGPURenderWindow::GetZbufferData ( int  x1,
int  y1,
int  x2,
int  y2,
vtkFloatArray buffer 
)
overridevirtual

Set/Get the zbuffer data from an image.

Reimplemented from vtkRenderWindow.

◆ SetZbufferData() [1/2]

int vtkWebGPURenderWindow::SetZbufferData ( int  x1,
int  y1,
int  x2,
int  y2,
float *  buffer 
)
overridevirtual

Set/Get the zbuffer data from an image.

Reimplemented from vtkRenderWindow.

◆ SetZbufferData() [2/2]

int vtkWebGPURenderWindow::SetZbufferData ( int  x1,
int  y1,
int  x2,
int  y2,
vtkFloatArray buffer 
)
overridevirtual

Set/Get the zbuffer data from an image.

Reimplemented from vtkRenderWindow.

◆ GetColorBufferSizes()

int vtkWebGPURenderWindow::GetColorBufferSizes ( int *  rgba)
overridevirtual

Get the size of the color buffer.

Returns 0 if not able to determine otherwise sets R G B and A into buffer.

Reimplemented from vtkRenderWindow.

◆ WaitForCompletion()

void vtkWebGPURenderWindow::WaitForCompletion ( )
overridevirtual

Block the thread until work queue completes all submitted work.

Reimplemented from vtkRenderWindow.

◆ SupportsOpenGL()

int vtkWebGPURenderWindow::SupportsOpenGL ( )
overridevirtual

Does this render window support OpenGL? 0-false, 1-true.

Reimplemented from vtkRenderWindow.

◆ ReportCapabilities()

const char * vtkWebGPURenderWindow::ReportCapabilities ( )
overridevirtual

Get report of capabilities for the render window.

Reimplemented from vtkRenderWindow.

Reimplemented in vtkXWebGPURenderWindow.

◆ InitializeFromCurrentContext()

bool vtkWebGPURenderWindow::InitializeFromCurrentContext ( )
overridevirtual

Initialize the render window from the information associated with the currently activated OpenGL context.

Reimplemented from vtkRenderWindow.

Reimplemented in vtkXWebGPURenderWindow.

◆ ReleaseGraphicsResources()

void vtkWebGPURenderWindow::ReleaseGraphicsResources ( vtkWindow )
overridevirtual

Free up any graphics resources associated with this window a value of NULL means the context may already be destroyed.

Reimplemented from vtkWindow.

◆ SetWGPUConfiguration()

void vtkWebGPURenderWindow::SetWGPUConfiguration ( vtkWebGPUConfiguration config)

◆ vtkGetSmartPointerMacro()

vtkWebGPURenderWindow::vtkGetSmartPointerMacro ( WGPUConfiguration  ,
vtkWebGPUConfiguration   
)

◆ vtkGetNewMacro() [1/2]

vtkWebGPURenderWindow::vtkGetNewMacro ( WGPUShaderDatabase  ,
vtkWebGPUShaderDatabase   
)

Get a database of all WebGPU shader source codes in VTK.

You can extend the database with custom source code through the vtkWebGPUShaderDatabase::AddShaderSource API.

◆ vtkGetNewMacro() [2/2]

vtkWebGPURenderWindow::vtkGetNewMacro ( WGPUPipelineCache  ,
vtkWebGPURenderPipelineCache   
)

Get the pipeline cache for this renderer.

Use this to minimize costly creation of identical render pipelines.

◆ PreprocessShaderSource()

std::string vtkWebGPURenderWindow::PreprocessShaderSource ( const std::string &  source) const

Replaces all include statements in the given source code with source code corresponding to the included file from the database.

◆ NewRenderPass()

wgpu::RenderPassEncoder vtkWebGPURenderWindow::NewRenderPass ( wgpu::RenderPassDescriptor &  descriptor)

Create a new render pass encoder on the webgpu device.

◆ NewRenderBundleEncoder()

wgpu::RenderBundleEncoder vtkWebGPURenderWindow::NewRenderBundleEncoder ( wgpu::RenderBundleEncoderDescriptor &  descriptor)

Create a new render bundle encoder on the webgpu device.

More performant for large number of actors.

◆ GetCommandEncoder()

wgpu::CommandEncoder vtkWebGPURenderWindow::GetCommandEncoder ( )

Get the currently used command encoder.

Use this to prepare draw commands which eventually get submitted in Frame()

◆ CreateCommandEncoder()

void vtkWebGPURenderWindow::CreateCommandEncoder ( )

Initializes a new command encoder.

◆ FlushCommandBuffers()

void vtkWebGPURenderWindow::FlushCommandBuffers ( vtkTypeUInt32  count,
wgpu::CommandBuffer *  buffers 
)

Sends a given command buffer to the device queue.

◆ GetOffscreenColorAttachmentView()

wgpu::TextureView vtkWebGPURenderWindow::GetOffscreenColorAttachmentView ( )

Get a view of the color attachment used in the offscreen render target.

◆ GetDepthStencilView()

wgpu::TextureView vtkWebGPURenderWindow::GetDepthStencilView ( )

Get a view of the depth-stencil attachment used in the offscreen render target.

◆ GetDepthStencilFormat()

wgpu::TextureFormat vtkWebGPURenderWindow::GetDepthStencilFormat ( )

Get the texture format of the depth-stencil attachment.

◆ HasStencil()

bool vtkWebGPURenderWindow::HasStencil ( )

Whether the offscreen render target has stencil capabilities.

◆ GetDevice()

wgpu::Device vtkWebGPURenderWindow::GetDevice ( )

Get the webgpu device.

◆ GetAdapter()

wgpu::Adapter vtkWebGPURenderWindow::GetAdapter ( )

Get the webgpu adapter.

◆ GetPreferredSurfaceTextureFormat()

wgpu::TextureFormat vtkWebGPURenderWindow::GetPreferredSurfaceTextureFormat ( )

Get the texture format preferred for the surface.

◆ AcquireDepthBufferRenderTexture()

vtkSmartPointer< vtkWebGPUComputeRenderTexture > vtkWebGPURenderWindow::AcquireDepthBufferRenderTexture ( )

Returns a vtkWebGPUComputeRenderTexture ready to be added to a compute pipeline using vtkWebGPUComputePipeline::AddRenderTexture() that "points" to the depth buffer/color texture of this vtkWebGPURenderWindow.

One or multiple texture views will also need to be created for that render texture with a call to CreateRenderTextureView(). The texture view returned can then be configured (group, binding, ...) and added to the render window by calling AddRenderTextureView()

◆ AcquireFramebufferRenderTexture()

vtkSmartPointer< vtkWebGPUComputeRenderTexture > vtkWebGPURenderWindow::AcquireFramebufferRenderTexture ( )

Returns a vtkWebGPUComputeRenderTexture ready to be added to a compute pipeline using vtkWebGPUComputePipeline::AddRenderTexture() that "points" to the depth buffer/color texture of this vtkWebGPURenderWindow.

One or multiple texture views will also need to be created for that render texture with a call to CreateRenderTextureView(). The texture view returned can then be configured (group, binding, ...) and added to the render window by calling AddRenderTextureView()

◆ MakeDefaultWindowNameWithBackend()

virtual std::string vtkWebGPURenderWindow::MakeDefaultWindowNameWithBackend ( )
protectedpure virtual

Construct the window title as "Visualization Toolkit - <WindowSystem> <GraphicsBackend>" Ex: "Visualization Toolkit - X11 Vulkan" "Visualization Toolkit - X11 OpenGL" "Visualization Toolkit - Cocoa Metal" "Visualization Toolkit - Cocoa OpenGL" "Visualization Toolkit - Win32 D3D12".

Implemented in vtkSDL2WebGPURenderWindow, vtkWebAssemblyWebGPURenderWindow, and vtkXWebGPURenderWindow.

◆ WGPUInit()

bool vtkWebGPURenderWindow::WGPUInit ( )
protected

◆ WGPUFinalize()

void vtkWebGPURenderWindow::WGPUFinalize ( )
protected

◆ ConfigureSurface()

void vtkWebGPURenderWindow::ConfigureSurface ( )
protected

◆ UnconfigureSurface()

void vtkWebGPURenderWindow::UnconfigureSurface ( )
protected

◆ CreateOffscreenColorAttachments()

void vtkWebGPURenderWindow::CreateOffscreenColorAttachments ( )
protected

◆ DestroyOffscreenColorAttachments()

void vtkWebGPURenderWindow::DestroyOffscreenColorAttachments ( )
protected

◆ CreateDepthStencilTexture()

void vtkWebGPURenderWindow::CreateDepthStencilTexture ( )
protected

◆ DestroyDepthStencilTexture()

void vtkWebGPURenderWindow::DestroyDepthStencilTexture ( )
protected

◆ CreateFSQGraphicsPipeline()

void vtkWebGPURenderWindow::CreateFSQGraphicsPipeline ( )
protected

◆ DestroyFSQGraphicsPipeline()

void vtkWebGPURenderWindow::DestroyFSQGraphicsPipeline ( )
protected

◆ RecreateComputeRenderTextures()

void vtkWebGPURenderWindow::RecreateComputeRenderTextures ( )
protected

◆ RenderOffscreenTexture()

void vtkWebGPURenderWindow::RenderOffscreenTexture ( )
protected

Friends And Related Symbol Documentation

◆ vtkWebGPUComputeOcclusionCuller

friend class vtkWebGPUComputeOcclusionCuller
friend

Definition at line 367 of file vtkWebGPURenderWindow.h.

Member Data Documentation

◆ RenderTexturesSetup

bool vtkWebGPURenderWindow::RenderTexturesSetup = false
protected

Definition at line 308 of file vtkWebGPURenderWindow.h.

◆ Surface

wgpu::Surface vtkWebGPURenderWindow::Surface
protected

Definition at line 310 of file vtkWebGPURenderWindow.h.

◆ CommandEncoder

wgpu::CommandEncoder vtkWebGPURenderWindow::CommandEncoder
protected

Definition at line 311 of file vtkWebGPURenderWindow.h.

◆ SurfaceConfiguredSize

int vtkWebGPURenderWindow::SurfaceConfiguredSize[2]
protected

Definition at line 312 of file vtkWebGPURenderWindow.h.

◆ PreferredSurfaceTextureFormat

wgpu::TextureFormat vtkWebGPURenderWindow::PreferredSurfaceTextureFormat = wgpu::TextureFormat::BGRA8Unorm
protected

Definition at line 313 of file vtkWebGPURenderWindow.h.

◆ DepthStencil

vtkWGPUDeptStencil vtkWebGPURenderWindow::DepthStencil
protected

Definition at line 322 of file vtkWebGPURenderWindow.h.

◆ ColorAttachment

vtkWGPUColorAttachment vtkWebGPURenderWindow::ColorAttachment
protected

Definition at line 331 of file vtkWebGPURenderWindow.h.

◆ StagingPixelData

vtkWGPUUserStagingPixelData vtkWebGPURenderWindow::StagingPixelData
protected

Definition at line 340 of file vtkWebGPURenderWindow.h.

◆ FSQ

vtkWGPUFullScreenQuad vtkWebGPURenderWindow::FSQ
protected

Definition at line 348 of file vtkWebGPURenderWindow.h.

◆ BufferMapReadContext

struct vtkWebGPURenderWindow::MappingContext vtkWebGPURenderWindow::BufferMapReadContext
protected

◆ CachedPixelBytes

vtkNew<vtkTypeUInt8Array> vtkWebGPURenderWindow::CachedPixelBytes
protected

Definition at line 358 of file vtkWebGPURenderWindow.h.

◆ WGPUConfiguration

vtkSmartPointer<vtkWebGPUConfiguration> vtkWebGPURenderWindow::WGPUConfiguration
protected

Definition at line 359 of file vtkWebGPURenderWindow.h.

◆ WGPUShaderDatabase

vtkNew<vtkWebGPUShaderDatabase> vtkWebGPURenderWindow::WGPUShaderDatabase
protected

Definition at line 360 of file vtkWebGPURenderWindow.h.

◆ WGPUPipelineCache

vtkNew<vtkWebGPURenderPipelineCache> vtkWebGPURenderWindow::WGPUPipelineCache
protected

Definition at line 361 of file vtkWebGPURenderWindow.h.

◆ ScreenSize

int vtkWebGPURenderWindow::ScreenSize[2]
protected

Definition at line 363 of file vtkWebGPURenderWindow.h.


The documentation for this class was generated from the following file: