維尼的蜂巢

RealTime??!! It’s amazing!!!!

Load a texture from memory 三月 27, 2006

Filed under: Engine,VC++/C++/C — kevinlin @ 4:45 下午

我想實做軟體模式render 因為只提供這三個方法 所以沒辦法
//! loads a Texture
virtual ITexture* getTexture(const c8* filename);
//! loads a Texture
virtual ITexture* getTexture(io::IReadFile* file);
//! creates a Texture
virtual ITexture* addTexture(const core::dimension2d& size, const c8* name, ECOLOR_FORMAT format);

解決方法如下
video::IImage *img = Driver->createImageFromData(video::ECF_A8R8G8B8,core::dimension2d(widh,heigh), (int32*) buffer ,true);

TeturImgArr= driver->addTexture(“TxtrName", img );

 

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s