aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llglimmediate.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llrender/llglimmediate.h
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llrender/llglimmediate.h')
-rw-r--r--linden/indra/llrender/llglimmediate.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/linden/indra/llrender/llglimmediate.h b/linden/indra/llrender/llglimmediate.h
index 4a7a0eb..2d7d768 100644
--- a/linden/indra/llrender/llglimmediate.h
+++ b/linden/indra/llrender/llglimmediate.h
@@ -1 +1,98 @@
1<<<<<<< .working
1#error This file has been renamed llrender.h 2#error This file has been renamed llrender.h
3=======
4/**
5 * @file llglimmediate.h
6 * @brief LLGLImmediate definition
7 *
8 * This class acts as a wrapper for OpenGL immediate calls concerning glBegin and glEnd.
9 * The goal of this class is to minimize the number of api calls due to legacy rendering
10 * code, and to define an interface for a multiple rendering API abstraction of the UI
11 * rendering.
12 *
13 * $LicenseInfo:firstyear=2001&license=viewergpl$
14 *
15 * Copyright (c) 2001-2008, Linden Research, Inc.
16 *
17 * Second Life Viewer Source Code
18 * The source code in this file ("Source Code") is provided by Linden Lab
19 * to you under the terms of the GNU General Public License, version 2.0
20 * ("GPL"), unless you have obtained a separate licensing agreement
21 * ("Other License"), formally executed by you and Linden Lab. Terms of
22 * the GPL can be found in doc/GPL-license.txt in this distribution, or
23 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
24 *
25 * There are special exceptions to the terms and conditions of the GPL as
26 * it is applied to this Source Code. View the full text of the exception
27 * in the file doc/FLOSS-exception.txt in this software distribution, or
28 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
29 *
30 * By copying, modifying or distributing this software, you acknowledge
31 * that you have read and understood your obligations described above,
32 * and agree to abide by those obligations.
33 *
34 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
35 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
36 * COMPLETENESS OR PERFORMANCE.
37 * $/LicenseInfo$
38 */
39
40#ifndef LL_LLGLIMMEDIATE_H
41#define LL_LLGLIMMEDIATE_H
42
43#include "stdtypes.h"
44#include "llgltypes.h"
45#include "llglheaders.h"
46#include "llvertexbuffer.h"
47
48class LLGLImmediate
49{
50public:
51 LLGLImmediate();
52
53 void translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z);
54 void scalef(const GLfloat& x, const GLfloat& y, const GLfloat& z);
55 void pushMatrix();
56 void popMatrix();
57 void blendFunc(GLenum sfactor, GLenum dfactor);
58 void flush();
59
60 void begin(const GLuint& mode);
61 void end();
62 void vertex2i(const GLint& x, const GLint& y);
63 void vertex2f(const GLfloat& x, const GLfloat& y);
64 void vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z);
65 void vertex2fv(const GLfloat* v);
66 void vertex3fv(const GLfloat* v);
67
68 void texCoord2i(const GLint& x, const GLint& y);
69 void texCoord2f(const GLfloat& x, const GLfloat& y);
70 void texCoord2fv(const GLfloat* tc);
71
72 void color4ub(const GLubyte& r, const GLubyte& g, const GLubyte& b, const GLubyte& a);
73 void color4f(const GLfloat& r, const GLfloat& g, const GLfloat& b, const GLfloat& a);
74 void color4fv(const GLfloat* c);
75 void color3f(const GLfloat& r, const GLfloat& g, const GLfloat& b);
76 void color3fv(const GLfloat* c);
77 void color4ubv(const GLubyte* c);
78
79 typedef struct Vertex
80 {
81 GLfloat v[3];
82 GLubyte c[4];
83 GLfloat uv[2];
84 };
85
86private:
87 U32 mCount;
88 U32 mMode;
89 LLPointer<LLVertexBuffer> mBuffer;
90 LLStrider<LLVector3> mVerticesp;
91 LLStrider<LLVector2> mTexcoordsp;
92 LLStrider<LLColor4U> mColorsp;
93};
94
95extern LLGLImmediate gGL;
96
97#endif
98>>>>>>> .merge-right.r88690