Jump to content
  • Advertisement


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


background image...

This topic is 5859 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 need some help! I want to know how can I show 2D graphics in DirectX 8 for VB? i wrote a program that shows a background picture, but the picture isn''t smooth like i would use directdraw7! can anyone give me please some advices or if possible a source code(Visual Basic)? thanks

Share this post

Link to post
Share on other sites
Basically, the way I do 2d stuff in Direct3D is as follows:

(btw - haven''t used DX in VB for a long time, but you''ll get the idea)

* Where you specify your vertex type, include a single variable called "rhw", usually after the position data.
* In your shader declaration, replace D3DFVF_XYZ with D3DFVF_XYZRHW
*All the vertex coordinates using this vertex type setup will now be in screen coordinates. Everything else is pretty much as standard - just remember the coordinates..

If this is all meaningless to you, first thing I would suggest next is to follow the SDK tutorials, which cover this sort of thing completely.

Share this post

Link to post
Share on other sites
by specifying the XYZRHW flag option though, you''re not able to benefit from Direct3D''s T&L pipeline..

Just to throw a log onto the fire, another possible way is to also keep to the XYZ flag, and just change the projection transformation matrix to Orthogonal.

That way you can STILL specify your objects in screen coordinates, but you also benefit from Direct3D''s pipeline..

just my 2 cents..

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!