-
Notifications
You must be signed in to change notification settings - Fork 0
/
FractalObject.h
47 lines (35 loc) · 1.19 KB
/
FractalObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef FRACTALOBJECT_H
#define FRACTALOBJECT_H
#include "Common.h"
#include "DisplayItem.h"
#include "HostDeviceCode.h"
class FractalObject : public DisplayItem
{
public:
FractalObject();
~FractalObject();
void Init(ShaderProgram* Shaders, TransformMatrix* Projection, TransformMatrix* Visualization,
const float3* Vertices, const float3* Normals, const uint NumVertices, const uint3* Connectivity,
const uint NumElements, const float4* Colors, const uint NumColors, const SDL_Surface* TexImage,
const float2* TexCoord) override;
void Update();
void AttachGLTexture(GLuint TextureId, uint TexDataSize);
void MovePlane(int Distance);
private:
cudaGraphicsResource** CudaVboResources_;
cudaGraphicsResource* TexResource_;
cudaArray* TexArray_;
// uint* TexCudaTarget_;
uint TexDataSize_;
uint MaxTriangles_;
KernelParameters Param_;
ArrayPointers DevicePointers_;
void InitTexture();
void InitCuda();
void MapBuffers();
void UnmapBuffers();
void** GetArrayAddress(uint BufferIndex);
void CreateTextures();
void LoadVoxels();
};
#endif // FRACTALOBJECT_H