Jump to content
  • Advertisement

Archived

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

Yratelev

Call me a dummy, but whats D8.1's "Blit" method called?

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

Advertisement
In Direct3d? Well, DrawPrimitive in order to draw 2 primitives (triangles) that form a quad.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
Ummm no, i mean as completely 2D, no 3D at all
We never used to have to know anything about primitives verticies etc in Direct X 7, do we have to now? wont that make 2D games slower?

Yratelev

Share this post


Link to post
Share on other sites
Yratelev - it will make 2d games FASTER y a HUGE degree thanks to the tremendous hardware acceleration.

You seem to forget that 2d games are just a special case for 3d games - all objects are flat planes with texture, and the projection matrix is also a little special.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
well i think there is a big difference - 2D requires you just to copy rects of the surfaces to the primary one, 3D requires you to plug in matrices etc etc... so ill take that's a no to my question... I agree theres additional functionality, but i didnt want to learn the maths and code of 3D.

incidently that sprite thing is kinda what im looking for, so im happy now.

Yratelev

[edited by - Yratelev on August 27, 2002 8:46:57 AM]

[edited by - Yratelev on August 27, 2002 9:06:00 AM]

Share this post


Link to post
Share on other sites
Well, just as a note - when you go 2d with Direct3d, most matrices are turned of. There is a special VertexBuffer format where you trn in the folly transformed screen coordinates.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
The thing to remember about DX 8 is that there are no new DirectDraw interfaces. But because DX is backwards compatible, you can still use DDraw 7 interfaces as normal (or even older ones if you prefer).

Share this post


Link to post
Share on other sites
LPDIRECT3DDEVICE8 pDevice; //Valid Device Ptr
LPDIRECT3DTEXTURE8 pTexture; // Valid Texture

LPD3DXSPRITE* pSprite = NULL;
HRESULT hr = D3DXCreateSprite(pDevice,&pSprite);
if (FAILED(hr))
.. Oh Drat


pSprite->Draw(pTexture,NULL,NULL,ULL,0.0f,&D3DXVECTOR2(10.0f,10.0f),-1);

// Draws a texture at 10,10 coords on screen


pSprite->Draw(pTexture,NULL,NULL,ULL,0.0f,&D3DXVECTOR2(10.0f,10.0f),D3DCOLOR_ARGB(200,200,200,200))

// Draws a texture at 10,10 coords on screen using a transparency value of about 78% (based on 200 alpha color/255*100)


pSprite->Draw(pTexture,NULL,NULL,ULL,D3DXToRadian(50),&D3DXVECTOR2(10.0f,10.0f),-1);

// Draws a texture at 10,10 coords on screen rotated about 50 degrees.

etc. view the docs.






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!