mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
![Sergey Lipskiy](/assets/img/avatar_default.png)
Implement it for desktop GL: OGL3X/UniformBlock and for GLES2: GLES2/UniformSet GLES3 and above must use OGL3X/UniformBlock.
47 lines
901 B
C++
47 lines
901 B
C++
#ifndef UNIFORM_COLLECTION_H
|
|
#define UNIFORM_COLLECTION_H
|
|
|
|
#include "GLSLCombiner.h"
|
|
|
|
class UniformCollection {
|
|
public:
|
|
enum TextureUniforms {
|
|
tuTexScale,
|
|
tuTexMask,
|
|
tuTexOffset,
|
|
tuCacheScale,
|
|
tuCacheOffset,
|
|
tuCacheShiftScale,
|
|
tuCacheFrameBuffer,
|
|
tuTotal
|
|
};
|
|
|
|
enum ColorUniforms {
|
|
cuFogColor,
|
|
cuCenterColor,
|
|
cuScaleColor,
|
|
cuBlendColor,
|
|
cuEnvColor,
|
|
cuPrimColor,
|
|
cuPrimLod,
|
|
cuK4,
|
|
cuK5,
|
|
cuTotal
|
|
};
|
|
|
|
enum LightUniforms {
|
|
luLightDirection,
|
|
luLightColor,
|
|
luTotal
|
|
};
|
|
|
|
virtual void bindWithShaderCombiner(ShaderCombiner * _pCombiner) = 0;
|
|
virtual void setColorData(ColorUniforms _index, u32 _dataSize, const void * _data) = 0;
|
|
virtual void updateTextureParameters() = 0;
|
|
virtual void updateLightParameters() = 0;
|
|
virtual void updateUniforms(ShaderCombiner * _pCombiner) = 0;
|
|
};
|
|
|
|
UniformCollection * createUniformCollection();
|
|
|
|
#endif // UNIFORM_COLLECTION_H
|