Direct3DIM

Started by
7 comments, last by Lifepower 23 years, 8 months ago
...my first "New Post" these years I was moving into Direct3D developing and was wondering how the heck to make bilinear/trilinear texture filtering in immediate mode... Also another good question is how to select specific part of the texture to be rendered (now I''m using tu and tv parameters of D3DTLVERTEX which doesn''t sound like a good idea). Any help is very apprecated. Thanks in advance - Arcane Lifepower - "Although the world would call me free Each day the more her slave am I For in her very way to be There''s I don''t know what, I don''t know why"
Advertisement
Hi Lifepower,

To the first question. I am not sure what you mean. When using a accelerator-card it should be "on" from beginning. Are you using
IID_IDirect3DHALDevice in the CreateDevice call ?

For the second one, I think the only way is to use tu and tv.

[ Ampaze | www.crazyentertainment.net ]
[ Ampaze | www.crazyentertainment.net ]
Ok, let''s modify my question. (btw I use CreateDevice). How do I choose, enable or disable specific filter?

(I hope nobody minds I''m asking stupid questions)
"There are no stupid questions, only stupid answers"

Ok you set nearly all states in Direct3D IM with setrenderstate or settexturestagestate. But it''s better you download the sdk or at least the SKD Help file, because the help explains a lot of things!

Now to your questions.
First you need a valid pointer to an IDirect3DDevice7:
IDirect3DDevice7.SetTextureStageState(0, D3DTSS_MAGFILTER, dword(D3DTFG_LINEAR)); //IDirect3DDevice7 is your valid pointer

Now you''ve got bilinear filtering. But make sure that you use the HAL Driver and not the software emulation, because bilinear filtering only works in HAL.

And to your problem with the texture. Well read the help file. It''s a long theme and first difficult.

Neo
Webmaster @www.neobrothers.de .: 3D Spiele mit Delphi programmieren :.
quote:Original post by Neo[NB]
Now you''ve got bilinear filtering. But make sure that you use the HAL Driver and not the software emulation, because bilinear filtering only works in HAL.


IIRC, bilinear filtering is also emulated in software mode (HEL), but it''s much slower. That''s why most people (everybody ?) disables bilinear filtering when they have to switch to the HEL.


--
Kyodai Mahjongg
kyodai.com
--Kyodai Mahjonggkyodai.com
Ok thats right

Neo
Webmaster @www.neobrothers.de .: 3D Spiele mit Delphi programmieren :.
Thanks everybody for the help, the bilinear code worked fine. Again, my problem is that I never have the necessary help file

Besides I got DirectX7 but used DX5 SDK



- Arcane Lifepower -

"Although the world would call me free
Each day the more her slave am I
For in her very way to be
There''s I don''t know what, I don''t know why"
quote:Original post by Lifepower

Thanks everybody for the help, the bilinear code worked fine. Again, my problem is that I never have the necessary help file

Besides I got DirectX7 but used DX5 SDK


Well most of the functions (I say, most ) work the same way in both versions of DirectX anyway


--
Kyodai Mahjongg
kyodai.com
--Kyodai Mahjonggkyodai.com
I''d suggest you get the newest SDK helpfile from Erik Ungers Site @ http://www.delphi-jedi.org/DelphiGraphics/DirectX/DX7Help.zip

[ Ampaze | www.crazyentertainment.net ]
[ Ampaze | www.crazyentertainment.net ]

This topic is closed to new replies.

Advertisement