How to rotate a texture in Dx8
How to rotate a texture in Dx8
How to rotate a texture in Dx8
How to rotate a texture in Dx8
How to rotate a texture in Dx8
How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8
How to rotate a texture in Dx8 How to rotate a texture in Dx8
How to rotate a texture in Dx8
Go Back  Xtreme Visual Basic Talk > > > > How to rotate a texture in Dx8


Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2009, 10:45 PM
apan156 apan156 is offline
Newcomer
 
Join Date: May 2009
Posts: 2
Default How to rotate a texture in Dx8


I have searched all over the web, and yet I cant find any info about how to do this..

I'm creating a simple 2d engine using directx8, and I need to know some way to rotate textures. I know there is a way, I just dont know how ^^

I wouldnt have posted here if I hadn't searched my *** off already. Thanks, I'm grateful for any help or pointers
Reply With Quote
  #2  
Old 05-14-2009, 10:59 PM
Qua's Avatar
QuaHow to rotate a texture in Dx8 Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

What approach are you using? Have you UV mapped the textures to your vertices or are you using a sprite class?
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #3  
Old 05-14-2009, 11:02 PM
apan156 apan156 is offline
Newcomer
 
Join Date: May 2009
Posts: 2
Default

I mapped the textures to vertices ^^
Reply With Quote
  #4  
Old 06-01-2009, 07:58 PM
Mattyski Mattyski is offline
Newcomer
 
Join Date: Jun 2009
Location: Brighton, England
Posts: 13
Default

Hi, err it maybe late to reply now but what the hell.....

Hopefully I'll explain it correctly:
If the shape is like a simple square and the verticle numbers are:

1-------2
| |
| |
4-------3

and the UV(more like X and Y) mappings are as follows:

1=0,0
2=1,0
3=1,1
4=0,1

to rotate the texture around move the UV values from 1 to 2, 2 to 3, 3 to 4 and 4 to 1 to move it 90 degrees clockwise.


Hopefully the next part makes sense?, or you get the idea.
If you want to rotate it by 45 degrees, the mapping has to overlap the borders. The following are guessed values.
1=0.5 ,-0.25
2=1.25 ,0.5
3=0.5 ,1.25
4=-0.25 ,0.5
On the edges where it appears the bitmap will not show. It should wrap around.
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
How to rotate a texture in Dx8
How to rotate a texture in Dx8
How to rotate a texture in Dx8 How to rotate a texture in Dx8
How to rotate a texture in Dx8
How to rotate a texture in Dx8
How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8 How to rotate a texture in Dx8
How to rotate a texture in Dx8
How to rotate a texture in Dx8
 
How to rotate a texture in Dx8
How to rotate a texture in Dx8
 
-->