[ Buffy @ 22.05.2005. 11:22 ] @
Radim u OpenGL.
Da li u OpenGL postoji funkcija kojom se mjenja smjer z ose,tj. da se + prostire u
dubinu ekrana.
Hvala unaprijed!
[ speciebsp @ 22.05.2005. 11:50 ] @
Pozdrav,

Ja radim u Dx-u pa sam operisan od toga, ali na www.opengl.org stranici u odjeljku FAQ stoji ovo:

====================================================
9.150 Can I make OpenGL use a left-handed coordinate space?

OpenGL doesn't have a mode switch to change from right- to left-handed coordinates. However, you can easily obtain a left-handed coordinate system by multiplying a negative Z scale onto the ModelView matrix. For example:

glMatrixMode (GL_MODELVIEW);

glLoadIdentity ();

glScalef (1., 1., -1.);

/* multiply view transforms as usual... */

/* multiply model transforms as usual... */

====================================================

http://www.opengl.org/resources/faq/technical/transformations.htm

Nadam se da ce ti pomoci... ako ne, onda idi na njihov page pa vidi sta se moze uraditi povodom toga...

cy
[ Buffy @ 22.05.2005. 12:30 ] @
Hvala!
[ alexione @ 23.05.2005. 00:54 ] @
Pretpostavljam da treba da obratis paznju i na redosled tacaka u trouglovima, evo sta o tome kaze DirectX dokumentacija:

-------------------------------------------------------------------------------
Microsoft® Direct3D® uses a left-handed coordinate system. If you are porting an application that is based on a right-handed coordinate system, you must make two changes to the data passed to Direct3D.

- Flip the order of triangle vertices so that the system traverses them clockwise from the front. In other words, if the vertices are v0, v1, v2, pass them to Direct3D as v0, v2, v1.

- Use the view matrix to scale world space by -1 in the z-direction. To do this, flip the sign of the _31, _32, _33, and _34 member of the D3DMATRIX structure that you use for your view matrix.