switching from textured to non textured polys

switching from textured to non textured polys

Post by Z2FtZU1ha2 » Wed, 16 Feb 2005 01:37:03


First, I am drawing a textured polygon and then second a non textured
polygon. I got them both working if I just use textures. But, I can't seem
to get the second one to appear when I use a non textured poly.

I changed the vertex format to;

struct non_textured_vertex_alpha
{
float x, y, z;
DWORD dwColor;
};

#define NON_TEXTURED_VERTEX_ALPHA_FVF (D3DFVF_XYZ | D3DFVF_DIFFUSE)

And I changed everywhere to reference this vertex structure. And I don't do
any of the texure setup when using this.

My question is: Do I need to specifically turn off the texturing with
SetTextureStageState? Do I need to turn off anything else to get it to work?
In general, do the texture and render states reset after rendering, or do
they stay the same until I change them myself?
 
 
 

switching from textured to non textured polys

Post by Z2FtZU1ha2 » Wed, 16 Feb 2005 02:47:04

OK, I found my problem(s).

But, I still wonder if the render and texture states reset to defaults after
endScene is called?

 
 
 

switching from textured to non textured polys

Post by Phil Taylo » Wed, 16 Feb 2005 02:59:41

no.

thats why some of the samples can set state in the restore device objects
method and have it persist.