VirtualBox

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

最後變更 在這個檔案從44126是 44126,由 vboxsync 提交於 12 年 前

crOpenGL: missing file

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 2.8 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];
49
50extern void crStateTextureInitTextureObj (CRContext *ctx, CRTextureObj *tobj, GLuint name, GLenum target);
51extern void crStateTextureInitTextureFormat( CRTextureLevel *tl, GLenum internalFormat );
52
53/* Normally these functions would have been in cr_bufferobject.h but
54 * that led to a number of issues.
55 */
56void crStateBufferObjectInit(CRContext *ctx);
57
58void crStateBufferObjectDestroy (CRContext *ctx);
59
60void crStateBufferObjectDiff(CRBufferObjectBits *bb, CRbitvalue *bitID,
61 CRContext *fromCtx, CRContext *toCtx);
62
63void crStateBufferObjectSwitch(CRBufferObjectBits *bb, CRbitvalue *bitID,
64 CRContext *fromCtx, CRContext *toCtx);
65
66/* These would normally be in cr_client.h */
67
68void crStateClientDiff(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
69
70void crStateClientSwitch(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
71
72void crStateGetTextureObjectAndImage(CRContext *g, GLenum texTarget, GLint level,
73 CRTextureObj **obj, CRTextureLevel **img);
74
75void crStateFreeBufferObject(void *data);
76void crStateFreeFBO(void *data);
77void crStateFreeRBO(void *data);
78
79void crStateGenNames(CRContext *g, CRHashTable *table, GLsizei n, GLuint *names);
80void crStateRegNames(CRContext *g, CRHashTable *table, GLsizei n, GLuint *names);
81#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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