TO create OpenGL/GLUT Project in code::block,at first you have to download the glut libary from this website http://code.google.com/p/rawvideoplayer/downloads/detail?name=glut-3.7.6-bin.zip&can=2&q= for windows.
Lets create GLUT project
first unzip the zip file
copy the glut.h file from the include folder of unzip file of step 1
and paste to the folder "C:\Program Files\CodeBlocks\MinGW\include\GL"
again copy all file from the lib folder of unzip file of step 1
and paste to the folder "C:\Program Files\CodeBlocks\MinGW\lib"
also copy the glut.dll file from the bin folder of unzip file and paste it
inside "C:\Windows\System32" floder.
Open the code block you will see window as below and click on create new
click on GLUT project as shown in image below
Enter project title name ,give path to save project and project file name is created by default from project title name.
After that click next.
now give the path "C:\Program Files\CodeBlocks\MinGW" for glut location
Then click next.
Now click finish
Finally project is created and you will get default main.cpp file and don't forget to write "#include<windows.h>" header file otherwise you will get error now built and run it will see window as below.
If you see the output of your program as above image then you have successfully
created a project.