PDA

View Full Version : xwindows, glut & OpenGL



ogl_is_great
04-23-2002, 06:57 PM
Specifically,
what features does XWindows have,
that GLut does not,
that OpenGL uses?

Thank you.

rts
04-23-2002, 08:47 PM
I feel like I'm talking to the Sphynx for some reason...


anyways:

XWindows is a low-level display server/protocol.

GLUT is the "GL UTility" library that abstracts away system dependent stuff like keyboards, windows, etc.

OpenGL is a low-level-ish API for 3D graphics.

So... what are you asking again?

ogl_is_great
04-24-2002, 03:40 AM
from http://www.opengl.org/developers/documentation/glut.html

"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. "

To answer your question and clarify mine, what features are in a "full-featured toolkit", such as "native window system toolkits like Motif", that GLut does not have, specifically?

Thank you.

knackered
04-24-2002, 03:56 AM
A native windows api will have the ability to add more advanced dialog items (such as listboxes etc.) ... more thread control... that kind of thing. glut has simple window interaction, such as popup menus.

Thaellin
04-24-2002, 04:00 AM
It's not generally things that OpenGL uses, as much as it is things that a full-featured applciation needs.

The native window system will provide UI widgets such as buttons, possibly drop-lists and other friendly elements that make your application pretty ad easy to use. GLUT only provides a menu system, if I remember correctly.

If you use any OpenGL extensions, you'll have to use either wgl or glx (or agl...) functions to retrieve them.

GLUT's timer has a 1ms resolution, which may not be sufficient for your needs. The operating system may provide a high resolution timer.

I don't think you can get an FSAA-capable context through GLUT.

There may be other things.

Why do you ask?
-- Jeff

marcus256
04-24-2002, 04:01 AM
I think the text is refering to GUI-like functions (Motif is a GUI toolkit). For instance, you may want to mix some user control with your OpenGL display. GLUT offers mouse & keboard input, and simple menus. Motif (and other GUI toolkits) offer text input boxes, sliders, buttons etc.

ogl_is_great
04-24-2002, 05:47 AM
the list so far is, more sophisticated

1. ui widgets
2. threading
3. timer

and detail features like full screen anti-aliasing.

If we merge GLut, GLui and pthread functionality, then add a higher resolution timer what would still be missing?

Thaellin, I would like to divorce OpenGL from windowing systems. I feel that having OpenGL use a windowing system is backwards. A windowing system should use OpenGL.

I would like to see an operating system independent substrate for OGL (that requires nothing but an OS with a graphics card driver) that OpenGL would run on top of. Then implement windowing systems on top of OpenGL, in the manner of GLui. Or if you don't want a windowing system at all, an OS should still be able to use OpenGL applications in some way.

If anyone thinks this seems like specious pursuit, please let me know why.

Thank you.

Thaellin
04-24-2002, 10:50 AM
The threading system actually resides with the operating system - I listed it as something you might need which GLUT doesn't provide. Sorry for the confusion.

GLUT merely abstracts away the underlying windowing system, though. It relies on the common functionality in providing a windowing interface and calls back down to the window manager to accomplish its tasks.

This means your proposed layer mimics one of the systems it is layered upon. It sounds fun to code, yes, but its benefits are unclear.

-- Jeff

ogl_is_great
04-24-2002, 04:37 PM
Thaelin, your last post clarifies many relationships between OGL technologies.
I will have to rethink how to reach my goals.

From what you wrote I'm beginning to think that what I may be after could be a reorganization of a native windowing system like XWindows. Maybe a "downsizing" to borrow a term.

Thank you for the explanation!

ogl_is_great
04-24-2002, 06:09 PM
I am beginning to think what I want to do is write an XWindows "window manager" in OpenGL that resides on top of XLib. Additionally, maybe a "widget set".

Are there any reasons why would I not want to do that?

ogl_is_great
04-24-2002, 07:00 PM
I will create a new message thread for this question.

Thanks again.

marcus256
04-24-2002, 10:14 PM
If we merge GLut, GLui and pthread functionality, then add a higher resolution timer what would still be missing?

It so happens that GLFW (http://hem.passagen.se/opengl/glfw) supports GLUT-like window handling, keyboard & mouse input, PLUS thread functionality, high resolution timer etc. All that is missing is GLUI (don't know how easy/difficult it would be to integrate GLUI with GLFW).

knackered
04-24-2002, 11:19 PM
Originally posted by ogl_is_great:

I will create a new message thread for this question.

Thanks again.

Please don't...oh, too late, you have.
You've now created 3 threads that are centred around the same core topic in the past 4 days. Calm down http://www.opengl.org/discussion_boards/ubb/smile.gif

ogl_is_great
04-25-2002, 08:14 AM
glfw: i'll look at that, thank you.

core topic, multiple threads: I think the multiple threads were an attempt to find the core topic. I'll take your advice, too much coffee.

ogl_is_great
04-25-2002, 10:23 AM
GLFW is very close to what I had in mind. Thank you.