mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-16 07:21:28 +00:00
32 lines
613 B
C++
32 lines
613 B
C++
#ifndef __GL_LIGHTBUFFER_H
|
|
#define __GL_LIGHTBUFFER_H
|
|
|
|
#include "tarray.h"
|
|
struct FDynLightData;
|
|
|
|
class FLightBuffer
|
|
{
|
|
TArray<float> mBufferArray;
|
|
unsigned int mBufferId;
|
|
float * mBufferPointer;
|
|
|
|
unsigned int mBufferType;
|
|
unsigned int mIndex;
|
|
unsigned int mLastMappedIndex;
|
|
unsigned int mBlockAlign;
|
|
unsigned int mBlockSize;
|
|
|
|
public:
|
|
|
|
FLightBuffer();
|
|
~FLightBuffer();
|
|
void Clear();
|
|
int UploadLights(FDynLightData &data);
|
|
void Finish();
|
|
int BindUBO(unsigned int index);
|
|
unsigned int GetBlockSize() const { return mBlockSize; }
|
|
unsigned int GetBufferType() const { return mBufferType; }
|
|
};
|
|
|
|
#endif
|
|
|