Penguin openGL example Topic is solved

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Penguin openGL example

Post by tbreina » Sun May 13, 2012 8:12 pm

I've been able to get the openGL "penguin" example working. However, I'd like to replace the trackball code with wxWidgets mouse events or possibly even glut mouse events in order to rotate and translate the openGL penguin.

Has anyone written this code or have an example to follow?

Also, is there any conflict with using both GLUT and wxWidgets since they both have event handlers? I've seen some discussion about not needing GLUT if you are already using wxGLCanvas. Any opinions?

Thanks.
-Tony
Everybody's got something to hide except for me and my monkey.

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: Penguin openGL example

Post by Auria » Sun May 13, 2012 10:10 pm

I'm not sure I understand why you mention GLUT; wxWidgets can provide all mouse movement events you may need. The reason why GLUT is used in a few wiki examples is more because it offers a free 3D teapot model, and also OpenGL string rendering. For mouse events it does nothing wx can't do, and I would avoid mixing them especially if for mouse
"Keyboard not detected. Press F1 to continue"
-- Windows

tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Re: Penguin openGL example

Post by tbreina » Mon May 14, 2012 1:38 pm

Auria wrote:I'm not sure I understand why you mention GLUT; wxWidgets can provide all mouse movement events you may need. The reason why GLUT is used in a few wiki examples is more because it offers a free 3D teapot model, and also OpenGL string rendering. For mouse events it does nothing wx can't do, and I would avoid mixing them especially if for mouse
Ok. That's what I wanted to make sure of. The Penguin example uses trackball.c to handle the mouse movements (as if they were a trackball). I was confused why it didn't use the wxWidgets mouse events instead. I thought there might have been some problem with handling mouse movements between wxWidgets and openGL that necessitated the use of the trackball code.

-Tony
Everybody's got something to hide except for me and my monkey.

Post Reply