From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- .../html/n_gen_ex_2_video_d_x9_8h_source.html | 312 +++++++++++++++++++++ 1 file changed, 312 insertions(+) create mode 100644 Doc/doxygen/html/n_gen_ex_2_video_d_x9_8h_source.html (limited to 'Doc/doxygen/html/n_gen_ex_2_video_d_x9_8h_source.html') diff --git a/Doc/doxygen/html/n_gen_ex_2_video_d_x9_8h_source.html b/Doc/doxygen/html/n_gen_ex_2_video_d_x9_8h_source.html new file mode 100644 index 0000000..5c932d7 --- /dev/null +++ b/Doc/doxygen/html/n_gen_ex_2_video_d_x9_8h_source.html @@ -0,0 +1,312 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/nGenEx/VideoDX9.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
VideoDX9.h
+
+
+Go to the documentation of this file.
1 /* Project nGenEx
+
2  Destroyer Studios LLC
+
3  Copyright © 1997-2004. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: nGenEx.lib
+
6  FILE: VideoDX9.h
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Direct3D and Direct3D Video classes for DirectX 7
+
13 */
+
14 
+
15 #ifndef VideoDX9_h
+
16 #define VideoDX9_h
+
17 
+
18 #include "Video.h"
+
19 #include "VideoSettings.h"
+
20 #include "List.h"
+
21 
+
22 // +--------------------------------------------------------------------+
+
23 
+
24 class VideoDX9;
+
25 class VideoDX9Enum;
+ + + +
29 class Surface;
+
30 class Segment;
+
31 
+ +
33 struct VideoDX9SolidVertex;
+ +
35 struct VideoDX9LineVertex;
+
36 
+
37 
+
38 // +--------------------------------------------------------------------+
+
39 
+
40 class VideoDX9 : public Video
+
41 {
+
42 public:
+
43  VideoDX9(const HWND& window, VideoSettings* vs);
+
44  virtual ~VideoDX9();
+
45 
+
46  virtual const VideoSettings*
+
47  GetVideoSettings() const { return &video_settings; }
+
48  virtual bool SetVideoSettings(const VideoSettings* vs);
+
49 
+
50  virtual bool SetBackgroundColor(Color c);
+
51  virtual bool SetGammaLevel(int g);
+
52  virtual bool SetObjTransform(const Matrix& o, const Point& l);
+
53 
+
54  virtual bool SetupParams();
+
55  virtual bool Reset(const VideoSettings* vs);
+
56 
+
57  virtual bool StartFrame();
+
58  virtual bool EndFrame();
+
59 
+
60  virtual int Width() const { return width; }
+
61  virtual int Height() const { return height; }
+
62  virtual int Depth() const { return bpp; }
+
63 
+
64  virtual void RecoverSurfaces();
+
65 
+
66  virtual bool ClearAll();
+
67  virtual bool ClearDepthBuffer();
+
68  virtual bool Present();
+
69  virtual bool Pause();
+
70  virtual bool Resume();
+
71 
+
72  virtual IDirect3D9* Direct3D() const { return d3d; }
+
73  virtual IDirect3DDevice9* D3DDevice() const { return d3ddevice; }
+
74  static IDirect3DDevice9* GetD3DDevice9();
+
75 
+
76  virtual bool IsModeSupported(int width, int height, int bpp) const;
+
77  virtual bool IsHardware() const { return true; }
+
78  virtual int ZDepth() const { return zdepth; }
+
79  virtual DWORD VidMemFree() const;
+
80  virtual int D3DLevel() const { return 9; }
+
81  virtual int MaxTexSize() const;
+
82  virtual int MaxTexAspect() const;
+
83  virtual int GammaLevel() const { return gamma; }
+
84 
+
85  virtual bool Capture(Bitmap& bmp);
+
86  virtual bool GetWindowRect(Rect& r);
+
87  virtual bool SetWindowRect(const Rect& r);
+
88  virtual bool SetViewport(int x, int y, int w, int h);
+
89  virtual bool SetCamera(const Camera* cam);
+
90  virtual bool SetEnvironment(Bitmap** faces);
+
91  virtual bool SetAmbient(Color c);
+
92  virtual bool SetLights(const List<Light>& lights);
+
93  virtual bool SetProjection(float fov,
+
94  float znear=1.0f,
+
95  float zfar=1.0e6f,
+
96  DWORD type=PROJECTION_PERSPECTIVE);
+
97  virtual bool SetRenderState(RENDER_STATE state, DWORD value);
+
98  virtual bool SetBlendType(int blend_type);
+
99 
+
100  virtual bool DrawPolys(int npolys, Poly* p);
+
101  virtual bool DrawScreenPolys(int npolys, Poly* p, int blend=0);
+
102  virtual bool DrawSolid(Solid* s, DWORD blend_modes=0xf);
+
103  virtual bool DrawShadow(Solid* s, int nverts, Vec3* verts, bool vis=false);
+
104  virtual bool DrawLines(int nlines, Vec3* v, Color c, int blend=0);
+
105  virtual bool DrawScreenLines(int nlines, float* v, Color c, int blend=0);
+
106  virtual bool DrawPoints(VertexSet* v);
+
107  virtual bool DrawPolyOutline(Poly* p);
+
108  virtual bool UseMaterial(Material* m);
+
109 
+
110  virtual bool UseXFont(const char* name, int size, bool b, bool i);
+
111  virtual bool DrawText(const char* text, int count, const Rect& rect,
+
112  DWORD format, Color c);
+
113 
+
114  virtual void PreloadTexture(Bitmap* bmp);
+
115  virtual void PreloadSurface(Surface* s);
+
116  virtual void InvalidateCache();
+
117 
+
118  static void CreateD3DMatrix(D3DMATRIX& result, const Matrix& m, const Point& p);
+
119  static void CreateD3DMatrix(D3DMATRIX& result, const Matrix& m, const Vec3& v);
+
120  static void CreateD3DMaterial(D3DMATERIAL9& result, const Material& mtl);
+
121 
+
122 private:
+
123  bool CreateBuffers();
+
124  bool DestroyBuffers();
+
125  bool PopulateScreenVerts(VertexSet* vset);
+
126  bool PrepareSurface(Surface* s);
+
127  bool DrawSegment(Segment* s);
+
128 
+
129  int PrepareMaterial(Material* m);
+
130  bool SetupPass(int n);
+
131 
+
132  HWND hwnd;
+
133  int width;
+
134  int height;
+
135  int bpp;
+
136  int gamma;
+
137  int zdepth;
+
138  Color background;
+
139 
+
140  VideoDX9Enum* dx9enum;
+
141  VideoSettings video_settings;
+
142 
+
143  IDirect3D9* d3d;
+
144  IDirect3DDevice9* d3ddevice;
+
145  D3DPRESENT_PARAMETERS d3dparams;
+
146  D3DSURFACE_DESC back_buffer_desc;
+
147  bool device_lost;
+
148 
+
149  BYTE* surface;
+
150 
+
151  DWORD texture_format[3];
+
152  D3DGAMMARAMP gamma_ramp;
+
153  double fade;
+
154 
+
155  Rect rect;
+
156 
+
157  IDirect3DVertexDeclaration9* vertex_declaration;
+
158  ID3DXEffect* magic_fx;
+
159  BYTE* magic_fx_code;
+
160  int magic_fx_code_len;
+
161 
+
162  IDirect3DTexture9* current_texture;
+
163  int current_blend_state;
+
164  int scene_active;
+
165  DWORD render_state[RENDER_STATE_MAX];
+
166  Material* use_material;
+
167 
+
168  Material* segment_material;
+
169  int strategy;
+
170  int passes;
+
171 
+
172  ID3DXFont* d3dx_font;
+
173  char font_name[64];
+
174  int font_size;
+
175  bool font_bold;
+
176  bool font_ital;
+
177 
+
178  Color ambient;
+
179  int nlights;
+
180 
+
181  int first_vert;
+
182  int num_verts;
+
183 
+
184  VideoDX9VertexBuffer* screen_vbuf;
+
185  VideoDX9IndexBuffer* screen_ibuf;
+
186  VideoDX9ScreenVertex* font_verts;
+
187  WORD* font_indices;
+
188  int font_nverts;
+
189 
+
190  VideoDX9ScreenVertex* screen_line_verts;
+
191  VideoDX9LineVertex* line_verts;
+
192 };
+
193 
+
194 #endif VideoDX9_h
+
195 
+
+
+ + + + -- cgit v1.1