rayzor

diff src/m3dimpl.h @ 6:a68dbf80d547

finally showing something ... :)
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 07 Apr 2014 06:04:11 +0300
parents 5fcf72837b69
children 70e332156d02
line diff
     1.1 --- a/src/m3dimpl.h	Sun Apr 06 02:43:24 2014 +0300
     1.2 +++ b/src/m3dimpl.h	Mon Apr 07 06:04:11 2014 +0300
     1.3 @@ -17,24 +17,35 @@
     1.4  	float tex[2];
     1.5  };
     1.6  
     1.7 +#define IM_VBSIZE	4
     1.8 +
     1.9  struct min3d_context {
    1.10  	struct m3d_image *cbuf;
    1.11  	uint16_t *zbuf;
    1.12  
    1.13  	unsigned long state;
    1.14 +	int clear_color[3];
    1.15  
    1.16  	int mmode;	/* matrix mode */
    1.17  	struct min3d_mstack mstack[2];
    1.18  
    1.19 -	const float *vert_array;
    1.20 -	const float *norm_array;
    1.21 -	const float *col_array;
    1.22 -	const float *tc_array;
    1.23 +	int vport[4];
    1.24 +
    1.25 +	float *vert_array;
    1.26 +	float *norm_array;
    1.27 +	float *col_array;
    1.28 +	float *tc_array;
    1.29  
    1.30  	/* immediate mode state */
    1.31 -	float cur_color[4];
    1.32 -	float cur_normal[3];
    1.33 -	float cur_texcoord[2];
    1.34 +	float im_varr[IM_VBSIZE * 3];
    1.35 +	float im_narr[IM_VBSIZE * 3];
    1.36 +	float im_carr[IM_VBSIZE * 3];
    1.37 +	float im_tarr[IM_VBSIZE * 2];
    1.38 +
    1.39 +	int im_prim, im_idx;
    1.40 +	float im_color[4];
    1.41 +	float im_normal[3];
    1.42 +	float im_texcoord[2];
    1.43  };
    1.44  
    1.45  extern struct min3d_context *m3dctx;