TexFace to Material Settings big patch
[blender.git] / source / gameengine / Rasterizer / RAS_IPolygonMaterial.h
index 2a5c6a179b61d41b02e51d2dfdff38090c93d025..69d07713c49044a2d27b2b645a09ef392f91110c 100644 (file)
@@ -49,6 +49,7 @@ struct Material;
 struct Image;
 struct Scene;
 class SCA_IScene;
+struct GameSettings;
 
 enum MaterialProps
 {
@@ -78,10 +79,11 @@ protected:
        STR_HashedString                m_materialname; //also needed for touchsensor  
        int                                             m_tile;
        int                                             m_tilexrep,m_tileyrep;
-       int                                             m_drawingmode;  // tface->mode
-       int                                             m_transp;
+       int                                             m_drawingmode;
+       int                                             m_alphablend;
        bool                                    m_alpha;
        bool                                    m_zsort;
+       bool                                    m_light;
        int                                             m_materialindex;
        
        unsigned int                    m_polymatid;
@@ -102,9 +104,9 @@ public:
        // care! these are taken from blender polygonflags, see file DNA_mesh_types.h for #define TF_BILLBOARD etc.
        enum MaterialFlags
        {
-               BILLBOARD_SCREENALIGNED = 256,
-               BILLBOARD_AXISALIGNED = 4096,
-               SHADOW                            =8192
+               BILLBOARD_SCREENALIGNED = 512,  /* GEMAT_HALO */
+               BILLBOARD_AXISALIGNED   = 1024, /* GEMAT_BILLBOARD */
+               SHADOW                  =2048   /* GEMAT_SHADOW */
        };
 
        RAS_IPolyMaterial();
@@ -114,7 +116,6 @@ public:
                                          int tile,
                                          int tilexrep,
                                          int tileyrep,
-                                         int mode,
                                          int transp,
                                          bool alpha,
                                          bool zsort);
@@ -124,10 +125,13 @@ public:
                                        int tile,
                                        int tilexrep,
                                        int tileyrep,
-                                       int mode,
                                        int transp,
                                        bool alpha,
-                                       bool zsort);
+                                       bool zsort,
+                                       bool light,
+                                       bool image,
+                                       struct GameSettings* game);
+
        virtual ~RAS_IPolyMaterial() {};
  
        /**
@@ -174,6 +178,11 @@ public:
 
        virtual void            Replace_IScene(SCA_IScene *val) {}; /* overridden by KX_BlenderMaterial */
 
+       /**
+       * @return the equivalent drawing mode for the material settings (equivalent to old TexFace tface->mode).
+       */
+       int                                     ConvertFaceMode(struct GameSettings *game, bool image) const;
+
        /*
         * PreCalculate texture gen
         */