VirtualBox

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

Last change on this file since 16574 was 15532, checked in by vboxsync, 16 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 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
15extern SPUDispatchTable diff_api;
16extern CRStateBits *__currentBits;
17
18#define GetCurrentBits() __currentBits
19
20#ifdef CHROMIUM_THREADSAFE
21extern CRtsd __contextTSD;
22#define GetCurrentContext() (CRContext *) crGetTSD(&__contextTSD)
23#else
24extern CRContext *__currentContext;
25#define GetCurrentContext() __currentContext
26#endif
27
28extern void crStateTextureInitTextureObj (CRContext *ctx, CRTextureObj *tobj, GLuint name, GLenum target);
29extern void crStateTextureInitTextureFormat( CRTextureLevel *tl, GLenum internalFormat );
30
31/* Normally these functions would have been in cr_bufferobject.h but
32 * that led to a number of issues.
33 */
34void crStateBufferObjectInit(CRContext *ctx);
35
36void crStateBufferObjectDestroy (CRContext *ctx);
37
38void crStateBufferObjectDiff(CRBufferObjectBits *bb, CRbitvalue *bitID,
39 CRContext *fromCtx, CRContext *toCtx);
40
41void crStateBufferObjectSwitch(CRBufferObjectBits *bb, CRbitvalue *bitID,
42 CRContext *fromCtx, CRContext *toCtx);
43
44
45/* These would normally be in cr_client.h */
46
47void crStateClientDiff(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
48
49void crStateClientSwitch(CRClientBits *cb, CRbitvalue *bitID, CRContext *from, CRContext *to);
50
51
52void
53crStateGetTextureObjectAndImage(CRContext *g, GLenum texTarget, GLint level,
54 CRTextureObj **obj, CRTextureLevel **img);
55
56#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