VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/state_tracker/state.h@ 76811

最後變更 在這個檔案從76811是 69474,由 vboxsync 提交於 7 年 前

*: scm updates - header files should have 'svn:keywords=Id Revision' too (doesn't mean they have to use them).

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 2.7 KB
 
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 STATE_H
8#define STATE_H
9
10#include "cr_glstate.h"
11
12#define CRSTATE_CHECKERR_RET(expr, result, message, ret) \
13 if (expr) { \
14 crStateError(__LINE__, __FILE__, result, message); \
15 return ret; \
16 }
17
18#define CRSTATE_NO_RETURN
19
20#define CRSTATE_CHECKERR(expr, result, message) CRSTATE_CHECKERR_RET(expr, result, message, CRSTATE_NO_RETURN)
21
22typedef struct _crCheckIDHWID {
23 GLuint id, hwid;
24} crCheckIDHWID_t;
25
26extern SPUDispatchTable diff_api;
27extern CRStateBits *__currentBits;
28
29#define GetCurrentBits() __currentBits
30
31#ifdef CHROMIUM_THREADSAFE
32#include <cr_threads.h>
33
34extern CRtsd __contextTSD;
35#define GetCurrentContext() VBoxTlsRefGetCurrent(CRContext, &__contextTSD)
36
37/* NOTE: below SetCurrentContext stuff is supposed to be used only internally!!
38 * it is placed here only to simplify things since some code besides state_init.c
39 * (i.e. state_glsl.c) is using it */
40#define SetCurrentContext(_ctx) VBoxTlsRefSetCurrent(CRContext, &__contextTSD, _ctx)
41#else
42extern CRContext *__currentContext;
43#define GetCurrentContext() __currentContext
44#endif
45
46extern GLboolean g_bVBoxEnableDiffOnMakeCurrent;
47
48extern CRContext *g_pAvailableContexts[CR_MAX_CONTEXTS];
49extern uint32_t g_cContexts;
50
51extern void crStateTextureInitTextureObj (CRContext *ctx, CRTextureObj *tobj, GLuint name, GLenum target);
52extern void crStateTextureInitTextureFormat( CRTextureLevel *tl, GLenum internalFormat );
53
54/* Normally these functions would have been in cr_bufferobject.h but
55 * that led to a number of issues.
56 */
57void crStateBufferObjectInit(CRContext *ctx);
58
59void crStateBufferObjectDestroy (CRContext *ctx);
60
61void crStateBufferObjectDiff(CRBufferObjectBits *bb, CRbitvalue *bitID,
62 CRContext *fromCtx, CRContext *toCtx);
63
64void crStateBufferObjectSwitch(CRBufferObjectBits *bb, CRbitvalue *bitID,
65 CRContext *fromCtx, CRContext *toCtx);
66
67/* These would normally be in cr_client.h */
68
69void crStateClientDiff(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
70
71void crStateClientSwitch(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
72
73void crStateFreeBufferObject(void *data);
74void crStateFreeFBO(void *data);
75void crStateFreeRBO(void *data);
76
77void crStateGenNames(CRContext *g, CRHashTable *table, GLsizei n, GLuint *names);
78void crStateRegNames(CRContext *g, CRHashTable *table, GLsizei n, GLuint *names);
79void crStateOnTextureUsageRelease(CRSharedState *pS, CRTextureObj *pObj);
80#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette