Starting OpenGL in a dialog

Download project files 1420KB

This is the smallest example to make :

  • Antialiasing
  • Gouraud
  • Texture mapping
  • Texture lighting
  • Texture transparency
This sample create an OpenGL rendering context in a dialog box and draw a simple cube. We can manipulate the object with the mouse, and change texture file with a popup menu item. A timer animate a rotation. Texture files are .BMP files (2^n * 2^m * 24 bits).







  • How to do Antialiasing when using GL_FILL mode?

    Posted by Legacy on 09/16/2003 12:00am

    Originally posted by: Wu Feng

    When I set glPolygonMode to GL_LINE,
    the effect of antialiasing using GL_LINE_SMOOTH is fine,
    have no effect when using GL_FILL in polygonmode,
    can some body help me?

  • Cool Effect

    Posted by Legacy on 08/09/2003 12:00am

    Originally posted by: Saqib Mehmood

    Very Good

  • How do we get the 3D coordinate

    Posted by Legacy on 06/05/2003 12:00am

    Originally posted by: Ben


    can some help me , how do we get the 3D coordinate(i mean coordinate in my room), if we know the screen coordinate ?

    cheers ,

  • Removal of Clipping Portion

    Posted by Legacy on 06/04/2003 12:00am

    Originally posted by: Sanjay Bora

    How to delete the portion of OpenGL image which falls out of viewport ?


  • display bitmap & plot lines on it using opengl & mfc

    Posted by Legacy on 02/18/2003 12:00am

    Originally posted by: Sai

    Please do help me out. How do I display a bmp file into VC++ mfc dialog box & then draw something on it?
    Any response will be greatly appreciated.

  • adding 3d models (ms3d) to the dialog canvas

    Posted by Legacy on 01/04/2003 12:00am

    Originally posted by: Dave Butler

    Does anyone know how I would be able to load in 3d models in say milkshape ms3d format to such a opengl enabled dialog box?

  • Dialog in SDI application

    Posted by Legacy on 12/17/2002 12:00am

    Originally posted by: marcowomad

    I'm working with a SDI application that show a dialog box in wich I use OpenGL. I have no problem to execute the program and it works OK, but if I execute it in debug mode, sometimes (and only sometimes) I get a message box that says

    "User breakpoint called from code",

    and in the Output Window is written

    "HEAP[Dialogo.exe]: Invalid Address specified to RtlFreeHeap( 00140000, 001BD090 )",

    but this doesn't crash the program. I don't if this causes memory leaks or something like that. Does somebody know what is this an why does occurs? I think is a problem with the rendering context.

    Note: In the MDI example application in this web occurs the same

  • need help regarding opengl in dialog based

    Posted by Legacy on 10/01/2002 12:00am

    Originally posted by: sunil

    my application has dialog based menu.
    I want the graphics to be shown when the user clicks on the MenuItem provied in the menu.
    Can anyone please tell me how to go about it and also the code for it.

  • Need Runtime environement for OpenGL programming under Microsoft Windows?

    Posted by Legacy on 09/13/2002 12:00am

    Originally posted by: K_Aziz1

    Need Runtime environement for OpenGL programming under Microsoft Windows?

  • Resize

    Posted by Legacy on 08/21/2002 12:00am

    Originally posted by: sim

    When window size is increased, the article size also is increased.
    But when window size is decreased, the article size is not decreased(in non-rotating mode).
    How can I change article size to increase or decrease.

  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Moving from an on-premises environment to Office 365 does not remove the need to plan for disruptions or reduce the business risk requirements for protecting email services. If anything, some risks increase with a move to the cloud. Read how to ease the transition every business faces if considering or already migrating to cloud email. This white paper discusses: Setting expectations when migrating to Office 365 Understanding the implications of relying solely on Exchange Online security Necessary archiving …

  • On-demand Event Event Date: September 23, 2015 The cloud is not just about a runtime platform for your projects – now, you can do your development in the cloud, too. Check out this webcast to learn how the cloud improves your development experience and team collaboration. Join Dana Singleterry, Principal Product Manager for Oracle Dev Tools, as he discusses how to simplify every aspect of the development lifecycle, including requirements gathering, version management, code reviews, build automation, and …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date