-
Notifications
You must be signed in to change notification settings - Fork 0
/
AtmosphereBuffer.h
58 lines (51 loc) · 1.16 KB
/
AtmosphereBuffer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef ATMOSPHEREBUFFER_H
#define ATMOSPHEREBUFFER_H
#include <windows.h>
#undef __glext_h_
#undef __glxext_h_
#undef __gl_h_
#include <GL/GLee.h>
#include <vector>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
#include "Chunk.h"
#include "WorldState.h"
#include "Camera.h"
#include "Frustum.h"
#include "View.h"
#include "TimeManager.h"
#include "Config.h"
#include "Matrix.h"
#include "MathUtils.h"
#include "TimeUtils.h"
using namespace std;
/*
* Author: wcrane
* Date: 3/17/2013
*
* Framebuffer Object for rendering the atmosphere
*/
class AtmosphereBuffer
{
private:
GLuint m_nColorTex;
GLuint m_nGlowTex;
GLuint m_nFrameBuffer;
int m_nWidth, m_nHeight;
public:
AtmosphereBuffer(int nWidth, int nHeight);
~AtmosphereBuffer();
void drawToBuffer(GLuint colorBuf, GLuint glowBuf, GLuint depthBuf, View *view);
void bind();
void unbind();
void bindColorTex();
void bindGlowTex();
GLuint getGlowTex();
GLuint getColorTex();
int getWidth();
int getHeight();
Vector3 getNearSunColor();
Vector3 getAwaySunColor();
Vector3 getCloudColor();
};
#endif