VirtualBox

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

最後變更 在這個檔案從80272是 78375,由 vboxsync 提交於 6 年 前

Additions/common/crOpengl,GuestHost/OpenGL,HostServices/SharedOpenGL: Eliminate all global variables from the state tracker library (state_tracker) in preparation of the SPU DLL merging, bugref:9435

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 2.5 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(pState, __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 PCRStateTracker pState;
25} crCheckIDHWID_t;
26
27#define GetCurrentBits(a_pState) (a_pState)->pCurrentBits
28
29#include <cr_threads.h>
30
31#define GetCurrentContext(a_pState) VBoxTlsRefGetCurrent(CRContext, &((a_pState)->contextTSD))
32
33/* NOTE: below SetCurrentContext stuff is supposed to be used only internally!!
34 * it is placed here only to simplify things since some code besides state_init.c
35 * (i.e. state_glsl.c) is using it */
36#define SetCurrentContext(a_pState, _ctx) VBoxTlsRefSetCurrent(CRContext, &((a_pState)->contextTSD), _ctx)
37
38extern void crStateTextureInitTextureObj (CRContext *ctx, CRTextureObj *tobj, GLuint name, GLenum target);
39extern void crStateTextureInitTextureFormat( CRTextureLevel *tl, GLenum internalFormat );
40
41/* Normally these functions would have been in cr_bufferobject.h but
42 * that led to a number of issues.
43 */
44void crStateBufferObjectInit(CRContext *ctx);
45
46void crStateBufferObjectDestroy (CRContext *ctx);
47
48void crStateBufferObjectDiff(CRBufferObjectBits *bb, CRbitvalue *bitID,
49 CRContext *fromCtx, CRContext *toCtx);
50
51void crStateBufferObjectSwitch(CRBufferObjectBits *bb, CRbitvalue *bitID,
52 CRContext *fromCtx, CRContext *toCtx);
53
54/* These would normally be in cr_client.h */
55
56void crStateClientDiff(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
57
58void crStateClientSwitch(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
59
60void crStateFreeBufferObject(void *data, void *pvUser);
61void crStateFreeFBO(void *data, void *pvUser);
62void crStateFreeRBO(void *data, void *pvUser);
63
64void crStateGenNames(CRContext *g, CRHashTable *table, GLsizei n, GLuint *names);
65void crStateRegNames(CRContext *g, CRHashTable *table, GLsizei n, GLuint *names);
66void crStateOnTextureUsageRelease(PCRStateTracker pState, CRSharedState *pS, CRTextureObj *pObj);
67#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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