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 {
|
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
class R3DScrollFog
|
|
|
|
{
|
|
|
|
public:
|
2016-10-09 16:34:12 +00:00
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
R3DScrollFog(const Util::Config::Node& config);
|
|
|
|
~R3DScrollFog();
|
2018-06-16 21:31:29 +00:00
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
void DrawScrollFog(float rbga[4], float attenuation, float ambient, float spotRGB[3], float spotEllipse[4]);
|
2018-06-16 21:31:29 +00:00
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
private:
|
2018-06-16 21:31:29 +00:00
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
void AllocResources();
|
|
|
|
void DeallocResources();
|
2016-10-09 16:34:12 +00:00
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
const Util::Config::Node& m_config;
|
2017-08-11 00:41:10 +00:00
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
GLuint m_shaderProgram;
|
|
|
|
GLuint m_vertexShader;
|
|
|
|
GLuint m_fragmentShader;
|
2018-06-16 21:31:29 +00:00
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
GLint m_locFogColour;
|
|
|
|
GLint m_locFogAttenuation;
|
|
|
|
GLint m_locFogAmbient;
|
|
|
|
GLint m_locSpotFogColor;
|
|
|
|
GLint m_locSpotEllipse;
|
2018-06-16 21:31:29 +00:00
|
|
|
|
2023-11-05 23:44:27 +00:00
|
|
|
GLuint m_vao;
|
|
|
|
};
|
2016-10-09 16:34:12 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|