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

  • Today's competitive marketplace requires the organization to frequently release and deploy applications at the pace of user demands, with reduced cost, risk, and increased quality. This book defines the basics of application release and deployment, and provides best practices for implementation with resources for a deeper dive. Inside you will find: The business and technical drivers behind automated application release and deployment. Evaluation guides for application release and deployment solutions. …

  • With JRebel, developers get to see their code changes immediately, fine-tune their code with incremental changes, debug, explore and deploy their code with ease (both locally and remotely), and ultimately spend more time coding instead of waiting for the dreaded application redeploy to finish. Every time a developer tests a code change it takes minutes to build and deploy the application. JRebel keeps the app server running at all times, so testing is instantaneous and interactive.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds