gfx.h 2.67 KB
/*====================================================================
 * gfx.h
 *
 * Synopsis:
 *
 * mostly pinched from rdpcov written by hsa.
 *
 * Copyright 1993, Silicon Graphics, Inc.
 * All Rights Reserved.
 *
 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
 * Inc.; the contents of this file may not be disclosed to third
 * parties, copied or duplicated in any form, in whole or in part,
 * without the prior written permission of Silicon Graphics, Inc.
 *
 * RESTRICTED RIGHTS LEGEND:
 * Use, duplication or disclosure by the Government is subject to
 * restrictions as set forth in subdivision (c)(1)(ii) of the Rights
 * in Technical Data and Computer Software clause at DFARS
 * 252.227-7013, and/or in similar or successor clauses in the FAR,
 * DOD or NASA FAR Supplement. Unpublished - rights reserved under the
 * Copyright Laws of the United States.
 *====================================================================*/

#include "spacerom.h"
#include <sched.h>

#ifdef MVTVIEW
#include "mvtdefs.h"
#endif

#define	SCREEN_HT	240
#define	SCREEN_WD	320

#ifdef CFB_16_BIT
typedef u16 cfbtype;
#else
typedef u32 cfbtype;
#endif

/*
 * ifdef needed because this file is included by "spec"
 */
#ifdef _LANGUAGE_C

/*
 * Layout of our dynamic segment
 */
typedef struct {
	Mtx	projection;
	Mtx	viewing;
	Mtx	model1;
	Mtx	identity;
	Mtx	viewing_sun;
	Mtx	viewing_mercury;
	Mtx	viewing_venus;
	Mtx	viewing_earth;
	Mtx	sun;
	Mtx	mercury;
	Mtx	venus;
	Mtx	earth;
	Mtx     enterprise_mercury;
	Mtx     enterprise_venus;
	Mtx     enterprise_earth;
	Gfx	glist[512];
#ifdef MVTVIEW
	Mtx      mvt[MVT_MAX_OBJECTS];
	Mtx      mvtg[MVT_MAX_OBJECTS];
       MVTTextureType mvt_texture[MVT_MAX_GROUPS][MVT_MAX_TILES][MVT_TILE_SIZE];
#endif
} Dynamic;

typedef union {    

    struct {
        short   type;
    } gen;
    
    struct {
        short   type;
    } done;
    
    OSScMsg     app;
    
} GFXMsg;

typedef struct {
    OSScTask    task;
    Dynamic     dp;
    GFXMsg      msg;
    cfbtype	*cfb;
} GFXInfo;

extern Dynamic	dynamic;
extern unsigned short zbuffer[];
extern Gfx	setup_rdpstate[];
extern Gfx	setup_rspstate[];
extern Gfx	model_1_matrix[];
extern Gfx	sun_matrix[];
extern Gfx	mercury_matrix[];
extern Gfx	venus_matrix[];
extern Gfx	earth_matrix[];
extern Gfx	enterprise_mercury_matrix[];
extern Gfx	enterprise_venus_matrix[];
extern Gfx	enterprise_earth_matrix[];
extern Gfx	sun_dl[];
extern Gfx	mercury_dl[];
extern Gfx	venus_dl[];
extern Gfx	earth_dl[];
extern Gfx	craterplanet_dl[];
extern Gfx	enterprise[];
extern Gfx	klingon[];

extern Gfx	*glistp;	/* global for test case procs */

extern cfbtype cfb_a[];
extern cfbtype cfb_b[];

extern u64	gfxYieldBuf[];

#endif	/* _LANGUAGE_C */