CrossFramework Library
|
00001 00006 #if defined(XG3D_INCLUDED_RUNTIMETEX_HPP) 00007 #else 00008 #define XG3D_INCLUDED_RUNTIMETEX_HPP 00009 00010 //------------------------------------------------------------ 00011 #include <XBase/AutoMemBlock.hpp> 00012 #include <XBase/Color4.hpp> 00013 #include <XBase/Color4b.hpp> 00014 #include <XBase/IAllocator.hpp> 00015 #include <XBase/NonCopyable.hpp> 00016 #include <XG3D/BuiltInTypes.hpp> 00017 #include <XG3D/RuntimeTexContext.hpp> 00018 #include <XG3D/TexResData.hpp> 00019 00020 //------------------------------------------------------------ 00021 namespace XG3D { 00023 00024 00036 class RuntimeTex 00037 : public ::XBase::NonCopyable 00038 { 00039 public: 00041 00042 static pword_t CalcDataSize( const RuntimeTexContext& ); 00043 static pword_t RequireAlignment(); 00044 00045 00047 00048 00053 RuntimeTex( 00054 const RuntimeTexContext& aContext 00055 , ::XBase::IAllocator& aAllocator = ::XBase::IAllocator::Default() 00056 ); 00057 00059 ~RuntimeTex(); 00061 00063 00064 const RuntimeTexContext context()const; 00065 const ::XBase::MemBlock data()const; 00066 const TexResData texResData()const; 00067 00068 00070 00071 void beginEdit(); 00072 void endEdit(); 00073 void setPixel( uint aX , uint aY , const ::XBase::Color4POD& ); 00074 void setPixel( uint aX , uint aY , const ::XBase::Color4bPOD& ); 00075 00076 00077 private: 00078 const RuntimeTexContext mContext; 00079 ::XBase::AutoMemBlock mData; 00080 }; 00082 } 00083 //------------------------------------------------------------ 00084 #endif 00085 // EOF