Suggest an online tutorial please

Hi all,

The NeHe tutorials are excellent but don’t seem to cover something I need. I am programming a small game which will have control panel along one side with dice, etc. and a green quad as the play area.

Does anyone know of a good tutorial on having seperate panels like this or do I make a couple of quads and attach events to them?

Thanks in advance.

Patrick

www.gametutorials.net, they have a nice set of opengl tutorials, I’m not sure about the panel part though, I am having trouble finding good tutorials on 2D in opengl, I’m sure you could use several quads as your panel, the site I gave you has a good tutorial for selecting objects in 3d space, you could probily adapt that code to your program

On my website, daltxcoltsfan.tripod.com, I have a city demo that makes use of combining 2D mode and 3D mode that includes putting a quad on the screen in 2D, but I think the actual rendering of the quad is commented out.

Basically, to combine the 2D and 3D you have to make a call to glProjection or whatever that is to do your 3D rendering, then make a call to glOrtho to do your 2D rendering. The only real complication comes from the depth coordinates. Believe it or not, you still use the Z coordinate in 2D, and if you don’t disable depth testing your 2D work could appear behind the 3D. You can even use blending and transparency with the 2D.

If you want to look at my code, the relevant routines are Render() and DoOrthoModeRendering(). Once you understand the basics you can get what you want by experimenting.

Also, I recommend NeHe’s tutorial on Masking - that will help you not have your ortho stuff be all rectangular.

Hope this helps.

Hi,

That sound like you want to create a tool to play the 3D object. I suggest you use MFC to create your OpenGL rendering and you can add the control panel stuff in your system at the same time.

Try to get a simple example to render OpenGL in MFC. The link is as below:
http://myopendemo.hypermart.net/MFC.htm

You can create multiple viewports in a single window, one view port to be use as a control panel the other the play field. nehe.gamedev.net goes over this on tutor #42

Also you can just draw your panel with a textured quad. and when the mouse is over that area of the screen use it for selection of control items.

Originally posted by pkirk:
[b]Hi all,

The NeHe tutorials are excellent but don’t seem to cover something I need. I am programming a small game which will have control panel along one side with dice, etc. and a green quad as the play area.

Does anyone know of a good tutorial on having seperate panels like this or do I make a couple of quads and attach events to them?

Thanks in advance.

Patrick[/b]

There’s a lot of reading there! Many thanks guys.