VirtualBox

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

Last change on this file since 37775 was 31808, checked in by vboxsync, 14 years ago

crOpenGL: resource sharing between contexts

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 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 STATE_H
8#define STATE_H
9
10#include "cr_glstate.h"
11#ifdef CHROMIUM_THREADSAFE
12#include "cr_threads.h"
13#endif
14
15typedef struct _crCheckIDHWID {
16 GLuint id, hwid;
17} crCheckIDHWID_t;
18
19extern SPUDispatchTable diff_api;
20extern CRStateBits *__currentBits;
21
22#define GetCurrentBits() __currentBits
23
24#ifdef CHROMIUM_THREADSAFE
25extern CRtsd __contextTSD;
26#define GetCurrentContext() (CRContext *) crGetTSD(&__contextTSD)
27#else
28extern CRContext *__currentContext;
29#define GetCurrentContext() __currentContext
30#endif
31
32extern void crStateTextureInitTextureObj (CRContext *ctx, CRTextureObj *tobj, GLuint name, GLenum target);
33extern void crStateTextureInitTextureFormat( CRTextureLevel *tl, GLenum internalFormat );
34
35/* Normally these functions would have been in cr_bufferobject.h but
36 * that led to a number of issues.
37 */
38void crStateBufferObjectInit(CRContext *ctx);
39
40void crStateBufferObjectDestroy (CRContext *ctx);
41
42void crStateBufferObjectDiff(CRBufferObjectBits *bb, CRbitvalue *bitID,
43 CRContext *fromCtx, CRContext *toCtx);
44
45void crStateBufferObjectSwitch(CRBufferObjectBits *bb, CRbitvalue *bitID,
46 CRContext *fromCtx, CRContext *toCtx);
47
48/* These would normally be in cr_client.h */
49
50void crStateClientDiff(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
51
52void crStateClientSwitch(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
53
54void crStateGetTextureObjectAndImage(CRContext *g, GLenum texTarget, GLint level,
55 CRTextureObj **obj, CRTextureLevel **img);
56
57void crStateFreeBufferObject(void *data);
58void crStateFreeFBO(void *data);
59void crStateFreeRBO(void *data);
60#endif
Note: See TracBrowser for help on using the repository browser.

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