Can i use this
I'm trying to put graphics on the screen but I want to do it dot by dot, in C
I know how in basic 'pset (5,5),2'
And i need to know how to use color in C to
In DOS you can use the graphics.h header which I remember has a putpixel function. You'll need to initialize graphics first.
In windows it's a whole other story, and you'd better look into APIs like SDL, DirectDraw, OpenGL, Direct3D.
In windows it's a whole other story, and you'd better look into APIs like SDL, DirectDraw, OpenGL, Direct3D.
Quote:Original post by Ilici
In DOS you can use the graphics.h header which I remember has a putpixel function. You'll need to initialize graphics first.
In windows it's a whole other story, and you'd better look into APIs like SDL, DirectDraw, OpenGL, Direct3D.
graphics.h isn't a standard header, so that may not be portable. If you're in real DOS mode you could allways look up "mode 13h" and other direct SVGA programming :-).
For pixel pushing, I'd recomend the SDL (http://libsdl.org/)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement