deepstone

diff src/mglimpl.h @ 3:0e781cc43178

adding textures
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 21 Nov 2011 10:16:09 +0200
parents f04884489bad
children bce78aaafc68
line diff
     1.1 --- a/src/mglimpl.h	Mon Nov 21 10:15:37 2011 +0200
     1.2 +++ b/src/mglimpl.h	Mon Nov 21 10:16:09 2011 +0200
     1.3 @@ -45,6 +45,13 @@
     1.4  	int cidx;
     1.5  };
     1.6  
     1.7 +struct texture {
     1.8 +	int width, height;
     1.9 +	int xshift, yshift;
    1.10 +	unsigned int xmask, ymask;
    1.11 +	unsigned char *pixels;
    1.12 +};
    1.13 +
    1.14  struct state {
    1.15  	unsigned int flags;
    1.16  	int ord, frontface, cullface;
    1.17 @@ -57,6 +64,8 @@
    1.18  	int col_range;	/* color interpolation range */
    1.19  	vec3_t ldir[MAX_LIGHTS];
    1.20  	float lint[MAX_LIGHTS];
    1.21 +
    1.22 +	struct texture tex;
    1.23  };
    1.24  
    1.25  struct framebuffer {
    1.26 @@ -65,6 +74,7 @@
    1.27  	unsigned short **zbuf;	/* zbuffer broken in 64k tiles */
    1.28  };
    1.29  
    1.30 +
    1.31  int mgl_rast_init(struct state *state, struct framebuffer *fbuf);
    1.32  void mgl_rast_cleanup(void);
    1.33  void mgl_rast_prepare(void);