Archived

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

2d with dx8

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

umm i should probably use dx7 with 2d right? ____________________________ mr. gates, linux just moved up 5%. "no problem, ill just steal their features. it worked with netscape... and we''''re still alive!"

Share this post


Link to post
Share on other sites
Well , it depends.
If you want to do 2D using 3d hardware acceleration you will be better of with dx8. But if you like all the 2d blitting and stuff then ddraw is the answer and dx8 doesn''t have ddraw so you have to use dx7. Pretty simple

Share this post


Link to post
Share on other sites
Alright i know it is possible to use 3D hardware to do 2D. But how? How can i render a 2D image on the screen using DX8? I know there is a function called CopyRects() but that is just like doing a blit with DirectDraw so i wouldnt call that using 3D hardware.

-Thanks

Share this post


Link to post
Share on other sites
To do 2d in D3D, you draw 2 triangles on the screen so that they make a square. They you use texture mapping to draw a tile or character or whatever onto your square. The advantage to using D3D is that you can have isometric tiles, and D3D supports alpha blending.


- Bong, James Bong

Share this post


Link to post
Share on other sites
god , copyrects , no way!
copyrects are evil anyway you simple draw triangles with textures where textures are your images , i will point you to a tutorial , wait a sec...
http://www15.brinkster.com/furby100/index.htm
tutorials/d3d section , found it today , seems to be a nice tutorial , didn''t read it yet thru. Hope it helps

Share this post


Link to post
Share on other sites
where is 7 available at? as usuall, microsft throws their old stuff in the trash. im on a new comp, so i dont have it

____________________________
mr. gates, linux just moved up 5%. "no problem, ill just steal their features. it worked with netscape... and we''''re still alive!"

Share this post


Link to post
Share on other sites
nevermind my above question. i found the libraries. but jonatan, ddraw isnt included in dx8. itll never be updated again

____________________________
mr. gates, linux just moved up 5%. "no problem, ill just steal their features. it worked with netscape... and we''''re still alive!"

Share this post


Link to post
Share on other sites
directx is backward compatible , but in dx8 docs (from dx8sdk) you won''t find information about dx7/ddraw (which are in dx7sdk) , therefore you need dx7sdk it''s not anymore on m$ site i think , but you can still grab it from some other sites , eventually i can put it onto my ftp (i live in poland therefore connection might be slow) , it''s like 150mb or so
(email me if you want it)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
ddraw isn''t in dx8 , that''s right , but as far as i know it''s supposed to appear again in dx9

Share this post


Link to post
Share on other sites
crap wrong page. i STILL cant find the d7 sdk on microshit. do they always have to make things complicated?

found it. this IS the most updated ver. of dx7 right?

http://www.softseek.com/cgi-bin/download?16288-http://download.microsoft.com/download/win98SE/SDK/7.0/W9X/EN-US/dx7sdk-700.1.exe

____________________________
mr. gates, linux just moved up 5%. "no problem, ill just steal their features. it worked with netscape... and we''re still alive!"

Edited by - StarHawk on April 22, 2001 3:06:49 PM

Share this post


Link to post
Share on other sites
Star: You don''t need direct X 7.0. Direct X 8.0 is backwards compatible. So all you need to do is query the direct x 7 interfaces to access direct draw. If you would like to see how this is done you can look at the source code in the direct draw samples which comes with direct x 8.0.

Share this post


Link to post
Share on other sites
The problem is, that the dx8 docs lack the information about dx7.

Hm.. Perhaps you could easily get the dx7 docs via the platform sdk - at least that worked with dxmedia.

Speckdrumm Interactive -Specktacular Entertainment
http://www.speckdrumm.com

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
an easy way to do 2D stuff in Dx8 is simply to use the D3DX helper library and use sprites. ie. do this:

// create sprite
D3DXCreateSprite(g_pd3dDevice, &sprite_name);

// create texture for sprite:

D3DXCreateTextureFromFile( g_pd3dDevice, "./texture.jpg",
&g_pTexture1);

// then in your render loop do this:

sprite_name->Draw(g_pTexture1,NULL,new D3DXVECTOR2(0.7f,0.7f),NULL,0, new D3DXVECTOR2(20,20),D3DCOLOR_COLORVALUE(1.f,1.f,1.f,.85f) );


I''m using it right now and it works beautifully. Plus those vectors you see in the drawing call let you do rotation, scaling, alpha, and so on.

hope that helps.

Share this post


Link to post
Share on other sites
Okay. For the umpteenth time...

You do not need the DX7 SDK to use DDraw. Go to the following URL:
http://msdn.microsoft.com/downloads/default.asp?URL=/code/topic.asp?URL=/msdn-files/028/000/114/topic.xml. In the navigation menu on the left side, click on "DirectX 8.0 Partial SDK Downloads". In the right frame, scroll down until you see "DirectX 7.1 Documentation (contains both C++ and Visual Basic) 14 MB". The DX7 docs will be installed in the "extras" directory of your DX SDK root.

Now, you''ll have all of the documentation you need and you can start using DirectDraw with the DX8 SDK.

GamesToGO: The Console Gamer''s Paradise

Share this post


Link to post
Share on other sites