c# - Pixel Color does not always appear the same -


i have falling sand style game using 2 colors, black , cyan. setting colors of texture using texture.setdata<color>(colorarray);

the main program updates colors, when pixel leaves spot, color @ position set black, , new spot set cyan. however, can see in picture, cyan color not uniform through out (look closely @ bottom right, dark blue). occurring on windows phone emulator. @ first thought screen might updating fast colors projecting , leaving quickly, after stopping update method (to take following picture) colors remained same.

any ideas why happening?

there no shading (unless being done automatically , don't realize it). there only: colorarray[position] = black; , colorarray[newpos] = cyan;

http://i.imgur.com/sfjwetg.png

    protected override void draw(gametime gametime)     {         graphicsdevice.clear(color.black);          spritebatch.begin();          map.draw(spritebatch);         spritebatch.drawstring(spritefont, fps, vector2.zero, color.white);         spritebatch.end();          base.draw(gametime);     }      //map.draw()     public void draw(spritebatch sb)     {         sb.draw(pixels, vector2.zero, color.white);     }      public void update()     {            //this portion of update method           colors[currentpos] = getcolor(0);// returns color list           //some more updates not related texture           //blah           //blah blah           colors[currentpos] = getcolor(id);// returns color list           //at end of update loop           texture.setdata<color>(colors);                   } 


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -