VTK  9.3.0
vtkOpenGLMovieSphere.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
23 #ifndef vtkOpenGLMovieSphere_h
24 #define vtkOpenGLMovieSphere_h
25 
26 #include "vtkNew.h" // for ivars
27 #include "vtkOpenGLSkybox.h"
28 #include "vtkRenderingFFMPEGOpenGL2Module.h" // For export macro
29 #include "vtkSmartPointer.h" // for ivars
30 #include <atomic> // for ivars
31 #include <mutex> // for ivars
32 
33 VTK_ABI_NAMESPACE_BEGIN
36 class vtkMutexLock;
37 class vtkOpenGLActor;
39 class vtkTextureObject;
40 
41 class VTKRENDERINGFFMPEGOPENGL2_EXPORT vtkOpenGLMovieSphere : public vtkOpenGLSkybox
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
51  void Render(vtkRenderer* ren, vtkMapper* mapper) override;
52 
55 
56 protected:
59 
60  void UpdateUniforms(vtkObject*, unsigned long, void*);
61 
64  int DrawIndex;
65  int YTexture;
66  int UTexture;
67  int VTexture;
68 
70 
71  std::mutex TextureUpdateMutex;
72  unsigned char* TextureData[6];
73  int ReadIndex; // access only within mutex
75 
76  std::atomic<int> NewData;
77  std::atomic<int> HaveData;
78 
79  int Height;
80  int Width;
81  int UVHeight;
82  int UVWidth;
84 
85 private:
87  void operator=(const vtkOpenGLMovieSphere&) = delete;
88 };
89 
90 VTK_ABI_NAMESPACE_END
91 #endif
Reader for ffmpeg supported formats.
a simple class to control print indentation
Definition: vtkIndent.h:29
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:77
abstract base class for most VTK objects
Definition: vtkObject.h:52
OpenGL actor.
OpenGL MovieSphere, an optimized VR sphere for movies.
std::atomic< int > NewData
void SetVideoSource(vtkFFMPEGVideoSource *val)
void Render(vtkRenderer *ren, vtkMapper *mapper) override
Actual MovieSphere render method.
~vtkOpenGLMovieSphere() override
vtkFFMPEGVideoSource * GetVideoSource()
void VideoCallback(vtkFFMPEGVideoSourceVideoCallbackData const &cbd)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkOpenGLMovieSphere * New()
std::atomic< int > HaveData
void UpdateUniforms(vtkObject *, unsigned long, void *)
vtkSmartPointer< vtkFFMPEGVideoSource > VideoSource
PolyDataMapper using OpenGL to render.
OpenGL Skybox.
abstract specification for renderers
Definition: vtkRenderer.h:62
abstracts an OpenGL texture object.