VirtualBox

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

Last change on this file since 26753 was 17964, checked in by vboxsync, 16 years ago

crOpenGL: fix client dissconection handling

  • 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 );
64void crServerDeleteClient( CRClient *client );
65
66
67void crServerApplyBaseProjection( const CRmatrix *baseProj );
68void crServerApplyViewMatrix( const CRmatrix *view );
69void crServerSetOutputBounds( const CRMuralInfo *mural, int extNum );
70void crServerComputeViewportBounds( const CRViewportState *v, CRMuralInfo *mural );
71
72GLboolean crServerInitializeBucketing(CRMuralInfo *mural);
73
74void crServerNewMuralTiling(CRMuralInfo *mural, GLint muralWidth, GLint muralHeight, GLint numTiles, const GLint *tileBounds);
75
76void crComputeOverlapGeom(double *quads, int nquad, CRPoly ***res);
77void crComputeKnockoutGeom(double *quads, int nquad, int my_quad_idx, CRPoly **res);
78
79int crServerGetCurrentEye(void);
80
81GLboolean crServerClientInBeginEnd(const CRClient *client);
82
83GLint crServerDispatchCreateContextEx(const char *dpyName, GLint visualBits, GLint shareCtx, GLint preloadCtxID, int32_t internalID);
84GLint crServerDispatchWindowCreateEx(const char *dpyName, GLint visBits, GLint preloadWinID);
85
86void crServerCreateInfoDeleteCB(void *data);
87
88GLint crServerGenerateID(GLint *pCounter);
89
90GLint crServerSPUWindowID(GLint serverWindow);
91
92GLuint crServerTranslateTextureID(GLuint id);
93GLuint crServerTranslateProgramID(GLuint id);
94
95#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