#include
in my usr/include is a dir called GL and inside a file called glut.h
#include <GL/glut.h>
apparently directory and file doesnt exist? What Am I doing wrong?
under linux, filenames and directories are case sensitives and i think it's <gl/glut.h> (lower case)
Matt
[edited by - lemurion on October 21, 2003 3:34:22 PM]
Matt
[edited by - lemurion on October 21, 2003 3:34:22 PM]
Can anyone please help me on understanding this topic further
http://www.brucemo.com/compchess/programming/0x88.htm the topic especially the 0x88 part i don''t get correctly i wonder if this is a zero by 88 or what can anyone explain this futher. peace.
http://www.brucemo.com/compchess/programming/0x88.htm the topic especially the 0x88 part i don''t get correctly i wonder if this is a zero by 88 or what can anyone explain this futher. peace.
"The name that seems to have stuck is "0x88", which is means hexidecimal 88.
The reason it''s called 0x88 is that this constant is critical in the implementation of the scheme."
there just read the text.
Lazzar
The reason it''s called 0x88 is that this constant is critical in the implementation of the scheme."
there just read the text.
Lazzar
0x88 hex
= ( 16^1 * 8 ) + ( 16^0 * 8 )
= 136 dec
= 1000 1000 bin
Not "zero by 88"
[My site|SGI STL|Bjarne FAQ|C++ FAQ Lite|MSDN|Jargon]
Ripped off from various people
[edited by - wild_pointer on October 22, 2003 3:47:54 PM]
= ( 16^1 * 8 ) + ( 16^0 * 8 )
= 136 dec
= 1000 1000 bin
Not "zero by 88"
[My site|SGI STL|Bjarne FAQ|C++ FAQ Lite|MSDN|Jargon]
Ripped off from various people
[edited by - wild_pointer on October 22, 2003 3:47:54 PM]
Ive figured out why now, its none of the above, its that I need gl.h and glu.h to run glut.h
Thanks for helping me anyway
Now where to find gl.h and glu.h ... doesnt seem to turn up on google .... ;-)
Thanks for helping me anyway
Now where to find gl.h and glu.h ... doesnt seem to turn up on google .... ;-)
quote:Original post by Anonymous Poster
Ive figured out why now, its none of the above, its that I need gl.h and glu.h to run glut.h
Thanks for helping me anyway
Now where to find gl.h and glu.h ... doesnt seem to turn up on google .... ;-)
Are you using Dev-C++? Those 2 files tend to be included with most C/C++ IDEs.
First make it work,
then make it fast.
--Brian Kernighan
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities. We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
Do not interrupt your enemy when he is making a mistake. - Napolean Bonaparte
= ( 16^1 * 8 ) + ( 16^0 + 8 )
= 136 dec
= 1000 1000 bin
Not "zero by 88"
okay Wild pointer i see this clearly now, tell me can the C compiler going to be able to recognise a code
(!(index & 0x40))
You can explain this code to me in lay man''s term''s if you understand further bcoz am having great difficulty understanding it am an average C programmer though.
= 136 dec
= 1000 1000 bin
Not "zero by 88"
okay Wild pointer i see this clearly now, tell me can the C compiler going to be able to recognise a code
(!(index & 0x40))
You can explain this code to me in lay man''s term''s if you understand further bcoz am having great difficulty understanding it am an average C programmer though.
quote:Original post by Anonymous Poster
okay Wild pointer i see this clearly now, tell me can the C compiler going to be able to recognise a code
(!(index & 0x40))
You can explain this code to me in lay man's term's if you understand further bcoz am having great difficulty understanding it am an average C programmer though.
First, you have to understand how differently-based number systems work. I'll assume you know the basics, and just say, whenever you see a number starting with "0x", you know it's in base-16, also known as hexadecimal.
As you might know, the '&' performs a bitwise AND (the logical operator, not the conjunction) between two numbers. You have to understand how Boolean logic and binary work. I'll let you research what you don't know on your own, but as an example,
0x40 (base-16, hex) = 64 (base-10, dec) = 00100000 (base-2, binary)
Let's say we had two constants, 0x40 (the same as above) and 0x10 that represent BLUE and SQUARE, respectively.
index might be a bitfield representing properties of a shape, and we want to make a shape that's both blue and square, so we'd say
index = 0x10 | 0x40;
This logically combines the values 0x10 and 0x40 to produce one number. In binary:
01000000 |
00010000
---------
01010000 = 80 (dec)
Then, when we're building our shape according to index, we might have a test that looks something like what you're asking about (yes, we're getting to the actual explanation!):
if(index & 0x40)
// the shape is square, so do something about it
The same operation is performed (logical AND):
01010000 &
01000000 =
--------
01000000
Since if is boolean, it sees the resulting value as a logical "true", because it is not 0. Therefore, as we desire, the if statement will trigger if the index variable contains the bit pattern in 0x40.
Oi. edit: thanks to Thunder_Hawk for pointing out the logical operator typos.
Later,
ZE.
//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[edited by - zealouselixir on October 22, 2003 6:34:38 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement