xwindows, glut & OpenGL

Specifically,
what features does XWindows have,
that GLut does not,
that OpenGL uses?

Thank you.

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?

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.

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.

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

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.

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.

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

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!

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?

I will create a new message thread for this question.

Thanks again.

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

It so happens that 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).

Originally posted by ogl_is_great:
[b]
I will create a new message thread for this question.

Thanks again.[/b]

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

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.

GLFW is very close to what I had in mind. Thank you.