Results 1 to 6 of 6

Thread: MFC &OpenGL

  1. #1
    Guest

    MFC &OpenGL

    hi
    I have OpenGL code that I have to insern to MFC project, how can I do that?
    Is there any Example that I work with?

  2. #2

    Re: MFC &OpenGL

    Try MFC & OpenGL at
    http://www.mfcogl.com/

  3. #3
    Member Newbie
    Join Date
    Oct 2002
    Location
    Rijeka, Croatia
    Posts
    36

    Re: MFC &OpenGL

    I strongly suggest you not to use MFC. Using MFC is only adding another layer between your code and openGL renderer. And, besides, OpenGL engine is NOT compatibile with C++ class syntax, since it uses in-state rendering, which means a sort of "brush" properties for the renderer. To query OpenGL variables you need to call a function anyway, so having MFC inbetween is not a good idea.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: MFC &OpenGL

    Uh... there's nothing wrong with using C++ and OpenGL. In fact, I thing using an OOD tends to make 3d graphics in general a bit easier.

    Generally I'd agree with staying away from MFC if you are doing something like a game. But if you are doing something like a modeller, or some other type of viewer it's perfectly acceptable, and can make a lot of the windowing stuff easier for you.
    Deiussum
    Software Engineer and OpenGL enthusiast

  5. #5
    Senior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    King George, Virginia
    Posts
    132

    Re: MFC &OpenGL

    OpenGL engine is NOT compatibile with C++ class syntax
    wtf?

    jebus

  6. #6

    Re: MFC &OpenGL

    While I wouldn't use MFC in a game engine, the use of OpenGL with MFC is otherwise perfectly harmless in my opinion.

    MFC neatly adds an abstraction layer above Windows to make message pump handling easier and provides utility and collection classes among other constructs.

    Here's a simple example of a small program that uses MFC to decode 3D Studio MAX meshes, displaying the mesh with OpenGL:

    Display3DS

    Good luck,
    /p2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean