Sign in to follow this  

OpenGL looking for GLUT replacement

This topic is 4573 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm looking for a very small and lightweight OpenGL framework, like GLUT. Anyone heard of what I'm looking for? *hopes* Or have missed something in the libriares I've checked? :) I want:
  • Easy OpenGL window creation (only need 1 window).
  • Lightweight.
  • A right-click context menu, like in GLUT.
  • Keyboard support
  • Mouse support
  • Cross plattform
I do not want:
  • Have to resort to globals.
  • Sound support (although I don't care if it's there).
Those I've seen so far:
  • FreeGLUT - still have to use globals to pass data to callback funcs.
  • GLFW - doesn't have a context menu.
  • SDL - kinda big for my needs & doesn't have a context menu.
  • wxWidgets - really big (not lightweight) for my needs & I would have to make everything myself.
Currently not verified:
  • Ghost - a standalone Blender lib
  • Cpw
  • AllegroGL - although Allegro is a bit big, just like SDL.
  • NGL - seems big, but has a flexible window system allowing context menus
  • OGLWFW
I checked through this list to no avail. The library I choose is going to be wrapped to become my basic rendering framework. I'll be using it for some simple render technique demos and I decided that a context menu is the simplest and nicest way to switch between techniquer per demo. [Edited by - Seriema on July 13, 2005 2:20:56 PM]

Share this post


Link to post
Share on other sites
ff8: and how do you think I found FreeGLUT and GLFW?

moving on...

Share this post


Link to post
Share on other sites
ff8, thx for the link!

Quote:

ghost doc
Because GHOST is a replacement for GLUT, it is able to handle all of the GLUT requirements which arise in Blender. These include:

* Timer management.
* Display / window management (only on the main display).
* Event management.
* Cursor shape management (currently no custom cursors).
* Access to mouse buttons, mouse wheel, and keyboard information.



They don't mention the context menu, but I know Blender has em. Couldn't find anything on context menus in the help file. I'm gonna check some more but I sure hope it has it :D

It also seems to have a tendency for globals, because you can't pass your own objects to their callbacks. Or have I misread something?

Share this post


Link to post
Share on other sites
Well if it wasnt for the context menu, GLFW would be your best choice. If you really need it, is it not possible to do a simple context menu class drawn using GL_QUADS? Shouldnt be too difficult to implement, or you could use a OpenGL based GUI library(GLUi, etc...).

Share this post


Link to post
Share on other sites

try ngl / nui


http://home.gna.org/ngl/news.html

(if you have problems, with ngl 0.8 compilation, try 7.9 work great for me).

Share this post


Link to post
Share on other sites
Quote:
Original post by GamerSg
Well if it wasnt for the context menu, GLFW would be your best choice. If you really need it, is it not possible to do a simple context menu class drawn using GL_QUADS? Shouldnt be too difficult to implement, or you could use a OpenGL based GUI library(GLUi, etc...).


Hmm yeah a rendered context menu would work. But what I'm looking for isn't terrible advanced since GLUT has it, so it surprises me that no other OpenGL framework has done something equal.

Quote:
Original post by nurbsway
try ngl / nui


That seems like a full blown library. Couldn't find a context menu in the docs though, did I miss it?

*updates original post*

[Edited by - Seriema on June 6, 2005 1:45:20 PM]

Share this post


Link to post
Share on other sites

for the contextual menu you have to create it by composing the elements you want with a nuiWindow (you can show or hide this window by calling the method "SetVisible( bool Visible)" ).

example, if you want to show you contextual menu, after a right click, you have to test if their is a click by overloading the methode nuiMainWindow::onMouseClick(int X, int Y, nglMouseFlags Button) and then call your nuiWindow SetVisible methode.


hope that's clear

Share this post


Link to post
Share on other sites
That sounds pretty nifty actually =) I'll be checking in to it. It seems like a good demo library all in all. It differs from my initial goal of only having a Init Window + OGL + keyboard + mouse and making the rest myself. But in a good way, I just have to drop some ego if I'm gonna use it hehe

Share this post


Link to post
Share on other sites

there is a irc channel on freenode about ngl / nui.

irc.freenode.net
#ngl

that's a great help.

Share this post


Link to post
Share on other sites
Thx for the help guys. I'll be checking these out during the weekend (or so I hope)!

If anyone knows any more frameworks or sees a error in my conclusions, please let me know.

Share this post


Link to post
Share on other sites
A not very shameless self pimp: Daedalus (in my sig) I know we spoke over PM, but maybe someone else will come along with the same question :D

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by nurbsway

try ngl / nui


http://home.gna.org/ngl/news.html

