summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsky.h
blob: 881ce6d54277cbf5c4f3e6066c056229b6a43fe5 (plain)
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
/** 
 * @file lldrawpoolsky.h
 * @brief LLDrawPoolSky class definition
 *
 * Copyright (c) 2002-$CurrentYear$, Linden Research, Inc.
 * $License$
 */

#ifndef LL_LLDRAWPOOLSKY_H
#define LL_LLDRAWPOOLSKY_H

#include "lldrawpool.h"

class LLSkyTex;
class LLHeavenBody;

class LLDrawPoolSky : public LLDrawPool
{
private:
	LLSkyTex			*mSkyTex;
	LLHeavenBody		*mHB[2]; // Sun and Moon

public:
	LLDrawPoolSky();

	/*virtual*/ LLDrawPool *instancePool();

	/*virtual*/ void prerender();
	/*virtual*/ void render(S32 pass = 0);
	/*virtual*/ void renderForSelect();
	void setSkyTex(LLSkyTex* const st) { mSkyTex = st; }
	void setSun(LLHeavenBody* sun) { mHB[0] = sun; }
	void setMoon(LLHeavenBody* moon) { mHB[1] = moon; }

	void renderSkyCubeFace(U8 side);
	void renderHeavenlyBody(U8 hb, const LLFace* face);
	void renderSunHalo(const LLFace* face);

	virtual S32 getMaterialAttribIndex() { return 0; }
};

#endif // LL_LLDRAWPOOLSKY_H