M O U S E

Hello, I am a beginner of OpenGL, I am doing a 3D interactive assignment now and I am wondering why there are some implementation I found using WinProc with a lot of set up, like hRC, hDC… but other kind of implementation using main without these initialization…
What is the difference between these two and which one should I use?
I have been surfing a dozen of web, and I am very frustrating as there are not too much tutorials on mouse
tracking(if there’s any, combined with other difficult features, makes it hard for the beginner ). Any one knows how to create a button with a text on it for user interaction.
3q 3q =)

I think You’ve found two different tutorials. One using GLUT or AUX
libraries (that one with main fuction working in the console env) and
the second that is using pure Win32.
Well if you want to make your app working in different env’s like
Linux,Win32 etc try to use Glut. Additionally Glut is a lot easier
(especially it is good for learning).
On the other hand if You want to use the whole advantages of Win32
(like making this button or trying to combine OpenGL with MFC) you
must use wgl fuctions.

Search in web for

wglCreateContext
wglMakeCurrent

CYa

Bonzaj

Also, If you are going to use Win32 controls on the same window as the where the scene is being rendered, you cannot have double buffering enabled.

  • Halcyon

3q 3q