You are not logged in.

#1 2009-06-29 21:52:17

steaky1212
Member

[RESOLVED] pixel draw question

Hi,

I have a 2 dimensional array ( grid[400][400] ), is it possible to draw to the screen a colour dependent on the value in that position....

ie

Code:

for(int x = 0; x<400; x++)
{
   for(int y = 0; y<400 ; y++)
   {
        PIXEL_COLOUR[x][y] = grid[x][y]
    }
}

or something like that?


thanks

Offline

 

#2 2009-06-29 22:13:13

Crayon
Bad Mother Fucker

Re: [RESOLVED] pixel draw question

To read, try using GRRLIB_GetPixelFromFB OR GRRLIB_Screen2Texture with GRRLIB_GetPixelFromtexImg.

To draw a pixel on the screen use GRRLIB_Plot.

Offline

 

Board footer

Powered by FluxBB