aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldrawpoolstars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/lldrawpoolstars.cpp')
-rw-r--r--linden/indra/newview/lldrawpoolstars.cpp121
1 files changed, 0 insertions, 121 deletions
diff --git a/linden/indra/newview/lldrawpoolstars.cpp b/linden/indra/newview/lldrawpoolstars.cpp
deleted file mode 100644
index 3f9c8db..0000000
--- a/linden/indra/newview/lldrawpoolstars.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
1/**
2 * @file lldrawpoolstars.cpp
3 * @brief LLDrawPoolStars class implementation
4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 *
7 * Copyright (c) 2002-2008, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
30 */
31
32#include "llviewerprecompiledheaders.h"
33
34#include "lldrawpoolstars.h"
35
36#include "llface.h"
37#include "llsky.h"
38#include "llvostars.h"
39#include "pipeline.h"
40#include "llviewercamera.h"
41#include "llglslshader.h"
42
43LLDrawPoolStars::LLDrawPoolStars() :
44 LLFacePool(POOL_STARS)
45{
46}
47
48LLDrawPool *LLDrawPoolStars::instancePool()
49{
50 return new LLDrawPoolStars();
51}
52
53void LLDrawPoolStars::prerender()
54{
55 mVertexShaderLevel = LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT);
56}
57
58void LLDrawPoolStars::render(S32 pass)
59{
60 if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)))
61 {
62 return;
63 }
64
65 if (mDrawFace.empty())
66 {
67 return;
68 }
69
70 LLGLSPipelineSkyBox gls_sky;
71 LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE);
72 LLGLEnable blend(GL_BLEND);
73 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
74
75 LLGLDisable gl_texture_2d(GL_TEXTURE_2D);
76 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
77 glDisableClientState(GL_NORMAL_ARRAY);
78
79 gPipeline.disableLights();
80
81 GLint* viewport = (GLint*) gGLViewport;
82
83 if (viewport[2] > 512 && viewport[3] > 512)
84 {
85 glPointSize(2.f);
86 }
87
88 LLVector3 origin = gCamera->getOrigin();
89 glPushMatrix();
90 glTranslatef(origin.mV[0], origin.mV[1], origin.mV[2]);
91
92 glEnableClientState(GL_COLOR_ARRAY);
93
94 S32 face_count = (S32)mDrawFace.size();
95 for (S32 curr_face = 0; curr_face < face_count; curr_face++)
96 {
97 LLFace* face = mDrawFace[curr_face];
98 if (!face->getGeomCount())
99 {
100 continue;
101 }
102
103 // render the stars as a sphere centered at viewer camera
104 if (face->mVertexBuffer.notNull())
105 {
106 face->mVertexBuffer->setBuffer(getVertexDataMask());
107 U32* indicesp = (U32*) face->mVertexBuffer->getIndicesPointer();
108 glDrawElements(GL_POINTS, face->getIndicesCount(), GL_UNSIGNED_INT, indicesp);
109 mIndicesDrawn += face->getIndicesCount();
110 }
111 }
112 glDisableClientState(GL_COLOR_ARRAY);
113 glPointSize(1.f);
114 glPopMatrix();
115}
116
117
118void LLDrawPoolStars::renderForSelect()
119{
120}
121