Jump to content
  • Advertisement

Archived

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

freddoh

Mipmapping disabled?

This topic is 5954 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

Under directX 8.1, my app for some reason does not use the mipmap levels of a texture even though they are activated. Here is what I do: - I create a texture using IDirect3DDevice8::CreateTexture() specifying 4 levels. I then fill the level''s surfaces independantly with 4 different bitmaps. - to check that the levels were correctly filled, I''ve used D3DXSaveSurfaceToFile() as degugging purpose and it showed the surfaces were ok and correctly filled. - in my rendering routine, I use the following code:
  
theDevice.SetTextureStageState(0,D3DTSS_COLOROP,   D3DTOP_SELECTARG1);
theDevice.SetTextureStageState(0,D3DTSS_COLORARG1, D3DTA_TEXTURE);
theDevice.SetTextureStageState(0,D3DTSS_ALPHAOP,   D3DTOP_DISABLE);
theDevice.SetTextureStageState(0,D3DTSS_MIPFILTER, D3DTEXF_LINEAR);
theDevice.SetTextureStageState(0,D3DTSS_MAGFILTER, D3DTEXF_POINT);
theDevice.SetTextureStageState(0,D3DTSS_MINFILTER, D3DTEXF_POINT);
  
which is supposed to activate the usage of mipmaps isnt''t it (theDevice.SetTextureStageState(0,D3DTSS_MIPFILTER, D3DTEXF_LINEAR) ? - I draw a square primitive using an orthogonal projection. I scale the primitive (using D3DXMatrixScaling()) to make it grow/shrink. This way I should see all the mipmap levels isn''t it? Well, there must be something wrong because it''s always the highest mipmap level that is used (the highest resolution) and rescaled appropriately (using the min and mag filters). Would someone know why the other mipmap levels don''t show up? (my hardware supports it, GeForce + latest drivers) Thanks, fred.

Share this post


Link to post
Share on other sites
Advertisement
I thought that scaling a primitive would just scale it and not change mipmaps, you have to change the distance to the primitive instead -
I dont know this I am just guessing (see my post! )

Share this post


Link to post
Share on other sites
How can I change any distance since I''m using an orthogonal projection? (there is no notion of z axis with such a projection). Any idea?

Share this post


Link to post
Share on other sites
I don''t know, perhaps you will have to build your own functions that increase the resolution of the texture as the primitive gets BIGGER (x,y). Does anyone know?

Share this post


Link to post
Share on other sites
Well i''ve checked using a standard 3D projection and the result is the same, no mimapping. So this is not due to the orthogonal projection...something else... (what???!!)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!