Problem with textures not working the same form one machine to another... 
Author Message
 Problem with textures not working the same form one machine to another...

I was trying to write a simple card game.  I loaded a large texture in
that is a GIF of all the cards.  Then I use a TLVertex to put the card
images on sprites (actually 2 polygons to form a rectangle).  On my PC
at home, this work just fine, on my PC at work, the cards look
scrunched or something.  I do not know why...  Can anyone help?  Both
of the PC's are running Win XP.

Also, I notice, when I draw my textures on my polygons, the small
portion of the texture I am taking from the large texture is moved a
pixel or two over from where it should be.  So instead of just getting
my cards picture, I get the right edge of the card next to it and my
card.  Is this normal.

This is very hard to explain via typing, I hope it makes sense.

Thanks for any help.



Sun, 26 Dec 2004 05:16:48 GMT  
 Problem with textures not working the same form one machine to another...
using the debug runtime? does the debutg runtime output contain any info?

any HRESULTS indicating problems?

some cards do have pixel centering issues, this is discussed in the docs.
see "Directly Mapping Texels to Pixels". also IHVs have documents on this,
specifically I think nVidia has something on their developer web site.

--

Phil Taylor
PM : DirectX SDK, Managed DirectX, Windows XP Inbox 3D screensavers, and a
few more bits and bobs.
http://msdn.microsoft.com/directx
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:
> I was trying to write a simple card game.  I loaded a large texture in
> that is a GIF of all the cards.  Then I use a TLVertex to put the card
> images on sprites (actually 2 polygons to form a rectangle).  On my PC
> at home, this work just fine, on my PC at work, the cards look
> scrunched or something.  I do not know why...  Can anyone help?  Both
> of the PC's are running Win XP.

> Also, I notice, when I draw my textures on my polygons, the small
> portion of the texture I am taking from the large texture is moved a
> pixel or two over from where it should be.  So instead of just getting
> my cards picture, I get the right edge of the card next to it and my
> card.  Is this normal.

> This is very hard to explain via typing, I hope it makes sense.

> Thanks for any help.



Sun, 26 Dec 2004 07:30:49 GMT  
 Problem with textures not working the same form one machine to another...

Quote:
> using the debug runtime? does the debutg runtime output contain any info?

> any HRESULTS indicating problems?

> some cards do have pixel centering issues, this is discussed in the docs.
> see "Directly Mapping Texels to Pixels". also IHVs have documents on this,
> specifically I think nVidia has something on their developer web site.

> --

> Phil Taylor
> PM : DirectX SDK, Managed DirectX, Windows XP Inbox 3D screensavers, and a
> few more bits and bobs.
> http://msdn.microsoft.com/directx
> This posting is provided "AS IS" with no warranties, and confers no rights.


> > I was trying to write a simple card game.  I loaded a large texture in
> > that is a GIF of all the cards.  Then I use a TLVertex to put the card
> > images on sprites (actually 2 polygons to form a rectangle).  On my PC
> > at home, this work just fine, on my PC at work, the cards look
> > scrunched or something.  I do not know why...  Can anyone help?  Both
> > of the PC's are running Win XP.

> > Also, I notice, when I draw my textures on my polygons, the small
> > portion of the texture I am taking from the large texture is moved a
> > pixel or two over from where it should be.  So instead of just getting
> > my cards picture, I get the right edge of the card next to it and my
> > card.  Is this normal.

> > This is very hard to explain via typing, I hope it makes sense.

> > Thanks for any help.

Thanks for the reply.

After posting this question, I did some more research finding a couple
sites posted here in this newsgroup.  I did not know that textures
needed to be powers of 2 in size to solve problems with some video
cards.

Also, on Patrice Scribe's web site I found the samples on using the
D3DSprite which simplifies everything I was trying to do.  Originally,
I was trying to use two plygons together as in the donuts sample.  But
the D3DSprite is so much easier I am switching my program over to it.
It solves a lot of the problems I was having and simplifies a lot of
the math I needed to do to rotate my sprites.



Mon, 27 Dec 2004 00:32:19 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Macro Works One Machine Not Another

2. Vb6 and Word working fine on one machine but not on other

3. Vb6 and Word working fine on one machine but not on other

4. Problem for only one user, every one else works fine

5. Error 3071...Why on one machine and not on others

6. V7 Access code runs on one machine and not another

7. Progam runs on one machine, not on another

8. Excel file opened in IE3 - on one machine starts Excel, others does not

9. Simple Date SQL Errors on One Machine but not all the rest

10. Problems when looping through controls on form object, works in vb5 not vb6

11. TSISoon still not working on XP - other machines...

12. Eval() Works In 1 mdb (same machine) but not 2nd mdb

 

 
Powered by phpBB® Forum Software