View Full Version : How would i create a window in a game that uses opengl?
06-12-2002, 02:29 AM
I have this game and i would like to add effects to it but i need a menu within the game to create it. I have tried to find and look for tutorials on this but i cant find it nowhere. All i need to know is a whole .cpp file to do this action.
(action is to create a window to select more opengl items that i have created.(moving with arrow keys preferred) http://www.opengl.org/discussion_boards/ubb/smile.gif )
06-12-2002, 04:53 AM
There are GUI libraries available for use with OpenGL. However, I am assuming your application is `full-screen' and that therefore you cannot use ordinary GDI methods to generate a menu for you.
Its simply a case of drawing a menu (you can predefine it in a texture if you like) and handling the UP\DOWN keys.
06-12-2002, 06:05 AM
Simple version: each menu item is a texture ("draw" it in a paint program), each texture is drawn on a different position on the screen (e.g. top-down, ala Doom/Quake), using one quad per item. Moving cursors up/down selects a new menu item. Menu item selections could be highlighted using coloring and/or alpha blending.
The more "advanced" version would be very similar, but instead of predefined textures for each menu item, you can use a font-texture, drawing one quad per character on the screen. This way you can easily define the menu text in the program - it just require some more logic. Check out glFont - it may do the trick.
06-12-2002, 10:21 PM
what if i use the export "wglUseFontBitmapsW"
and "wglUseFontOutlines"? Im not sure to use these functions tho.im not familiar with very many opengl fuctions.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.