OpenGL -- void Display(void) function

In OpenGL, I'm working on a "picture cube" program that allows me to upload 6 images on a 3D cube.   With a previous version, I utilized XYZ axes to rotate the cube.   Now, I've started replacing the XYZ rotation via a (spinning) "trackball" version.

Both program "XYZ rotation" and "trackball" worked indepdently ok.   Now, having integrated the entire " spinning trackball code" into the "pictureCube" program, I have some trouble getting this to work.   More specifically, the void Display function seems to cause to problems.  

Particularly, the following 3 commands result in the following:  a) images don't show on the picture cube any longer, and b) once I comment out the glTranslate command, a blue cube appears.   Then, however, on mouse click, the cube completely disappears.

******************************************************************
glTranslatef(0.0, 0.0, viewxform_z);
...
...
...
glMultMatrixf((GLfloat *) objectXform);
terrainRotation();
******************************************************************

How do I modify the 3 lines below to utilize the spinning trackball functions in the picture cube program?
Pls see attached file for the full source code.

Thanks,
EEH
pictureCube.txt
ExpExchHelpAnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

trinitrotolueneDirector - Software EngineeringCommented:
you seem to be stopping redrawing on a mouse button down....??? what is the significance of this?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ExpExchHelpAnalystAuthor Commented:
trinitrotoluene:

I'm not sure what you're meaning by comment question.   Could you pls clarify?

Thanks,
EEH
0
ExpExchHelpAnalystAuthor Commented:
I figured out what the problem was... it seemed to be related to the reshape() function of the original trackball.

I'll award you the points anyway though.

EEH
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.