here is the code:
Code: Select all
Texture* text = mRoot->getTextureManager()->createManual("texture" + StringConverter::toString(i), TEX_TYPE_2D, 512, 512, 0, PF_A8R8G8B8, TU_DEFAULT);
PixelFormat pf = text->getFormat();
i try next:
Code: Select all
Image img;
uchar *pImage = new uchar[512 * 512 * 4];
img.loadDynamicImage(pImage, 512, 512, PF_A8R8G8B8);
text->loadImage(img);
the ogre code is here:
Code: Select all
void D3D9Texture::_createNormTex()
{
// we must have those defined here
assert(mSrcWidth > 0 || mSrcHeight > 0);
// determine wich D3D9 pixel format we'll use
HRESULT hr;
D3DFORMAT d3dPF = (mUsage == TU_RENDERTARGET) ? mBBPixelFormat : this->_chooseD3DFormat();
I suppose i miss a step in the texture initialisation or smth!
my goal is to create a blank texture!
any ideas?!
