cr_server.h revision 2e6dc32bcc9c3a3e70c957764c033b1f402bc617
/* Copyright (c) 2001, Stanford University
* All rights reserved.
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#ifndef INCLUDE_CR_SERVER_H
#define INCLUDE_CR_SERVER_H
#include "cr_spu.h"
#include "cr_net.h"
#include "cr_hash.h"
#include "cr_protocol.h"
#include "cr_glstate.h"
#include "spu_dispatch_table.h"
#include "state/cr_currentpointers.h"
#ifdef __cplusplus
extern "C" {
#endif
#define CR_MAX_WINDOWS 100
#define CR_MAX_CLIENTS 20
typedef struct {
} CRExtent;
struct BucketingInfo;
/**
* Mural info
*/
typedef struct {
int curExtent;
int numExtents; /**< number of tiles */
int maxTileHeight; /**< the tallest tile's height */
/** optimized, hash-based tile bucketing */
int optimizeBucket;
struct BucketingInfo *bucketInfo;
int spuWindow; /**< the SPU's corresponding window ID */
} CRMuralInfo;
/**
* A client is basically an upstream Cr Node (connected via mothership)
*/
typedef struct _crclient {
int spu_id; /**< id of the last SPU in the client's SPU chain */
int number; /**< a unique number for each client */
} CRClient;
typedef struct CRPoly_t {
int npoints;
double *points;
} CRPoly;
/**
* There's one of these run queue entries per client
* The run queue is a circular, doubly-linked list of these objects.
*/
typedef struct RunQueue_t {
int blocked;
struct RunQueue_t *next;
struct RunQueue_t *prev;
} RunQueue;
typedef struct {
typedef struct {
unsigned short tcpip_port;
int numClients;
int client_spu_id;
int mtu;
int buffer_size;
char protocol[1024];
int SpuContext; /**< Rendering context for the head SPU */
int SpuContextVisBits; /**< Context's visual attributes */
char *SpuContextDpyName; /**< Context's dpyName */
/** configuration options */
/*@{*/
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 vncMode; /* cmd line option */
/*@}*/
/** view_matrix config */
/*@{*/
/*@}*/
/** projection_matrix config */
/*@{*/
int currentEye;
/*@}*/
/** for warped tiles */
/*@{*/
/*@}*/
/*@{*/
float *overlap_intens;
int num_overlap_intens;
int num_overlap_levels;
/*@}*/
} CRServer;
extern DECLEXPORT(void) crServerServiceClients(void);
extern DECLEXPORT(void) crServerAddNewClient(void);
extern DECLEXPORT(void) crVBoxServerTearDown(void);
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);
#ifdef __cplusplus
}
#endif
#endif