2D Transformations
2D Transformations
2D Transformations
2D Transformations
2D Transformations
2D Transformations 2D Transformations 2D Transformations 2D Transformations 2D Transformations 2D Transformations 2D Transformations 2D Transformations
2D Transformations 2D Transformations
2D Transformations
Go Back  Xtreme Visual Basic Talk > > > > 2D Transformations


Reply
 
Thread Tools Display Modes
  #1  
Old 08-23-2006, 02:37 PM
Moohasha's Avatar
Moohasha Moohasha is offline
Centurion
 
Join Date: Nov 2004
Location: Texas
Posts: 165
Default 2D Transformations


Okay, this is just embarrassing. Almost everything I've ever done in DX has been 3D, and I'm getting pretty good with that. Now I'm having to do some 2D stuff for work (a HUD), and I can't for the life of me figure out how to transform objects drawn in screen space as opposed to world space!!
It finally occured to me that I can't use the device's SetTransform() function, because that transforms the world space, which 2D shapes are not a part of. So, can someone please bonk me on the head and explain 2D annimations please? I wouldn't have thought it'd be this difficult.
__________________
"The whole trouble comes from the fact that there is so much tinkering with software. It is not made in a clean fabrication process, which it should be. What we need, is software engineering." — F.L. Bauer, 1968
Reply With Quote
  #2  
Old 08-27-2006, 03:49 PM
Moohasha's Avatar
Moohasha Moohasha is offline
Centurion
 
Join Date: Nov 2004
Location: Texas
Posts: 165
Default

I forgot to mention, I'm using DX 9.0c
__________________
"The whole trouble comes from the fact that there is so much tinkering with software. It is not made in a clean fabrication process, which it should be. What we need, is software engineering." — F.L. Bauer, 1968
Reply With Quote
  #3  
Old 08-27-2006, 05:40 PM
Iceplug's Avatar
Iceplug2D Transformations Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

Use a VertexFormat that uses Transformed vertices and remember to turn off the ZBufferWrite .
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #4  
Old 08-28-2006, 02:22 PM
Moohasha's Avatar
Moohasha Moohasha is offline
Centurion
 
Join Date: Nov 2004
Location: Texas
Posts: 165
Default

Well, the difficult part of all this is that I have to do it in C++, so the syntax isn't remotely the same. There's no nice VertexFormats to chose from, I just have to define my vertex format. But by defining my vertex format as (D3DFVF_XYZRHW | D3DFVF_DIFFUSE) should define it as transformed and lit.
As for the ZBufferWrite, I have no idea what that is. I am setting the ZEnable render state to false, but still no transformations.
Can someone post some sample code, and hopefully I can convert it to C++?
__________________
"The whole trouble comes from the fact that there is so much tinkering with software. It is not made in a clean fabrication process, which it should be. What we need, is software engineering." — F.L. Bauer, 1968
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
2D Transformations
2D Transformations
2D Transformations 2D Transformations
2D Transformations
2D Transformations
2D Transformations 2D Transformations 2D Transformations 2D Transformations 2D Transformations 2D Transformations 2D Transformations
2D Transformations
2D Transformations
 
2D Transformations
2D Transformations
 
-->