File: context_d3d9.h

package info (click to toggle)
glest 3.2.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: squeeze
  • size: 2,800 kB
  • ctags: 6,581
  • sloc: cpp: 32,575; sh: 8,341; makefile: 63
file content (48 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef _SHARED_D3D9_DEVICECONTEXTD3D9_H_
#define _SHARED_D3D9_DEVICECONTEXTD3D9_H_ 

#include "context.h"

#include <d3d9.h>

namespace Shared{ namespace Graphics{ namespace D3d9{

// ===============================
//	class ContextD3d9  
// ===============================
    
class ContextD3d9: public Context{
private:
	bool windowed;
	bool hardware;

	IDirect3D9 *d3dObject;
	IDirect3DDevice9 *d3dDevice;
	D3DCAPS9 caps;
	D3DPRESENT_PARAMETERS d3dPresentParameters;

public:
	bool getWindowed() const	{return windowed;}
	bool getHardware() const	{return hardware;}

	void setWindowed(bool windowed)	{this->windowed= windowed;}
	void setHardware(bool hardware)	{this->hardware= hardware;}

	ContextD3d9();

	virtual void init();
	virtual void end();
	virtual void reset();

	virtual void makeCurrent();
	virtual void swapBuffers();

	const D3DCAPS9 *getCaps() const	{return &caps;};


	IDirect3DDevice9 *getD3dDevice() {return d3dDevice;}
};

}}}//end namespace

#endif