Archived

This topic is now archived and is closed to further replies.

a puzzling problem with sprites

This topic is 5574 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using two polygons and texturing it with a bmp i created in photoshop. When I load it in my program though the detail completely goes and it looks terrible. The original is http://www.maidenfans.com/splash2.jpg and in my program it looks like this: http://www.maidenfans.com/splash.jpg This might be a difficult question to answer with just these details so if you need any more info just ask. I'm really puzzled because its not being scaled at all Cheers Dave Planetblaze.com - www.planetblaze.com - As METAL as it gets! [edited by - Real World on September 9, 2002 6:04:42 PM]

Share this post


Link to post
Share on other sites
You might want to make sure that bilinear filtering (or any other kind of filtering) is off, or set to point/nearest. (The exact details will depend on your API).

Oh, and if that''s meant to be Blaze in the middle, he needs to be fatter.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites
Oh sorry, forgot to mention its DirectX 8.1 What should I be looking for if thats the case as most of that type of code I''ve got from tutorials.
And Blaze has lost a lot of weight since he left Maiden

Share this post


Link to post
Share on other sites
I don''t have the DX8 SDK installed, so I don''t know the exact functions. But look for lines with ''SetRenderState'' in, especially anything resembling ''MAGFILTER'' and ''MINFILTER''.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites

if(FAILED(m_pD3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE)))
{
LogError("
  • SetRenderState: D3DRS_ALPHABLENDENABLE Failed");
    return false;
    }
    else
    {
    //Set how the texture should be blended (use alpha)
    m_pD3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
    m_pD3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    LogInfo("
  • SetRenderState: D3DRS_ALPHABLENDENABLE OK");
    }

  • Thats the only renderstate I have in there thats active. I don''t THINK theres any filtering. I tried adding some and it 1/4 the frame rate so i took it off.

    Share this post


    Link to post
    Share on other sites