Tuesday, September 2, 2008

C++, GL, GLUT problems & solutions

how to use: glGetError()

AARGH!!! I can't believe I am so stupid! I kept having the window crashing on me. Now I know... I forgot:

glutPostRedisplay();

at the end of keybored function. And I've spent endless nights thinking about where I went wrong!

va_list

I am right now having some problem with va_list. So as I was searching on the compilation error, I chanced upon this thread:

Oh for ........s sake, pay attention!!!!
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044651050&id=1043284351

I used foo() because your crummy broken code didn't even have a function prototype in scope to even quote back at you. Just a bunch or random crappy lines of poorly indented code.

Sheesh!!!!!!!
no wait, that's not it
SHEESH!!!!!!!!!!!!!

A bit of advice, do not under any circumstances buy a gun. You're simply not equipped to cope with it's point and click interface. Trying stuff and then asking "what does this do" just isn't going to work.


And I thought I have bad temper. Haha.

Endianness in computer programming... I remember this... Ok! RECAP!


glutMouseFunc - wheel

Ok. Just as I thought. Mouse scroll with GLUT under MacOsX does not work. See here.
So I've decided to fore go the use of wheel and improvise with mouse x,y... Maybe I can use 2 buttons click for scale function.


GLUT README
.

GL_LINES for ground grid: There's no precedence for vertex if you're using GL_LINES. The vector drawn will still look the same either way.

No comments: