DynamicTexture.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Texture2DResource.h"
4 
6 {
8  void* Data;
9  uint32 DataSize;
10  uint32 Stride;
11  uint32 Width;
12  uint32 Height;
13 };
14 
16 {
17 private:
18 
19  FString Name;
20  UTexture2D* TextureObject = nullptr;
21 
22  std::vector<FTextureUpdateData*> TudPool;
23  FThreadSafeCounter CommandCounter;
24 
25  FCriticalSection StateMx;
26  FCriticalSection TudMx;
27 
28  int Width = 0;
29  int Height = 0;
30  int Bpp = 0;
31  EPixelFormat Format = PF_Unknown;
32  TextureCompressionSettings Compression = TextureCompressionSettings::TC_VectorDisplacementmap;
33 
34 private:
35 
36  void RenderCmd_CreateTexture();
37  void RenderCmd_UpdateTexture(FTextureUpdateData* Tud);
38 
39 public:
40 
41  FDynamicTexture(FString Name, int Width, int Height, EPixelFormat Format, TextureCompressionSettings Compression);
42  virtual ~FDynamicTexture();
43 
44  FTextureUpdateData* AllocBuffer();
45  void EnqueUpdateCommand(FTextureUpdateData* Tud);
46 
47  void Update(const rs2::video_frame& Frame);
48  void CopyData(FTextureUpdateData* Tud, const rs2::video_frame& Frame);
49 
50  inline UTexture2D* GetTextureObject() { return TextureObject; }
51  int GetWidth() const { return Width; }
52  int GetHeight() const { return Height; }
53  int GetBpp() const { return Bpp; }
54  EPixelFormat GetFormat() const { return Format; }
55  TextureCompressionSettings GetCompression() const { return Compression; }
56 };
EPixelFormat GetFormat() const
UTexture2D * GetTextureObject()
TextureCompressionSettings GetCompression() const
FCriticalSection TudMx
std::vector< FTextureUpdateData * > TudPool
FCriticalSection StateMx
int GetHeight() const
int GetWidth() const
FThreadSafeCounter CommandCounter
int GetBpp() const
class FDynamicTexture * Context
Definition: DynamicTexture.h:7


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:13