VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h@ 15532

Last change on this file since 15532 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: 2.7 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 CR_SERVER_H
8#define CR_SERVER_H
9
10#include "cr_protocol.h"
11#include "cr_glstate.h"
12#include "spu_dispatch_table.h"
13
14#include "state/cr_currentpointers.h"
15
16#include "cr_server.h"
17
18/*
19 * This is the base number for window and context IDs
20 */
21#define MAGIC_OFFSET 5000
22
23extern CRServer cr_server;
24
25/* Semaphore wait queue node */
26typedef struct _wqnode {
27 RunQueue *q;
28 struct _wqnode *next;
29} wqnode;
30
31typedef struct {
32 GLuint count;
33 GLuint num_waiting;
34 RunQueue **waiting;
35} CRServerBarrier;
36
37typedef struct {
38 GLuint count;
39 wqnode *waiting, *tail;
40} CRServerSemaphore;
41
42typedef struct {
43 GLuint id;
44 GLint projParamStart;
45 GLfloat projMat[16]; /* projection matrix, accumulated via calls to */
46 /* glProgramLocalParameterARB, glProgramParameterNV */
47} CRServerProgram;
48
49typedef struct {
50 char *pszDpyName;
51 GLint visualBits;
52 int32_t internalID;
53} CRCreateInfo_t;
54
55void crServerSetVBoxConfiguration();
56void crServerSetVBoxConfigurationHGCM();
57void crServerInitializeTiling(CRMuralInfo *mural);
58void crServerInitDispatch(void);
59void crServerReturnValue( const void *payload, unsigned int payload_len );
60void crServerWriteback(void);
61int crServerRecv( CRConnection *conn, CRMessage *msg, unsigned int len );
62void crServerSerializeRemoteStreams(void);
63void crServerAddToRunQueue( CRClient *client );
64
65void crServerApplyBaseProjection( const CRmatrix *baseProj );
66void crServerApplyViewMatrix( const CRmatrix *view );
67void crServerSetOutputBounds( const CRMuralInfo *mural, int extNum );
68void crServerComputeViewportBounds( const CRViewportState *v, CRMuralInfo *mural );
69
70GLboolean crServerInitializeBucketing(CRMuralInfo *mural);
71
72void crServerNewMuralTiling(CRMuralInfo *mural, GLint muralWidth, GLint muralHeight, GLint numTiles, const GLint *tileBounds);
73
74void crComputeOverlapGeom(double *quads, int nquad, CRPoly ***res);
75void crComputeKnockoutGeom(double *quads, int nquad, int my_quad_idx, CRPoly **res);
76
77int crServerGetCurrentEye(void);
78
79GLboolean crServerClientInBeginEnd(const CRClient *client);
80
81GLint crServerDispatchCreateContextEx(const char *dpyName, GLint visualBits, GLint shareCtx, GLint preloadCtxID, int32_t internalID);
82GLint crServerDispatchWindowCreateEx(const char *dpyName, GLint visBits, GLint preloadWinID);
83
84void crServerCreateInfoDeleteCB(void *data);
85
86GLint crServerGenerateID(GLint *pCounter);
87
88GLint crServerSPUWindowID(GLint serverWindow);
89
90GLuint crServerTranslateTextureID(GLuint id);
91GLuint crServerTranslateProgramID(GLuint id);
92
93#endif /* CR_SERVER_H */
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