Results 1 to 8 of 8

Thread: Direct3D Texture problem

  1. #1

    Direct3D Texture problem

    I was wondering if anyone had seen this problem before.

    Here are tow screenshots. The first is the Opengl Version of the renderer working, the second is the direct 3D verison.




    I have checked the texture after it is loaded and saved it using D3DXSaveTextureToFile and the texture looks fine. So I can only assume it's something to do with the direct3Ddevice setup.

    Any tips or hints on setting up the device :?:

    The weird thing is that the Logo in the bottom right is also a texture and that works fine :?: :?:
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  2. #2

    Direct3D Texture problem

    Looks like a problem with texture atlas (if you use it). Can you disable mip-mapping in D3D?
    There are only 10 types of people in this world; those who understand binary and those who don't.

  3. #3

    Direct3D Texture problem

    Wasn't there something like bottom up / top down problem in texture positioning when converting from OpenGL to DirectX?

    Have you tried to mirror the texture vertically and look at the result?
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  4. #4

    Direct3D Texture problem

    Looks like mip filter is enabled but mip maps have not been generated...

  5. #5

    Direct3D Texture problem

    Thanks for all the tips people.

    I am calling

    [pascal]
    FTexture.GenerateMipSubLevels;
    [/pascal]

    So how do you turn on/off MipMap Filtering?
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  6. #6

    Direct3D Texture problem

    I think you need to call fD3DDevice.SetRenderState like this:

    [pascal]
    //set Mipmap filtering type (you can also specify D3DTEXF_NONE).
    SetTextureStageState(0, D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
    [/pascal]

    This works for DX8. I've looked it up and it seems that DX9 is different at this point. :?

    http://msdn2.microsoft.com/en-us/library/bb172617.aspx

    D3DTSS_MIPFILTER isn't present in D3DTEXTURESTAGESTATE struct.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  7. #7

    Direct3D Texture problem

    Device.SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);

  8. #8

    Direct3D Texture problem

    Well

    I removed the

    [pascal]
    FTexture.GenerateMipSubLevels;
    [/pascal]

    and it now works

    So the next thing is to get the MipMapping working correctly
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •