]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.h
reorganized shader rendering calls to process the whole surface chain multiple times...
[xonotic/darkplaces.git] / model_brush.h
index 21c6a7ee7ef15929e4e98753887fc089c177dccb..efea50caeef5f7cff288c46385b37167867b3758 100644 (file)
@@ -141,11 +141,11 @@ typedef struct msurface_s
        texture_t       *currenttexture; // updated (animated) during early surface processing each frame
 
        // index into d_lightstylevalue array, 255 means not used (black)
-       byte            styles[MAXLIGHTMAPS];
+       qbyte           styles[MAXLIGHTMAPS];
        // RGB lighting data [numstyles][height][width][3]
-       byte            *samples;
+       qbyte           *samples;
        // stain to apply on lightmap (soot/dirt/blood/whatever)
-       byte            *stainsamples;
+       qbyte           *stainsamples;
 
        // these fields are generated during model loading
        // the lightmap texture fragment to use on the surface
@@ -176,7 +176,7 @@ typedef struct msurface_s
        unsigned short cached_light[MAXLIGHTMAPS];
        // if lightmap was lit by dynamic lights, force update on next frame
        short           cached_dlight;
-       // to cause lightmap to be rerendered when lighthalf changes
+       // to cause lightmap to be rerendered when v_overbrightbits changes
        short           cached_lightscalebit;
        // rerender lightmaps when r_ambient changes
        float           cached_ambient;
@@ -191,7 +191,7 @@ msurface_t;
 // change this stuff when real shaders are added
 typedef struct Cshader_s
 {
-       int (*shaderfunc[SHADERSTAGE_COUNT])(int stage, msurface_t *s);
+       void (*shaderfunc[SHADERSTAGE_COUNT])(msurface_t *firstsurf);
        // list of surfaces using this shader (used during surface rendering)
        msurface_t *chain;
 }
@@ -246,11 +246,11 @@ typedef struct mleaf_s
        int                                     dlightbits[8];
        int                                     dlightframe;
 
-       byte                            *compressed_vis;
+       qbyte                           *compressed_vis;
 
        msurface_t                      **firstmarksurface;
        int                                     nummarksurfaces;
-       byte                            ambient_sound_level[NUM_AMBIENTS];
+       qbyte                           ambient_sound_level[NUM_AMBIENTS];
 }
 mleaf_t;