aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llagpmempoolnv.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llrender/llagpmempoolnv.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/linden/indra/llrender/llagpmempoolnv.h b/linden/indra/llrender/llagpmempoolnv.h
new file mode 100644
index 0000000..cffe397
--- /dev/null
+++ b/linden/indra/llrender/llagpmempoolnv.h
@@ -0,0 +1,95 @@
1/**
2 * @file llagpmempoolnv.h
3 * @brief LLAGPMemPoolNV base class
4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 *
7 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement
10 * ("Other License"), formally executed by you and Linden Lab. Terms of
11 * the GPL can be found in doc/GPL-license.txt in this distribution, or
12 * online at http://secondlife.com/developers/opensource/gplv2
13 *
14 * There are special exceptions to the terms and conditions of the GPL as
15 * it is applied to this Source Code. View the full text of the exception
16 * in the file doc/FLOSS-exception.txt in this software distribution, or
17 * online at http://secondlife.com/developers/opensource/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28#ifndef LL_LLAGPMEMPOOLNV_H
29#define LL_LLAGPMEMPOOLNV_H
30
31#include "llagpmempool.h"
32
33class LLAGPMemPoolNV : public LLAGPMemPool
34{
35public:
36 LLAGPMemPoolNV(int request);
37 virtual ~LLAGPMemPoolNV();
38
39 /*virtual*/ void flush();
40 /*virtual*/ void dump();
41 /*virtual*/ void enable();
42 /*virtual*/ void disable();
43 /*virtual*/ void bind();
44
45 static BOOL isWriteOK();
46
47 /*virtual*/ U32 createFence();
48 /*virtual*/ void deleteFence(const U32 fence);
49 /*virtual*/ void sendFence(U32 fence);
50 /*virtual*/ void waitFence(U32 fence);
51protected:
52 /*virtual*/ LLAGPMemBlock *createBlock(const U32 offset, const U32 size);
53
54protected:
55 U8 *mBase;
56
57 static BOOL sWriteOK;
58};
59
60class LLAGPMemBlockNV : public LLAGPMemBlock
61{
62public:
63 LLAGPMemBlockNV(LLAGPMemPool *mem_poolp, U8 *baseptr, const S32 offset, const U32 size);
64 virtual ~LLAGPMemBlockNV() { mMemPoolp->freeBlock(this); };
65
66 /*virtual*/ void copy (void *source, const U32 size_bytes);
67 /*virtual*/ void copyColor(void *source, const U32 size_bytes);
68 /*virtual*/ void free();
69
70 /*virtual*/ void bindGLVertexPointer(const U32 stride, const U32 offset);
71 /*virtual*/ void bindGLNormalPointer(const U32 stride, const U32 offset);
72 /*virtual*/ void bindGLBinormalPointer(const S32 index, const U32 stride, const U32 offset);
73 /*virtual*/ void bindGLColorPointer(const U32 stride, const U32 offset);
74 /*virtual*/ void bindGLTexCoordPointer(const U32 stride, const U32 offset);
75 /*virtual*/ void bindGLVertexWeightPointer(const S32 index, const U32 stride, const U32 offset);
76 /*virtual*/ void bindGLVertexClothingWeightPointer(const S32 index, const U32 stride, const U32 offset);
77
78 /*virtual*/ U32 getOffset() const { return mOffset; }
79 /*virtual*/ U32 getSize() const { return mSize; }
80
81 /*virtual*/ BOOL hasMappedMem() const { return TRUE; }
82 /*virtual*/ U8* getMappedMem();
83 /*virtual*/ U32 createFence();
84 /*virtual*/ void deleteFence(const U32 fence);
85 /*virtual*/ void sendFence(U32 fence);
86 /*virtual*/ void waitFence(U32 fence);
87
88private:
89 U8 *mMemp;
90 U32 mOffset; // Offset from base
91 U32 mSize;
92 friend class LLAGPMemPoolNV;
93};
94
95#endif // LL_LLAGPMEMPOOLNV_H