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).
 
 

 

 

 

 

 


Comments

  • 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,
    but seems both GL_LINE_SMOOTH AND GL_POLYGON_SMOOTH
    have no effect when using GL_FILL in polygonmode,
    can some body help me?

    Reply
  • Cool Effect

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

    Originally posted by: Saqib Mehmood

    Very Good

    Reply
  • How do we get the 3D coordinate

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

    Originally posted by: Ben

    Hi,

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

    cheers ,
    ben

    Reply
  • 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 ?


    Thanks,
    Sanjay

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

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

    Originally posted by: Sai

    Hello,
    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.

    Reply
  • 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?

    Reply
  • 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

    Reply
  • 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.

    Reply
  • 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?

    Reply
  • 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.

    Reply
  • Loading, Please Wait ...

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

Top White Papers and Webcasts

  • Savvy enterprises are discovering that the cloud holds the power to transform IT processes and support business objectives. IT departments can use the cloud to redefine the continuum of development and operations—a process that is becoming known as DevOps. Download the Executive Brief DevOps: Why IT Operations Managers Should Care About the Cloud—prepared by Frost & Sullivan and sponsored by IBM—to learn how IBM SmartCloud Application services provide a robust platform that streamlines …

  • Protecting business operations means shifting the priorities around availability from disaster recovery to business continuity. Enterprises are shifting their focus from recovery from a disaster to preventing the disaster in the first place. With this change in mindset, disaster recovery is no longer the first line of defense; the organizations with a smarter business continuity practice are less impacted when disasters strike. This SmartSelect will provide insight to help guide your enterprise toward better …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds