add 2-pass support for models

This commit is contained in:
Chris Danford
2004-01-28 08:53:40 +00:00
parent b6b982b4b8
commit 68ff50636d
4 changed files with 77 additions and 22 deletions
+23 -2
View File
@@ -81,6 +81,7 @@ typedef struct msMesh
/* msMaterial */
class RageTexture;
// merge this into Sprite?
struct AnimatedTexture
{
AnimatedTexture();
@@ -118,8 +119,28 @@ typedef struct msMaterial
char szDiffuseTexture[MS_MAX_PATH];
char szAlphaTexture[MS_MAX_PATH]; // not used in SM. Use alpha in diffuse texture instead
int nName; // not used in SM. What is this for anyway?
AnimatedTexture aniTexture;
bool bSphereMapped; // true of "sphere" appears in the material name
struct Texture
{
Texture()
{
bSphereMapped = false;
blendMode = BLEND_NORMAL;
}
void Load( CString sFile )
{
ani.Load( sFile );
bSphereMapped = sFile.Find("sphere") != -1;
if( sFile.Find("add") != -1 )
blendMode = BLEND_ADD;
else
blendMode = BLEND_NORMAL;
};
AnimatedTexture ani;
bool bSphereMapped; // true of "sphere" appears in the material name
BlendMode blendMode;
} diffuse, alpha;
} msMaterial;
/* msPositionKey */