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

  • On-demand Event Event Date: September 10, 2014 Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild." This loop of continuous delivery and continuous feedback is how the best mobile …

  • Not all enterprise applications are created equal. Sophisticated applications need developer support but other more basic apps do not. With the right tools, everyone is a potential app developer with ideas and a perspective to share. Trends such as low-code development and model driven development are fundamentally changing how and who creates applications. Is your organization ready? Read this report and learn: The seven personas of enterprise app delivery How application ownership is spreading to the …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds