View Full Version : Transformations Without Using OpenGL

SuperNoob

10-17-2009, 04:54 PM

I'm having trouble starting out this program that deals with transformations. Even though opengl is able to do transformations for you, I am required to do this by developing another class and "manually" computing the transformations within my application. I have no idea where to start or even how to do this. I was wondering if somebody could point me in the right direction (Not give me the answer) and help get me started with this. :eek:

marshats

10-17-2009, 08:03 PM

Maybe looking at the Redbook Appendix: Homogeneous Cooridinates and Transformation Matrices (http://glprogramming.com/red/appendixf.html) will give you an idea of how to start. Some other sites worth looking at are OpenGL Transformations (http://www.songho.ca/opengl/gl_transform.html#matrix) or openGL Maths (http://www.euclideanspace.com/maths/geometry/affine/matrix4x4/index.htm). These show you the math behind what openGL is doing.

Basically, you need to generate 4x4 matrices for each of the operations; translate, scale, lookat, perspective, etc. And simply multiply them successively (just as openGL<3 does for you) to build a final 4x4 matrix that represents your desired transformation. There is no reason you couldn't build your own code that does the same math.

Ilian Dinev

10-18-2009, 12:13 PM

After you understand the transforms marshats pointed you to, you'll need plug-and-play code base to start from, unless you want to retype it all manually. Many maths-libs exist, among them the best probably are nv_math (from nvidia SDK) and GLM (GL-maths).

I'm using a modified and extended nv_math like this:

http://dl.getdropbox.com/u/1969613/openglForum/ILXMath.h

http://dl.getdropbox.com/u/1969613/openglForum/ILXMath.cpp

SuperNoob

10-18-2009, 06:38 PM

Thanks!

I understand the transformations more clearly.

Ilian Dinev, is there a plug and play code for java. I searched but was unsuccessful in finding one.

Ilian Dinev

10-18-2009, 08:04 PM

I don't know, I use Java only for mobiles and there I port the few C++ func I need.

Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.