CrossFramework Library
|
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/NonCopyable.hpp> 00013 #include <XG3D/BuiltInTypes.hpp> 00014 #include <XG3D/Engine.hpp> 00015 00016 #if defined(XG3D_ENGINE_GLSERIES) 00017 #include <XG3D/Renderer_GL.hpp> 00018 #endif 00019 00020 //------------------------------------------------------------ 00021 namespace XBase { 00022 class Display; 00023 class Screen; 00024 struct Matrix34POD; 00025 struct Matrix44POD; 00026 } 00027 00028 //------------------------------------------------------------ 00029 namespace XG3D { 00031 00032 00035 class Renderer : public ::XBase::NonCopyable 00036 { 00037 public: 00039 00040 static Renderer& Instance(); 00042 00044 00045 Renderer( ::XBase::Display& aSampleDisplay ); 00046 ~Renderer(); 00048 00050 00051 00052 void reset(); 00054 00056 00057 void fbClear(); 00058 void fbSetClearColor( const ::XBase::Color4POD& aColor ); 00059 void fbSetClearDepth( float aDepth ); 00060 void fbSetColorUpdate( bool aIsEnable ); 00061 void fbSetDepthUpdate( bool aIsEnable ); 00062 // void fbSetDepthCompare( DepthCompare ); ///< 深度比較の式を設定する。初期値 DepthCompare_Always 。 00063 void fbSetViewport( uint aBaseX , uint aBaseY , uint aWidth , uint aHeight ); 00064 00065 00067 00068 void sdSetMtxProjection( const ::XBase::Matrix44POD& ); 00069 void sdSetMtxModelView( const ::XBase::Matrix34POD& ); 00070 00071 00073 00074 void waitDrawDone(); 00075 00076 00078 00079 void copyToDisplay( ::XBase::Display& ); 00080 void copyToScreen( ::XBase::Screen& ); 00081 00082 00083 private: 00084 ::XBase::Display& mDisplay; 00085 Renderer_EXT mEXT; 00086 }; 00087 00089 } 00090 //------------------------------------------------------------ 00091 #endif 00092 // EOF