   confused with opengl direction vectors
  Hi guys. I'm a programmer trying to learn opengl. But some basic concept is confusing me. For example, let's take this command...GLfloat spot_direction[] = { -1.0, -1.0, 0.0 };glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, spot_direction);That is a command that I copied from the "opengl red book". They say, that spot_direction parameter passed to the glLight*() will tell opengl the direction of the spot light. When I try to imagine it, spot_light direction is just one point in the x, y, z, w plane. And I'm wondering how a single point can be used as a direction. I feel like I can use that point and say "it is pointing to a zillion directions".Anywayz, I was getting confused by the so called direction vectors and sort of things. They give x, y, z points and say it is pointing "this way". I would appreciate any explanation ...Thanks in advance   
  Besides the fact that those light stuff is deprecated anyway ...A spot light knows of a hard angular limitation named "spot cutoff":Quote:from manpageGL_SPOT_DIRECTIONparams contains three integer or floating-point values that specify the  direction  of  the light in homogeneous object coordinates.  Both integer and floating-point values are mapped directly.  Neither integer nor floating-point  values are clamped.The  spot  direction is transformed by the inverse of the modelview matrix when glLight is called (just as if it were a normal), and it is stored in eye  coordinates.   It  is  significant only when GL_SPOT_CUTOFF is not 180, which it is initially.  The initial direction is (0, 0, -1).And later:Quote:from manpageGL_SPOT_CUTOFFparams  is  a single integer or floating-point value that specifies the maximum spread angle of a light source.  Integer and floating-point values  are  mapped directly.   Only  values  in  the  range  [0,90]  and the special value 180 are accepted.  If the angle between the direction of the light  and  the  direction from  the  light  to  the  vertex being lighted is greater than the spot cutoff angle, the light is completely masked.  ...Hence radiation isn't ever homogeneous and hence a direction is needed in some cases.   ;  It's the Point vs Vector thing. {-1.0, -1.0, 0.0} is interpeted as a vector, starting at {0, 0, 0} and ending at {-1.0, -1.0, 0.0}, which gives you a direction.   ;  As HuntsMan said, it is a basic concept: a point defines a direction if you take the vector from <0,0,0> to that point.I would suggest reading about vector & matrix algebra, the concept of "space" or "basis" and rotation/translation/scale order importance before using OpenGL because if you don´t, you´ll be soon doing things that you don´t fully understand. And debugging code that you can´t understand is a pain in the ass.   