How to draw a region of a texture/bitmap in C++? -
i'm making minimap/radar game (gta iv), , i'm wondering how hide or remove parts/pixels of map texture outside of square map area. function run every frame, i'm looking efficient way this, preferably lightweight library or directx.
what i've thought of far "manually" checking coordinates of each pixel, or each line of pixels in texture , see if it's outside radar area, imagine take quite lot of resources 4 512*512 textures every frame.
how can in efficient way? thanks, , sorry if has been posted million times, haven't found isn't standard image editing related.
if understand properly, want remove pixels map based on current location , actual map. why not use transparency? basically, fill pixel data on cpu (in game code) , update texture on video card. better if map doesn't change, can in big texture first , load on gpu (or manually) , change texture coordinates display portion interest you.
Comments
Post a Comment