Masking to show player color....problem.

Started by
-1 comments, last by spriteguru 17 years, 3 months ago
OpenGL,Ortho,2D game: Ok i have these units in my 2d game i want to display using various player colors.However the unit image is just 1 image.The pixels where player color should appear are known/marked out by a specific color.The unit image is displayed as a textured quad. I want to use only the unit image & say some mask to display any player color in the unit image. So i thought the mask could be white only where player color should be present(black otherwise) & of same dimension as the unit image. Now if i multiply a texture of dimensions=unit image but color=player color with mask, i will get a black image with the player color present in the exact positions i want them in the unit image. Now how to superimpose this image on the unit image to get the player colors there as well?. Anyone has a better idea on how to do this whole thing? i want masks of 1 bit depth only.How to store such masks in video memory so they occupy 1 bit depth only...textures have to be 8bpp at least i think

This topic is closed to new replies.

Advertisement