Last change
on this file since 15532 was 15532, checked in by vboxsync, 16 years ago |
crOpenGL: export to OSE
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
|
File size:
1.3 KB
|
Line | |
---|
1 | /* Copyright (c) 2001, Stanford University
|
---|
2 | * All rights reserved.
|
---|
3 | *
|
---|
4 | * See the file LICENSE.txt for information on redistributing this software.
|
---|
5 | */
|
---|
6 |
|
---|
7 | #ifndef CR_STATE_BUFFEROBJECT_H
|
---|
8 | #define CR_STATE_BUFFEROBJECT_H
|
---|
9 |
|
---|
10 | #include "cr_hash.h"
|
---|
11 | #include "state/cr_statetypes.h"
|
---|
12 |
|
---|
13 | #ifdef __cplusplus
|
---|
14 | extern "C" {
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | typedef struct {
|
---|
18 | CRbitvalue dirty[CR_MAX_BITARRAY];
|
---|
19 | CRbitvalue arrayBinding[CR_MAX_BITARRAY];
|
---|
20 | CRbitvalue elementsBinding[CR_MAX_BITARRAY];
|
---|
21 | } CRBufferObjectBits;
|
---|
22 |
|
---|
23 |
|
---|
24 | /*
|
---|
25 | * Buffer object, like a texture object, but encapsulates arbitrary
|
---|
26 | * data (vertex, image, etc).
|
---|
27 | */
|
---|
28 | typedef struct {
|
---|
29 | GLuint refCount;
|
---|
30 | GLuint name;
|
---|
31 | GLenum usage;
|
---|
32 | GLenum access;
|
---|
33 | GLuint size; /* buffer size in bytes */
|
---|
34 | GLvoid *pointer; /* only valid while buffer is mapped */
|
---|
35 | GLvoid *data; /* the buffer data, if retainBufferData is true */
|
---|
36 | CRbitvalue dirty[CR_MAX_BITARRAY]; /* dirty data or state */
|
---|
37 | GLintptrARB dirtyStart, dirtyLength; /* dirty region */
|
---|
38 | } CRBufferObject;
|
---|
39 |
|
---|
40 | typedef struct {
|
---|
41 | GLboolean retainBufferData; /* should state tracker retain buffer data? */
|
---|
42 | CRBufferObject *arrayBuffer;
|
---|
43 | CRBufferObject *elementsBuffer;
|
---|
44 |
|
---|
45 | CRBufferObject *nullBuffer; /* name = 0 */
|
---|
46 |
|
---|
47 | CRHashTable *buffers;
|
---|
48 | } CRBufferObjectState;
|
---|
49 |
|
---|
50 |
|
---|
51 | #ifdef __cplusplus
|
---|
52 | }
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | #endif /* CR_STATE_BUFFEROBJECT_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.