(if you have problems, with ngl 0.8 compilation, try 7.9 work great for me).


I have been using NUI/NGL for a private project, too.
If you are having ANY issues with compilation make sure to get the latest version from CVS, the CVS version is usually much more up2date than the downloadable snapshots, there's also plenty of new stuff available from CVS (i.e. support to render flash movies (SWF) in openGL etc.)



Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I like CPW, but I'm not sure how it fits in your list.

It can handle KB and mouse input, and create windows (even make them fullscreen) with ease. I don't think it has any kind of UI, so it won't work on that front.

It's powerful, but not monsterous and overbearing. It's worked for my applications, and I at least recommend checking it out.

Share this post


Link to post
Share on other sites
i note you have my OGLWFW on there, there isnt much point in you looking at it as it doesnt have any support for keyboard,mouse or right click menus and its currently not crossplatform (work in progress) [smile]

keyboard and mouse support might well be added via window messages at a later date but menu support certainly wont be added as its geared more towards making games than anything else so expects the GUI to be OpenGL rendered.

Share this post


Link to post
Share on other sites
Quote:

I have been using NUI/NGL for a private project, too.
If you are having ANY issues with compilation make sure to get the latest version from CVS, the CVS version is usually much more up2date than the downloadable snapshots, there's also plenty of new stuff available from CVS (i.e. support to render flash movies (SWF) in openGL etc.)



what I talk about was a probleme with my zlib version. (I work with the bundle).

If you use the cvs version, just change ngl and nui directories in the bundle.

and there 's also a mailling list if you encounter a problem.

[Edited by - nurbsway on June 29, 2005 12:30:32 AM]

Share this post


Link to post
Share on other sites
If GLUT does what you want, what else do you need. Just wondering.

Share this post


Link to post
Share on other sites
I hate to go around promoting my personal stuff, but I happen to be on the verge of releasing my SXML engine 0.9 which has built-in support for:
Shaders
GUI
Texture Manager
Geometry Manager
Folder path Manager
Scenegraph hierarchy
etc...

Here's what a simple window setup file looks like:

<SceneFrame>
<MediaFolder path = "Data/Textures/" />
<MediaFolder path = "Data/Shaders/" />
<MediaFolder path = "Data/Models/" />

<MediaFolder path = "Data/XML/" />
<MediaFolder path = "Data/GUI/" />

<Window title = "GUI Test">

<DisplayMode colorDepth = "32"
fullscreen = "false"
centered = "true"
height = "600"
width = "800"
x = "0"
y = "0" />

<GUIPanel path = "GUILayout.xml" />

<GLCaps accumulation = "0"
doubleBuffer = "true"
samples = "16"
stencil = "0"
vsync = "false"
alpha = "0"
depth = "24"
color = "32" />
</Window>

<Benchmark logFilePath = "Results.xml"
duration = "10.0"
enabled = "false" />

</SceneFrame>





I should release a new demo soon as well as few tutorials, let me know if you're interested :)

Share this post


Link to post
Share on other sites
Quote:
Original post by Seriema
Hmm yeah a rendered context menu would work. But what I'm looking for isn't terrible advanced since GLUT has it, so it surprises me that no other OpenGL framework has done something equal.


Context menus and OpenGL don't play nicely with each other on some platforms (certainly they don't on my Mac), and present real performance problems. I think the reason for this is that the OpenGL context is rendered entirely on the Video hardware, and then the Windowing system has to override the usual operation of the framebuffer, and composite the menu over.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hexed
javacooldude, sound interesting, link?


What I have on my website is an old release of my SXML engine and frankly I'm quite ashamed of it since most of it was written (hacked together) back when I was a Junior in College :/
Having said that, I'm looking forward to releasing something almost entirely re-written and totally awesome this week [smile]
PS: You can check out my stuff at the GUI sticky thread which I shall update tomorrow.
Peace

Share this post


Link to post
Share on other sites
Quote:
Original post by Hexed
If GLUT does what you want, what else do you need. Just wondering.


I don't like to be forced into using globals :(
(you can't pass anything to the callbacks, and it's kinda hard to not want to since those are the only ways to react on input and render)


Quote:
Original post by JavaCoolDude
*self promotion*


That sure looks cute. But how is that a OpenGL framework/wrapper? It seems more like an rendering engine.

Share this post


Link to post
Share on other sites
You're right, I once again was carried away by posting without thinking twice about the content of my post and for that I must apologize.
Take care dude

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Similar Content

    • By _OskaR
      Hi,
      I have an OpenGL application but without possibility to wite own shaders.
      I need to perform small VS modification - is possible to do it in an alternative way? Do we have apps or driver modifictions which will catch the shader sent to GPU and override it?
    • By xhcao
      Does sync be needed to read texture content after access texture image in compute shader?
      My simple code is as below,
      glUseProgram(program.get());
      glBindImageTexture(0, texture[0], 0, GL_FALSE, 3, GL_READ_ONLY, GL_R32UI);
      glBindImageTexture(1, texture[1], 0, GL_FALSE, 4, GL_WRITE_ONLY, GL_R32UI);
      glDispatchCompute(1, 1, 1);
      // Does sync be needed here?
      glUseProgram(0);
      glBindFramebuffer(GL_READ_FRAMEBUFFER, framebuffer);
      glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                                     GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, texture[1], 0);
      glReadPixels(0, 0, kWidth, kHeight, GL_RED_INTEGER, GL_UNSIGNED_INT, outputValues);
       
      Compute shader is very simple, imageLoad content from texture[0], and imageStore content to texture[1]. Does need to sync after dispatchCompute?
    • By Jonathan2006
      My question: is it possible to transform multiple angular velocities so that they can be reinserted as one? My research is below:
      // This works quat quaternion1 = GEQuaternionFromAngleRadians(angleRadiansVector1); quat quaternion2 = GEMultiplyQuaternions(quaternion1, GEQuaternionFromAngleRadians(angleRadiansVector2)); quat quaternion3 = GEMultiplyQuaternions(quaternion2, GEQuaternionFromAngleRadians(angleRadiansVector3)); glMultMatrixf(GEMat4FromQuaternion(quaternion3).array); // The first two work fine but not the third. Why? quat quaternion1 = GEQuaternionFromAngleRadians(angleRadiansVector1); vec3 vector1 = GETransformQuaternionAndVector(quaternion1, angularVelocity1); quat quaternion2 = GEQuaternionFromAngleRadians(angleRadiansVector2); vec3 vector2 = GETransformQuaternionAndVector(quaternion2, angularVelocity2); // This doesn't work //quat quaternion3 = GEQuaternionFromAngleRadians(angleRadiansVector3); //vec3 vector3 = GETransformQuaternionAndVector(quaternion3, angularVelocity3); vec3 angleVelocity = GEAddVectors(vector1, vector2); // Does not work: vec3 angleVelocity = GEAddVectors(vector1, GEAddVectors(vector2, vector3)); static vec3 angleRadiansVector; vec3 angularAcceleration = GESetVector(0.0, 0.0, 0.0); // Sending it through one angular velocity later in my motion engine angleVelocity = GEAddVectors(angleVelocity, GEMultiplyVectorAndScalar(angularAcceleration, timeStep)); angleRadiansVector = GEAddVectors(angleRadiansVector, GEMultiplyVectorAndScalar(angleVelocity, timeStep)); glMultMatrixf(GEMat4FromEulerAngle(angleRadiansVector).array); Also how do I combine multiple angularAcceleration variables? Is there an easier way to transform the angular values?
    • By dpadam450
      I have this code below in both my vertex and fragment shader, however when I request glGetUniformLocation("Lights[0].diffuse") or "Lights[0].attenuation", it returns -1. It will only give me a valid uniform location if I actually use the diffuse/attenuation variables in the VERTEX shader. Because I use position in the vertex shader, it always returns a valid uniform location. I've read that I can share uniforms across both vertex and fragment, but I'm confused what this is even compiling to if this is the case.
       
      #define NUM_LIGHTS 2
      struct Light
      {
          vec3 position;
          vec3 diffuse;
          float attenuation;
      };
      uniform Light Lights[NUM_LIGHTS];
       
       
    • By pr033r
      Hello,
      I have a Bachelor project on topic "Implenet 3D Boid's algorithm in OpenGL". All OpenGL issues works fine for me, all rendering etc. But when I started implement the boid's algorithm it was getting worse and worse. I read article (http://natureofcode.com/book/chapter-6-autonomous-agents/) inspirate from another code (here: https://github.com/jyanar/Boids/tree/master/src) but it still doesn't work like in tutorials and videos. For example the main problem: when I apply Cohesion (one of three main laws of boids) it makes some "cycling knot". Second, when some flock touch to another it scary change the coordination or respawn in origin (x: 0, y:0. z:0). Just some streng things. 
      I followed many tutorials, change a try everything but it isn't so smooth, without lags like in another videos. I really need your help. 
      My code (optimalizing branch): https://github.com/pr033r/BachelorProject/tree/Optimalizing
      Exe file (if you want to look) and models folder (for those who will download the sources):
      http://leteckaposta.cz/367190436
      Thanks for any help...

  • Popular Now