Well if you know a bit about pointers, and a bit about graphics coding in general then you should be able to have a go at doing some simple graphics stuff in C. That said by the sounds of things you may need to learn some more basic stuff first. You could try SDL, it would be simpler to get into than windows.h with open gl.
Heres a prog that draws a sinewave:
Code:
#include <SDL\SDL.h>
#include <math.h>
#define GRAPHICS_WIDTH 256
#define GRAPHICS_HEIGHT 256
#define BITDEPTH 32
#define DEG_TO_RAD 0.0174532925
SDL_Surface *screen = NULL; //This will be the screen buffer
void WritePixel(int x, int y, Uint32 col)
{
if(x < 0 || x >= GRAPHICS_WIDTH)
return;
if(y < 0 || y >= GRAPHICS_HEIGHT)
return;
Uint32 *pix;
pix=(Uint32*)screen->pixels+(x+y*GRAPHICS_WIDTH)*4;
*pix=col;
}
int main()
{
//First we set up the screen. If something goes wrong quit the prog.
if(SDL_Init(SDL_INIT_VIDEO) !=0)
return 1;
screen = SDL_SetVideoMode(GRAPHICS_WIDTH, GRAPHICS_HEIGHT, BITDEPTH, 0);
if(screen == NULL)
return 1;
//Draw a crude sine wave
int x;
for(x=0; x<GRAPHICS_WIDTH; x++)
WritePixel(x, (int)128+cos(x*DEG_TO_RAD)*100, 0xFFFFFFFF);
//The screen buffer needs to be flipped in order to display
if(SDL_Flip(screen)==-1)
return 1;
SDL_Delay(3000);
SDL_Quit();
return 0;
}
If you can get the SDL development files set up + create a project and link it. Then you can run this code and play around with writing pixels. Theres plenty of SDL tutorials around on the net.