VirtualBox

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

Last change on this file since 28197 was 27889, checked in by vboxsync, 15 years ago

crOpenGL: more code for multiscreen support

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.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 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 crServerInitDispatch(void);
58void crServerReturnValue( const void *payload, unsigned int payload_len );
59void crServerWriteback(void);
60int crServerRecv( CRConnection *conn, CRMessage *msg, unsigned int len );
61void crServerSerializeRemoteStreams(void);
62void crServerAddToRunQueue( CRClient *client );
63void crServerDeleteClient( CRClient *client );
64
65
66void crServerApplyBaseProjection( const CRmatrix *baseProj );
67void crServerApplyViewMatrix( const CRmatrix *view );
68void crServerSetOutputBounds( const CRMuralInfo *mural, int extNum );
69void crServerComputeViewportBounds( const CRViewportState *v, CRMuralInfo *mural );
70
71GLboolean crServerInitializeBucketing(CRMuralInfo *mural);
72
73void crComputeOverlapGeom(double *quads, int nquad, CRPoly ***res);
74void crComputeKnockoutGeom(double *quads, int nquad, int my_quad_idx, CRPoly **res);
75
76int crServerGetCurrentEye(void);
77
78GLboolean crServerClientInBeginEnd(const CRClient *client);
79
80GLint crServerDispatchCreateContextEx(const char *dpyName, GLint visualBits, GLint shareCtx, GLint preloadCtxID, int32_t internalID);
81GLint crServerDispatchWindowCreateEx(const char *dpyName, GLint visBits, GLint preloadWinID);
82
83void crServerCreateInfoDeleteCB(void *data);
84
85GLint crServerGenerateID(GLint *pCounter);
86
87GLint crServerSPUWindowID(GLint serverWindow);
88
89GLuint crServerTranslateTextureID(GLuint id);
90GLuint crServerTranslateProgramID(GLuint id);
91
92void crServerCheckMuralGeometry(CRMuralInfo *mural);
93GLboolean crServerSupportRedirMuralFBO(void);
94void crServerRedirMuralFBO(CRMuralInfo *mural, GLboolean redir);
95void crServerCreateMuralFBO(CRMuralInfo *mural);
96void crServerDeleteMuralFBO(CRMuralInfo *mural);
97void crServerPresentFBO(CRMuralInfo *mural);
98GLboolean crServerIsRedirectedToFBO();
99
100#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