Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Two Simple? OpenGL Questions

This topic is 6003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

G''day all, I''m a little bit stumped at the moment, I would like to have my OpenGL window appear as a part of a dialog, can anyone help me with an example of this. Secondly, in the example of the rotating cube (texture example), I would like to change the cube to have a different image on each side, am I restricted to Textures or is there a way I can load in a bigger bitmap? Any assistance would be greatly appreciated. Best regards Andrew

Share this post

Link to post
Share on other sites
Yea, that pretty simple.

You can use:

HWND GetDlgItem(
HWND hDlg, // handle of dialog box

int nIDDlgItem // identifier of control


to get the handle to the dialog control. Then, you just setup the pixel format like you would a regular window.

Now for the cube, you can load textures larger than 256x256. I'm not sure what limits OpenGl puts on the size of texture, except for due to available memory and that the texture must be a power of 2. You can use 'gluBuild2DMipmaps(...)' though, to convert an image that has dimentions that arn't a power of 2.
I don't know what you are trying to do, but if you are just wanting to texture the cube with a different image on each side, you could combine six texture into one large one and then just map the cube side with the respected region of the texutre.

Take care,


Edited by - Nyko on January 16, 2002 9:41:49 AM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!