Archived

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

Lifepower

Direct3DIM

Recommended Posts

Lifepower    136
...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"

Share this post


Link to post
Share on other sites
Ampaze    122
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 ]

Share this post


Link to post
Share on other sites
Lifepower    136
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)

Share this post


Link to post
Share on other sites
Neo[NB]    122
"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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Lifepower    136
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"

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Ampaze    122
I''d suggest you get the newest SDK helpfile from Erik Ungers Site @ [url]http://www.delphi-jedi.org/DelphiGraphics/DirectX/DX7Help.zip[/url]

[ Ampaze | www.crazyentertainment.net ]

Share this post


Link to post
Share on other sites