OSDN Git Service

fix cmake/Macros.cmake
[moflib/moflib.git] / moflib-1.0 / moflib / moflib / mof / GraphicsDevice.hpp
1 #pragma once
2 #include "mof/real.hpp"
3 #include "mof/Color.hpp"
4 #include "mof/Matrix3D.hpp"
5 #include "mof/VertexTypes.hpp"
6 #include <boost/utility.hpp>
7 #include <boost/scoped_ptr.hpp>
8 #include <vector>
9 #include "mof/Rectangle.hpp"
10
11
12
13 namespace mof{
14     struct Material;
15     class Texture;
16
17     namespace GraphicsDevice 
18     {
19
20         // public 
21         
22             enum BlendingMode
23             {
24                     BLENDING_MODE_ADD ,
25                     BLENDING_MODE_BASIC ,
26                     BLENDING_MODE_ALPHA
27             };
28         
29             void setWorldTransform( const mof::Matrix3D& matrix );
30             void setProjectionTransform( real min , real max );
31             void setViewTransform( const mof::Matrix3D& matrix );
32             const mof::Matrix3D& getWorldTransform( );
33             const mof::Matrix3D& getProjectionTransform( );
34             const mof::Matrix3D& getViewTransform( );
35             void setZBuffer( bool flag );
36             void lightEnable( bool enable );
37             void clearZBuffer( );
38             void clearRenderTarget( mof::Color color );
39             void setAlphaBlendingMode( const int flag );
40             mof::Vector2D to2DPosition( const mof::Vector3D& position );
41             void setViewport( const mof::Rectangle<int>& area );
42             int getViewportWidth( );
43             int getViewportHeight( );
44                 int get_num_of_displays();
45                 std::vector<mof::Vector2D> get_caps(int adapter_id);
46
47             template <class T> void drawVertexArray
48             (
49                 const T& front , const T& last , 
50                 mof::PRIMITIVE_TYPE type = PRIMITIVE_TYPE_TRIANGLELIST 
51             ); 
52             void setMaterial( const mof::Material& material );
53             void setTexture( const mof::Texture* pTexture );
54             mof::Rectangle<int> getClientRegion( );
55             
56     } // namespace GraphicsDevice
57
58
59 } // namespace mof