2016-10-09 16:34:12 +00:00
|
|
|
#ifndef _R3DSCROLLFOG_H_
|
|
|
|
#define _R3DSCROLLFOG_H_
|
|
|
|
|
2017-08-11 00:41:10 +00:00
|
|
|
#include "Util/NewConfig.h"
|
2022-11-07 21:33:01 +00:00
|
|
|
#include <GL/glew.h>
|
2016-10-09 16:34:12 +00:00
|
|
|
|
|
|
|
namespace New3D {
|
|
|
|
|
|
|
|
class R3DScrollFog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2018-06-16 21:31:29 +00:00
|
|
|
R3DScrollFog(const Util::Config::Node &config);
|
|
|
|
~R3DScrollFog();
|
|
|
|
|
|
|
|
void DrawScrollFog(float rbga[4], float attenuation, float ambient, float *spotRGB, float *spotEllipse);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2016-10-09 16:34:12 +00:00
|
|
|
void AllocResources();
|
|
|
|
void DeallocResources();
|
|
|
|
|
2017-08-11 00:41:10 +00:00
|
|
|
const Util::Config::Node &m_config;
|
|
|
|
|
2016-10-09 16:34:12 +00:00
|
|
|
GLuint m_shaderProgram;
|
|
|
|
GLuint m_vertexShader;
|
|
|
|
GLuint m_fragmentShader;
|
2018-06-16 21:31:29 +00:00
|
|
|
|
|
|
|
GLint m_locFogColour;
|
|
|
|
GLint m_locFogAttenuation;
|
|
|
|
GLint m_locFogAmbient;
|
|
|
|
GLint m_locSpotFogColor;
|
|
|
|
GLint m_locSpotEllipse;
|
|
|
|
|
2022-11-07 21:33:01 +00:00
|
|
|
GLuint m_vao;
|
2018-06-16 21:31:29 +00:00
|
|
|
};
|
2016-10-09 16:34:12 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|