24 glCreateTextures(GL_TEXTURE_3D, 1, &
ID);
25 glTextureParameteri(
ID, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
26 glTextureParameteri(
ID, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
27 glTextureParameteri(
ID, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
28 glTextureParameteri(
ID, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
29 glTextureParameteri(
ID, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
39 void Update(
const float* pfData)
const {
40 glTextureSubImage3D(
ID, 0, 0, 0, 0,
iSizeX,
iSizeY,
iSizeZ, GL_RED, GL_FLOAT, pfData);
43 void Bind(
unsigned int iSlot)
const { glBindTextureUnit(iSlot,
ID); }
RAII wrapper around an OpenGL 3D texture (GL_R32F) for storing and updating thermal voxel data.
Definition ThermalVolume.h:17
ThermalVolume(int iWidth, int iHeight, int iDepth)
Definition ThermalVolume.h:22
void Update(const float *pfData) const
Definition ThermalVolume.h:39
void Bind(unsigned int iSlot) const
Definition ThermalVolume.h:43
ThermalVolume(const ThermalVolume &obj)=delete
int iSizeX
Definition ThermalVolume.h:20
~ThermalVolume()
Definition ThermalVolume.h:34
int iSizeY
Definition ThermalVolume.h:20
int iSizeZ
Definition ThermalVolume.h:20
ThermalVolume & operator=(const ThermalVolume &)=delete
unsigned int ID
Definition ThermalVolume.h:19