View Full Version : Window Controls In OpenGL?
03-22-2003, 09:23 PM
OK, I have been coding a game for the longest, and both the Linux server and Windoze client are ready for testing, but I need to figure out how to make controls while fullscreen in GL. The first thing that will happen after the player starts up the game and connects to a server will be the request for a username. How can I bring up a window with a title, some static text, an edit control, and two buttons while fullscreen? The parent window would still need to be able to process messages in case they take too long (3min or more) and the server drops them. I would also like to have this window made out of textures rather than a plain Windoze dialog or other default. I want the whole game to blend in. The result I am looking for is something like the login screen for Diablo or Diablo II when playing on Battle.Net. Thanks for the info!
[This message has been edited by Sephiroth (edited 03-22-2003).]
03-23-2003, 06:16 PM
Should I have posted this in the advanced forums? If so I'll go there. Just thought textured controls weren't advanced when compared to dynamic lighting (not the built-in way) and pixel-by-pixel drawing.
03-23-2003, 07:23 PM
Typically, those controls are created by the programmers that right the game engine. You would have to create you own GUI. There are tutorials/articles on that on www.gamedev.net (http://www.gamedev.net) .
03-24-2003, 05:43 AM
Ah, so it isn't just using the default functionality of Windows? I remember reading on how you could use bitmaps and such for controls like buttons and edits, and I thought that the effects were achieved this way. I'll look around, as I regular GameDev. Thanks for the info.
03-24-2003, 06:24 AM
You could use bitmaps too. I think you should also be able to use the windows buttons and stuff but that will be REALLY ugly and you don't want that. A bitmap by itself is only how the button would look. You still have to write the code for what happens when you click on it and how you would know if the user clicked on that bitmap. I think textured quads are better...that way you can have neat effects like buttons spinning, stretching, etc.
03-24-2003, 06:47 PM
Yep, already added "GUI.cpp" to my makefile and started coding it. It will contain functions to create 3D buttons, edit controls, and anything else I will need. You just call the desired function, specify what you want, and that's that.
03-25-2003, 12:07 PM
That sounds pretty good. That's basically all there is to it in terms of basic design. However, i'd urge you to go the object-oriented route. Well atleast that is my opinion.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.