home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / MISC / RMFULL.H < prev    next >
C/C++ Source or Header  |  1996-08-28  |  3KB  |  83 lines

  1. /*
  2.  *  Copyright (C) 1995, 1996 Microsoft Corporation. All Rights Reserved.
  3.  *
  4.  *  File: rmfull.h
  5.  *
  6.  */
  7. #ifndef __RMFULL_H__
  8. #define __RMFULL_H__
  9.  
  10. #include <windows.h>
  11. #include <windowsx.h>
  12. #include <stdio.h>
  13. #include <string.h>
  14. #include <time.h>
  15. #include <search.h>
  16. #include <ddraw.h>
  17. #include <d3d.h>
  18. #include <direct.h>
  19. #include <d3drmwin.h>
  20. #include "d3dapp.h"         /* prototypes for D3D helper functions */
  21. #include "rmdemo.h"         /* prototypes for functions to commumicate
  22.                                with each sample */
  23. #include "rmfullrc.h"       /* defines constants used in rmfull.rc */
  24. #define START_WIN_SIZE 320  /* initial size of the window */
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29.  
  30. typedef struct tagrmfullglobals {
  31.     HWND hWndMain;          /* application window handle */
  32.     HINSTANCE hInstApp;     /* application instance for dialog boxes */
  33.  
  34.     LPDIRECT3DRMDEVICE dev;     /* Direct3DRM device */
  35.     LPDIRECT3DRMVIEWPORT view;  /* Direct3DRM viewport through which we view
  36.                                    the scene */
  37.     LPDIRECT3DRMFRAME scene;    /* Master frame in which others are placed */
  38.     LPDIRECT3DRMFRAME camera;   /* Frame describing the users POV */
  39.  
  40.     BOOL bSingleStepMode;        /* render one frame at a time */
  41.     BOOL bDrawAFrame;            /* render on this pass of the main loop */
  42.     BOOL bShowFrameRate;         /* show the frame rate at the top */
  43.     BOOL bShowInfo;              /* show window information at the bottom */
  44.  
  45.     BOOL bResized; /* the window has resized or some other drastic change, the
  46.                       entire client area should be cleared */
  47.     BOOL bQuit;    /* program is about to terminate */
  48.  
  49.     BOOL bNoTextures;           /* this sample doesn't use any textures */
  50.     BOOL bConstRenderQuality;   /* this sample is not constructed with
  51.                                    MeshBuilders and so the RenderQuality
  52.                                    cannot be changed */
  53.     D3DRMRENDERQUALITY RenderQuality;   /* current shade mode, fill mode and
  54.                                            lighting state */
  55.     D3DRMTEXTUREQUALITY TextureQuality; /* current texture interpolation */
  56.     BOOL bDithering;                    /* is dithering on? */
  57.     BOOL bAntialiasing;                 /* is antialiasing on? */
  58.  
  59.     int mouse_buttons;          /* mouse button state */
  60.     int mouse_x;                /* mouse cursor x position */
  61.     int mouse_y;                /* mouse cursor y position */
  62.  
  63.     LPDIRECTDRAWSURFACE lpFrameRateBuffer; /* frame rate surface */
  64.     LPDIRECTDRAWSURFACE lpInfoBuffer;      /* window info surface */
  65. } rmfullglobals;
  66.  
  67. void __cdecl Msg( LPSTR fmt, ... );
  68. /*
  69.  * STATS.CPP FUNCTION PROTOTYPES
  70.  */
  71. BOOL InitFontAndTextBuffers(void);
  72. BOOL WriteInfoBuffer(void);
  73. BOOL WriteFrameRateBuffer(float fps, long tps);
  74. void ResetFrameRate(void);
  75. BOOL CalculateFrameRate();
  76. BOOL DisplayFrameRate(int* count, LPD3DRECT lpExtents );
  77.  
  78. #ifdef __cplusplus
  79. };
  80. #endif
  81.  
  82. #endif // __RMFULL_H__
  83.