cr_server.h revision 43747b1f0bc8302a238fb35e55857a5e9aa1933d
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync/* Copyright (c) 2001, Stanford University
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync * All rights reserved.
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync * See the file LICENSE.txt for information on redistributing this software.
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsyncextern "C" {
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync/*@todo must match MaxGuestMonitors from SchemaDefs.h*/
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsynctypedef DECLCALLBACKPTR(void, PFNCRSERVERPRESENTFBO) (void *data, int32_t screenId, int32_t x, int32_t y, uint32_t w, uint32_t h);
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsynctypedef struct {
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRrecti imagewindow; /**< coordinates in mural space */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRrectf bounds; /**< normalized coordinates in [-1,-1] x [1,1] */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRrecti outputwindow; /**< coordinates in server's rendering window */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRrecti clippedImagewindow; /**< imagewindow clipped to current viewport */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRmatrix baseProjection; /**< pre-multiplied onto projection matrix */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRrecti scissorBox; /**< passed to back-end OpenGL */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRrecti viewport; /**< passed to back-end OpenGL */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync * Mural info
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsynctypedef struct {
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync GLint hX, hY; /*host coordinates, screenID related*/
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync int spuWindow; /*the SPU's corresponding window ID */
15da024e837fd6ef1ba24564011e74a3d0cd30a5vboxsync GLboolean bUseFBO; /*redirect to FBO instead of real host window*/
15da024e837fd6ef1ba24564011e74a3d0cd30a5vboxsync GLint *pVisibleRects; /*visible rects left, top, right, bottom*/
15da024e837fd6ef1ba24564011e74a3d0cd30a5vboxsync * A client is basically an upstream Cr Node (connected via mothership)
15da024e837fd6ef1ba24564011e74a3d0cd30a5vboxsynctypedef struct _crclient {
15da024e837fd6ef1ba24564011e74a3d0cd30a5vboxsync int spu_id; /**< id of the last SPU in the client's SPU chain */
15da024e837fd6ef1ba24564011e74a3d0cd30a5vboxsync CRConnection *conn; /**< network connection from the client */
15da024e837fd6ef1ba24564011e74a3d0cd30a5vboxsync int number; /**< a unique number for each client */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsynctypedef struct _crclientnode {
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsynctypedef struct CRPoly_t {
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync * There's one of these run queue entries per client
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync * The run queue is a circular, doubly-linked list of these objects.
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsynctypedef struct RunQueue_t {
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsynctypedef struct {
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsynctypedef struct {
15da024e837fd6ef1ba24564011e74a3d0cd30a5vboxsynctypedef struct {
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync unsigned short tcpip_port;
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRClient *clients[CR_MAX_CLIENTS]; /**< array [numClients] */
f212e1f2b6bb160f9b7539562599a4604ca44cd2vboxsync CRClientNode *pCleanupClient; /*list of clients with pending clean up*/
int client_spu_id;
int mtu;
int buffer_size;
int useL2;
int ignore_papi;
unsigned int maxBarrierCount;
unsigned int clearCount;
int optimizeBucket;
int only_swap_once;
int debug_barriers;
int sharedDisplayLists;
int sharedTextureObjects;
int sharedPrograms;
int sharedWindows;
int uniqueWindows;
int localTileSpec;
int useDMX;
int overlapBlending;
const char *vpProjectionMatrixVariable;
int stereoView;
int currentEye;
float *overlap_intens;
int num_overlap_intens;
int num_overlap_levels;
} CRServer;
extern DECLEXPORT(int32_t) crVBoxServerClientWrite(uint32_t u32ClientID, uint8_t *pBuffer, uint32_t cbBuffer);
extern DECLEXPORT(int32_t) crVBoxServerClientRead(uint32_t u32ClientID, uint8_t *pBuffer, uint32_t *pcbBuffer);
extern DECLEXPORT(int32_t) crVBoxServerClientSetVersion(uint32_t u32ClientID, uint32_t vMajor, uint32_t vMinor);
extern DECLEXPORT(int32_t) crVBoxServerMapScreen(int sIndex, int32_t x, int32_t y, uint32_t w, uint32_t h, uint64_t winID);
#ifdef __cplusplus