CrossFramework Library

XG3D/Renderer.hpp

説明を見る。
00001 
00006 #if defined(XG3D_INCLUDED_RENDERER_HPP)
00007 #else
00008 #define XG3D_INCLUDED_RENDERER_HPP
00009 
00010 //------------------------------------------------------------
00011 #include <XBase/Color4.hpp>
00012 #include <XBase/Matrix34.hpp>
00013 #include <XBase/Matrix44.hpp>
00014 #include <XBase/NonCopyable.hpp>
00015 #include <XG3D/BuiltInTypes.hpp>
00016 #include <XG3D/Engine.hpp>
00017 #include <XG3D/TexId.hpp>
00018 
00019 #if defined(XG3D_ENGINE_GLSERIES)
00020     #include <XG3D/Renderer_GL.hpp>
00021 #endif
00022 
00023 //------------------------------------------------------------
00024 namespace XBase {
00025     class Display;
00026     class Screen;
00027 }
00028 namespace XG3D {
00029     class ResMat;
00030     class ResMdlShape;
00031     class ResMdlSubMesh;
00032     class StateMaterial;
00033     class StateMdlMaterial;
00034     class StateMdlTransform;
00035     class TexSetting;
00036 }
00037 
00038 //------------------------------------------------------------
00039 namespace XG3D {
00041 
00042 
00045     class Renderer : public ::XBase::NonCopyable
00046     {
00047     public:
00049 
00050         static Renderer& Instance();
00052 
00054 
00055         Renderer( ::XBase::Display& aSampleDisplay );
00056         ~Renderer();
00058         
00060 
00061 
00062         void reset();
00064 
00066 
00067         void fbClear(); 
00068         void fbSetClearColor( const ::XBase::Color4POD& aColor ); 
00069         void fbSetClearDepth( float aDepth ); 
00070         void fbSetColorUpdate( bool aIsEnable ); 
00071         void fbSetDepthUpdate( bool aIsEnable ); 
00072         // void fbSetDepthCompare( DepthCompare );  ///< 深度比較の式を設定する。初期値 DepthCompare_Always 。
00073         void fbSetViewport( uint aBaseX , uint aBaseY , uint aWidth , uint aHeight ); 
00074 
00075 
00077 
00078         void sdReset(); 
00079         void sdSetMaterialForDemo(); 
00080         void sdSetMaterial( const ResMat& aResMat ); 
00081         void sdSetMtxProjection( const ::XBase::Mtx44& ); 
00082         void sdSetMtxView( const ::XBase::Mtx34& );  
00083         void sdSetMtxWorld( const ::XBase::Mtx34& );  
00084         void sdSetTex( TexId , const TexSetting& ); 
00085 
00086 
00088 
00089         void draw( const ResMdlSubMesh& aSubMesh , const StateMdlTransform& aMdlTransform , const StateMdlMaterial& aMdlMaterial ); 
00090         void draw( const ResMdlShape& aShape , const StateMaterial& aMaterial ); 
00091 
00092 
00094 
00095         void waitDrawDone(); 
00096 
00097 
00099 
00100         void copyToDisplay( ::XBase::Display& ); 
00101         void copyToScreen( ::XBase::Screen& );   
00102 
00103 
00104     private:
00105         ::XBase::Display& mDisplay;
00106         Renderer_EXT mEXT;
00107     };
00108 
00110 }
00111 //------------------------------------------------------------
00112 #endif
00113 // EOF
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義