Warum 4 Dimensionen ?
-
n'Abnd !
Ich kapiere folgendes nicht :float p[4] = {0, 1, 0, 1}; glLightfv(GL_LIGHT0, GL_POSITION, p);
So was in der Art wird benötigt, um ein Licht zu positionieren. Schön und gut, aber warum muss die Positionsangabe 4-Dimensional sein ?
-
Dieses Problem kann der Poster IMHO selbst lösen. Unter Umständen ist dazu eines der folgenden Hilfsmittel zu nutzen:
- Dokumentation zur benutzen API
- google
- FAQ/Suche dieses Boards
- Debugger
- geringe Mengen GehirnschmalzDieses Posting wurde nicht automatisch generiert sondern per Hand eingefügt. Beschwerden werden trotzdem ignoriert.
Disclaimer: dies ist kein direkter persönlicher Angriff.
Bye, TGGC \-/
-
Ohne jetzt das ich mich mit OpenGL auskenne (mit DX kenne ich micht auch nicht aus), kann es sein das es was mit der Intensität des Lichts zu tun hat?
-
Such mal im Board danach. Warum 4 spalt- und zeilige Matrizen bzw. Vektoren wurde schonmal erklärt.
EDIT: Oops, das hat aber nix damit zu tun.
Allerdings - einmal kurz mit google (das ist eine Suchmaschine) gesucht:
GL_POSITION
params contains four integer or floating-point values that specify the position 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 position is transformed by the modelview matrix when glLight
is called (just as if it were a point), and it is stored in eye coordinates. If the
w
component of the position is 0, the light is treated as a directional source. Diffuse and
specular lighting calculations take the light's direction, but not its actual position, into account, and
attenuation is disabled. Otherwise, diffuse and specular lighting calculations are based on the actual
location of the light in eye coordinates, and attenuation is enabled. The initial position is (0, 0, 1, 0);
thus, the initial light source is directional, parallel to, and in the direction of the
-z
axis.
-
Hallo,
danke für die Antworten. Genau das hab ich gesucht...
mfg BlueShift
-
BlueShift schrieb:
Hallo,
danke für die Antworten. Genau das hab ich gesucht...
mfg BlueShiftBitte beehre diese Board bald wieder mit solchen Fragen, die in 5min über die Dokumentation gelöst werden können. Danke