Hello, i'm using a different compiler which uses custom opengl functions for doing many different things, but i was having some trouble when printing out an rgb color map.

using a certain function:
Code:
void graphics_pixel(int iX,int iY, int iR,int iG,int iB);
which prints a pixel with the assigned color depth at the assigned x&y coordinates.

so far, i've gotten this:
Code:
for(r=0;r<=255;r++){
		for(g=0;g<=255;g++){
			for(b=0;b<=255;b++){
				graphics_pixel(x,y,r,g,b);
				y++;
				if(y==255){y=0;x++;}
				if(x==255)x=0;
			}
		}
	}
which does not exactly work,printing this yellow and red square thing, how would you go about writing this? sorry if i didn't describe anything enough, also how large do you think the max size would have to be?

thanks soo much in advance!

~Wiiplayer12