Computer Science Canada spining a cube w/ lighting in C++ |
Author: | tupac [ Fri Nov 03, 2006 11:00 pm ] | ||
Post subject: | spining a cube w/ lighting in C++ | ||
k, so ive picked up again w/ openGL in c++ and learned some neat stuff i wana share w/ you. today i'm going to show you how to create a window in c++ using GLUT, plus i'm going to show you how to create a cube that will spin on an axis and be lit by lighting provided with the GLUT library. if you are using Dev-C++, download glut from here: http://www.nigels.com/glt/devpak/ click on: glut.3.7.6+.DevPak and install it. then open your Dev-C++, click on File->New->Project->Multimedia->glut. you will get a text file with stuff written on it, select it all and delete. type the following in:
Now this code should work, i can't tell if i missed some small detail because i'm writing from a library computer (its the only place i can use the internet from so far) and it doesnt have c++ on it, so i cant compile my prog and see if something is wrong with it. well, if somethings wrong w/ it just reply with any questions. |
Author: | wtd [ Fri Nov 03, 2006 11:06 pm ] | ||
Post subject: | |||
These are functionally identical. |
Author: | tupac [ Sat Nov 04, 2006 1:06 pm ] |
Post subject: | |
o... well iduno but for some reason Dev-C++ (may-b just mine) doesnt want to run "int main(int argc, char** argv)" but works when i put "int main(int argc, char *argv[])" ![]() but w/e i guess if it works then thats good ![]() |
Author: | wtd [ Sat Nov 04, 2006 1:36 pm ] |
Post subject: | |
It has been my experience, that Dev-C++ is a darn poor environment. Just use GCC straight up. |
Author: | Andy [ Mon Nov 06, 2006 3:40 am ] |
Post subject: | |
wow, ogl is so much nicer than d3d.. |