Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: OpenGL as foundation for windowing system

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    dfjklas, ny, usa
    Posts
    18

    OpenGL as foundation for windowing system

    I posted this text as a follow-up to an earlier message of mine, however I want to pursue this concept so I think it should be its own thread.

    start prior
    If OpenGL can be used for 2d graphics, has anyone tried using it for the foundation of a windowing system?
    For instance, why or why not would it make sense to implement XWindows using OpenGL as the foundation?
    end prior

    It was pointed out that ultimately OpenGL requires a native windowing subsystem as a foundation to work on.

    It seems though that others have already pursued this concept as there is a toolkit for OpenGL called GLUI. Info here:
    http://www.cs.unc.edu/~rademach/glui/

    Why don't we have an open source layer below OpenGL that is native and provides a standard windowing interface on all platforms for OpenGL ( or any other future libraries )?

    I think this layer would be relatively small. It would be just primitive functions and it knows about a platforms graphiccard device drivers.

    If we had another open source layer below OpenGL that OpenGL could use as its windowing system then:

    1. We would not need different implementations of OpenGL, we could implement one source code implementation that could be recompiled on any system that uses this native windowing foundation.

    2. OpenGL could be brought to any operating system, not just those that have their own windowing systems.

    3. Operating System developers would no longer have to worry about implementing their own GUIs. They just implement this foundation layer, recompile OpenGL, and use all the future OpenGL windowing systems that people would write. Don't like your windowing system? Swap it for another one. Want to use three different Windowing systems at once? No problem.

    If someone who deeply understands the underpinnings of OpenGL could explain to me why this would or would not be sensible I would love to hear it.

    Thank you!

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2002
    Location
    Hamburg, Germany
    Posts
    413

    Re: OpenGL as foundation for windowing system

    what about glut ?

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: OpenGL as foundation for windowing system

    I think you should think of opengl is a primitive which lies below the windowing system. Opengl is for handling the drawing for images or primitives that make up complex objects.

    Example of levels in a windowing system:
    My_program is at the top level.
    My_program call's for a window to be open.
    Windowing API send's information to opengl on how to draw the window.
    Opengl then renders the graphics for the window. lowest level.

    The same with GLUT which manages windows, mouse, keyboard and menu functions.
    Then opengl draw's what GLUT requests.


    As stated by another post glut supports a primitive windowing system for opengl and is supported by diffrent operating systems. So if you write a program with GLUT you can compile it to run on any platform that supports the GLUT library.


    As to your multiple windowing system, check out linux. Linux has a few diffrent windows API's.

    Windows, GNOME, KDE top level window API's,
    Windows being the only one not open source or cross platform. What you have asked about cross platform GUI, was the idea behind x-windows which has opengl support.

    You should also look at http://www.trolltech.com/ at their cross platform compiler and GUI API interface.

    The idea of crossplatform API's is so that you can write a program once and then just re-compile it to run on any computer without having to write new code.



    Originally posted by ogl_is_great:
    I posted this text as a follow-up to an earlier message of mine, however I want to pursue this concept so I think it should be its own thread.

    start prior
    If OpenGL can be used for 2d graphics, has anyone tried using it for the foundation of a windowing system?
    For instance, why or why not would it make sense to implement XWindows using OpenGL as the foundation?
    end prior

    It was pointed out that ultimately OpenGL requires a native windowing subsystem as a foundation to work on.

    It seems though that others have already pursued this concept as there is a toolkit for OpenGL called GLUI. Info here:
    http://www.cs.unc.edu/~rademach/glui/

    Why don't we have an open source layer below OpenGL that is native and provides a standard windowing interface on all platforms for OpenGL ( or any other future libraries )?

    I think this layer would be relatively small. It would be just primitive functions and it knows about a platforms graphiccard device drivers.

    If we had another open source layer below OpenGL that OpenGL could use as its windowing system then:

    1. We would not need different implementations of OpenGL, we could implement one source code implementation that could be recompiled on any system that uses this native windowing foundation.

    2. OpenGL could be brought to any operating system, not just those that have their own windowing systems.

    3. Operating System developers would no longer have to worry about implementing their own GUIs. They just implement this foundation layer, recompile OpenGL, and use all the future OpenGL windowing systems that people would write. Don't like your windowing system? Swap it for another one. Want to use three different Windowing systems at once? No problem.

    If someone who deeply understands the underpinnings of OpenGL could explain to me why this would or would not be sensible I would love to hear it.

    Thank you!
    [This message has been edited by nexusone (edited 04-23-2002).]

    [This message has been edited by nexusone (edited 04-23-2002).]

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    dfjklas, ny, usa
    Posts
    18

    Re: OpenGL as foundation for windowing system

    GLUT is close to what I'm looking for however, GLUT seems to require a native windowing system underneath it in order to run. In other words, GLUT lets you program OpenGL without knowing about the underlying Windowing system.

    I would like no underlying Windowing system.

    Something that would be all the necessary parts needed to support an underlying windowing system. Then run OpenGL on top of that. Then run something like GLUI in OpenGL.

    I guess I'm looking for something that is a merger of XWindows and OpenGL. Maybe "O-Windows"?

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    dfjklas, ny, usa
    Posts
    18

    Re: OpenGL as foundation for windowing system

    nexusone:

    I don't think that order of operations is correct from what I have read on the GLUT info page here:
    http://www.opengl.org/developers/doc...tion/glut.html

    which says:

    "GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits like Motif."


    I believe that GLUT and OpenGL reside ON TOP of a windowing system. Maybe OpenGL by-passes the Windowing system in certain cases.

    Simple proof: You can't run OpenGL or GLUT without a Windowing system installed.

    If OpenGL was below a Windowing system you could do this. Try running OpenGL on some Unix with no X11 or Motif, or any other windowing system installed. From what I understand, that is impossible.

    Please correct me, with proof, if I'm wrong.

    Thank you.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: OpenGL as foundation for windowing system

    My term of opengl being below windows API, is that it provides primitive graphic functions vs. the higher level functions that take care of drawing windows, button's, etc. OpenGL like Direct-x provide primitive graphics routines that are not a function of the windowing enviroment and are used to by-pass the windows normal channel of drawing to the screen to improve speed.

    In most cases now you see opengl as part of a windowing system, but I see no reason that is has to be used with one. The reason you don't see any opengl program's without a windowing system is that you would have to write a custom opengl video driver for your card. That is why under linux you have a hard time finding hardware rendering support for opengl.

    Then let' go back to your question as to opengl as a foundation for windowing system.
    First opengl is a graphics API, just like direct x. Nether was writen to replace the windowing system but to provide graphics functions mainly 3D.

    But there is nothing that ties opengl to any windowing system, so the anwser is yes the opengl could be the foundation for a GUI in handling writing to the screen. But then you now you are talking about creating a new operating system.

    Also back to your three points, the reason for x-windows or MS windows API is so that programmer would not have to re-write GUI's every time they wrote a program.

    What you have asked is being done now already with thing's like opengl, glut, x-windows, QT.... If you write a game in opengl you can easly move it to another platform, vs. direct x which will run only on a windows platform.



    Originally posted by ogl_is_great:
    nexusone:

    I don't think that order of operations is correct from what I have read on the GLUT info page here:
    http://www.opengl.org/developers/doc...tion/glut.html

    which says:

    "GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits like Motif."


    I believe that GLUT and OpenGL reside ON TOP of a windowing system. Maybe OpenGL by-passes the Windowing system in certain cases.

    Simple proof: You can't run OpenGL or GLUT without a Windowing system installed.

    If OpenGL was below a Windowing system you could do this. Try running OpenGL on some Unix with no X11 or Motif, or any other windowing system installed. From what I understand, that is impossible.

    Please correct me, with proof, if I'm wrong.

    Thank you.

  7. #7
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: OpenGL as foundation for windowing system

    First x-windows does have support for opengl, and there has been GUI mod's to x-windows to use opengl to render the x-windows menu's and pop-up windows.

    There was an story on here a few weeks back on it.

    Originally posted by ogl_is_great:
    GLUT is close to what I'm looking for however, GLUT seems to require a native windowing system underneath it in order to run. In other words, GLUT lets you program OpenGL without knowing about the underlying Windowing system.

    I would like no underlying Windowing system.

    Something that would be all the necessary parts needed to support an underlying windowing system. Then run OpenGL on top of that. Then run something like GLUI in OpenGL.

    I guess I'm looking for something that is a merger of XWindows and OpenGL. Maybe "O-Windows"?


  8. #8
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    292

    Re: OpenGL as foundation for windowing system

    Nex, I think you are missing the point... X-windows, the same as any windowng system can work with opengl... The point is though that there should be a way to do a windowing system with opengl underneath, since it is crossplatform... Now, what this means is that you dont have to develop a gui in Linux (gnome, kde!, whatever), in Windows, and X-windows to use your opengl...

    Check out this link... It may help... http://www.sulaco.co.za/opengl.htm#particlelines

    Sweet stuff. I am thinking about adopting this and writting it in c++ because the one the link has is in delphi...

    ogl_is_great, wanna help?

  9. #9
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    dfjklas, ny, usa
    Posts
    18

    Re: OpenGL as foundation for windowing system

    Mancha: thank you. I'm delighted people share a vision.

    The link is very interesting. I'll investigate it more thoroughly soon.

  10. #10
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: OpenGL as foundation for windowing system

    I think that I said that in my post, that opengl does not have to have a windowing system in order to work, just a driver to let it talk to the video card. and some basic i/o functions (mouse/keyboard/etc).

    Since it is open source you can get the source and make it a basis for you low level routines and build a GUI over it.




    Originally posted by mancha:
    Nex, I think you are missing the point... X-windows, the same as any windowng system can work with opengl... The point is though that there should be a way to do a windowing system with opengl underneath, since it is crossplatform... Now, what this means is that you dont have to develop a gui in Linux (gnome, kde!, whatever), in Windows, and X-windows to use your opengl...

    Check out this link... It may help... http://www.sulaco.co.za/opengl.htm#particlelines

    Sweet stuff. I am thinking about adopting this and writting it in c++ because the one the link has is in delphi...

    ogl_is_great, wanna help?

Page 1 of 3 123 LastLast

Similar Threads

  1. User Interfaces/Windowing Using OpenGL ES?
    By don in forum OpenGL ES
    Replies: 3
    Last Post: 11-03-2006, 01:28 AM
  2. Windowing system and OGL|ES.
    By code_comment in forum OpenGL ES
    Replies: 1
    Last Post: 04-20-2005, 02:05 PM
  3. input/audio/windowing system
    By seed in forum OpenGL: General
    Replies: 4
    Last Post: 04-18-2004, 11:02 PM
  4. input/audio/windowing system
    By seed in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 04-14-2004, 04:24 AM
  5. Multiple GL Windowing System...
    By Sephiroth in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 04-04-2004, 01:04 PM

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