VirtualBox

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

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

Config.kmk,Additions/common/crOpenGL,VBox/GuestHost/OpenGL,HostServices/SharedOpenGL: Remove CHROMIUM_THREADSAFE define and apply the current default

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

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