Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: OpenGL engine

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2000
    Location
    Houston, TX, United States
    Posts
    3

    OpenGL engine

    Hey, I'm still fairly new to OpenGL, but I'm not new to programming. I have decided I will make an effort at building a 3D engine on top of OpenGL.I have been running into a few problems though. I can't seem to write a demo program that takes care of all the overhead for initialisation and creating a window in one or two function calls. Can someone please tell me how I would go about doing that. I don't think this is an OpenGL specific question, but since I'm building the engine with OpenGL, I thought you might be able to help me. Thanks.

    -AJ

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: OpenGL engine

    >> I don't think this is an OpenGL specific question,...

    Setting up a window to render in is most certainly an OpenGL issue

    Anyways, there's only one place for you to go: http://nehe.gamedev.net/ . Best OpenGL tutorials on the net. Got complete sourcecode for all kind of platforms.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2000
    Location
    Houston, TX, United States
    Posts
    3

    Re: OpenGL engine

    Thank you Bob,
    That web site is an excellent place to get info on OpenGL. But I don't if you read my post wrong or I wasn't clear or whatever, but you didn't really answer my question. I know how to create an OpenGl window to render. My question is, 'How do I take all that overhead needed to create a window, and put it into a header+lib or header+dll so that all the user of my engine has to do is call myWindowFunction(); to create a window.
    I tried putting the window function in a header but all got was errors. Thanks for your help, AJ.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: OpenGL engine

    Oh, sorry. Well, found this somewhere among my files. Don't know where its comming from though. Don't even know if it works. It's a function for setting up a window (fullscreen or windowed in any given resolution) in Win32 environment.

    Just call ChangeMode(int mode, int fullscreen), where mode is the videomode you want to set (look in the table in the beginning of video.c), and fullscreen is a boolean variable (true==fullscreen, false==windowed)

    When you are done, call ShutdownVideo().

    You find the files at http://www.du.se/~e98msv/opengl/

  5. #5
    Intern Contributor
    Join Date
    Apr 2000
    Location
    Hoegaarden, Belgium
    Posts
    73

    Re: OpenGL engine

    I made a new class, and used the code you can find on nehe's -site, to create a member function( (CreateGLWindow(blabla))
    I compiled the class as a library (.lib) and copied it to the library directory of my compiler (+ header file)
    I just have to link the library with my program to use this function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •