Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualbelfegor

Posted 25 April 2013 - 02:28 AM

I will try to use my psychic powers to solve your problem.

You have declaration for your 5 textures somewhere and set them to NULL ?

 

LPDIRECT3DTEXTURE9 terrBlendTex = NULL;
LPDIRECT3DTEXTURE9 terr1Tex = NULL;
LPDIRECT3DTEXTURE9 terr2Tex = NULL;
LPDIRECT3DTEXTURE9 terr3Tex = NULL;
LPDIRECT3DTEXTURE9 terr4Tex = NULL;

 

And then in part of code when you load them, you have copied code that loads first 2 because you have that from previous tests:

 

    hr = D3DXCreateTextureFromFile(d3d9device, "blendmap.png", &terrBlendTex);
    ...// check for error
    hr = D3DXCreateTextureFromFile(d3d9device, "texture1.png", &terr1Tex); // copied this
    ...// check for error
    hr = D3DXCreateTextureFromFile(d3d9device, "texture2.png", &terr2Tex); // and this
    ...// check for error
    hr = D3DXCreateTextureFromFile(d3d9device, "texture3.png", &terr1Tex); // here
    ...// check for error
    hr = D3DXCreateTextureFromFile(d3d9device, "texture4.png", &terr2Tex); // and here
    ...// check for error

But forget to change pointer variable names?

 

And then when you set those:

 

        d3d9device->SetTexture(0, terrBlendTex);
        d3d9device->SetTexture(1, terr1Tex);
        d3d9device->SetTexture(2, terr2Tex);
        d3d9device->SetTexture(3, terr3Tex); // NULL
        d3d9device->SetTexture(4, terr4Tex); // NULL

3rd & 4th textures are now showing as white?

 

Is that a problem?

 

Try this as blendmap.


#1belfegor

Posted 25 April 2013 - 02:25 AM

I will try to use my psychic powers to solve your problem.

You have declaration for your 5 textures somewhere and set them to NULL ?

LPDIRECT3DTEXTURE9 terrBlendTex = NULL;
LPDIRECT3DTEXTURE9 terr1Tex = NULL;
LPDIRECT3DTEXTURE9 terr2Tex = NULL;
LPDIRECT3DTEXTURE9 terr3Tex = NULL;
LPDIRECT3DTEXTURE9 terr4Tex = NULL;

 

And then in part of code when you load them, you have copied code that loads first 2 because you have that from previous tests:

    hr = D3DXCreateTextureFromFile(d3d9device, "blendmap.png", &terrBlendTex);
    ...// check for error
    hr = D3DXCreateTextureFromFile(d3d9device, "texture1.png", &terr1Tex); // copied this
    ...// check for error
    hr = D3DXCreateTextureFromFile(d3d9device, "texture2.png", &terr2Tex); // and this
    ...// check for error
    hr = D3DXCreateTextureFromFile(d3d9device, "texture3.png", &terr1Tex); // here
    ...// check for error
    hr = D3DXCreateTextureFromFile(d3d9device, "texture4.png", &terr2Tex); // and here
    ...// check for error

But forget to change pointer variable names?

 

And then when you set those:

        d3d9device->SetTexture(0, terrBlendTex);
        d3d9device->SetTexture(1, terr1Tex);
        d3d9device->SetTexture(2, terr2Tex);
        d3d9device->SetTexture(3, terr3Tex); // NULL
        d3d9device->SetTexture(4, terr4Tex); // NULL

3rd & 4th textures are now showing as white?

 

Is that a problem?


PARTNERS