how old is CPW and when last was it updated?Is it still relatively up to date?

anybody know?

Can you tell me what is “CPW”?

Google is your friend :slight_smile:

Better use GLFW, which is regularly updated.

@OP: CPW is workable if you don’t use it for production but the extension loading mechanism might need some reprogramming since it only implements up to GL 1.3, and the extension library is no longer being developed as far as I know. Also, it “only” implements a windowing system for Win32.

The release itself is from 2002 and is a very simple framework without any of the bells and whistles that you might expect from GLFW or any of the other modern Windowing Toolkits. That being said, CPW is a good example of how to implement a Windowing system for Win32 yourself and can serve as a great tutorial.

If you’re looking for a full-blow cross-platform windowing system, use ZBuffer’s recommendation instead. If you’re looking to experiment, you should look into CPW as a template for your future developments.

thanks for the replies, i was asking for a very strange reason i guess…but also because i couldn’t glean this from the site, maybe i couldn’t find it,

anyway, i started off with glut, but after realizing i couldn’t use the mouse wheel properly and from advice from others i dropped it, then for about a day used freeglut, but that was giving same issue even though i was told i coud use mouse,anyway i got over mouse issue…
so then i started using sdl and subsequently sfml, both pretty much give me what i want, although sfml is actively maintained, but using these i noticed a strange cosmetic issue with both sdl and sfml, when you build an opengl rendering context with sdl or sfml on windows xp, if you hover your mouse on the bottom windows taskbar and wait for a popup-hint to appear, if this popup overlaps the opengl window it flickers wildly, this also happens along the edges of the windows start menu,
while this isnt malicious in anyway, i am sure if someone ever uses my program on there pc they might get freaked out about it,

it seems glfw does the same thing, while laureant - a developer for sfml - has given me reasons for why this might happen, it is still not solved and does kinda annoy me, but i have to just get on with it…

the only opengl extension library that doesn’t do this is glut, have i mentioned glut before.

after posting here i went and did a little research, since i am currently using windows, i am going to try setting up my own glcontext with WGL, and work from there, at some stage I can possibly try this out for linux with GLX,but I am first going to delve into WGL and see how that shapes up.thanks guys.

I think the flicker you saw was more likely due to the way the repaint is done rather than depending on the lib itself.
If you have a loop endlessly repainting the GL window, yes it will flicker with tooltips and such. If you have a repaint which is only driven by WM events such as expose, repaint, etc it should be fine.

Really GLFW is great, both simple and with quite a lot of good features. Your choice.

ok, but by this do you mean something like
//gldraw here
where 1 could also be something waiting for an event input,and the loop cycles endlessly until exit.
i am not actually quite sure what you mean so i will research some more…repaint??

ok so i found this in the man pages, flip man, i wish i had read this before, so i got to halt the event loop and in the process halt persistent gl buffer swapping, any advice??

There are two ways to handle events in GLFW:
Block the event loop while waiting for new events.
Poll for new events, and continue the loop regardless if there are any new events or not.
The first method is useful for interactive applications that do not need to refresh the OpenGLTM display
unless the user interacts with the application through user input. Typical applications are CAD software
and other kinds of editors.
The second method is useful for applications that need to refresh the OpenGLTM display constantly,
regardless of user input, such as games, demos, 3D animations, screen savers and so on.

ok so i still be stuck, so here is the most basic code to open gl window in glfw, i still get flicker issue, i was wondering if you could possibly point out where exactly in code this is happening and perhaps just a tip on how to curb it, i tried to google on what you have said, but still not quite sure…

#include <GL/glfw.h>
int main( void )
int running = GL_TRUE;
if( !glfwOpenWindow( 300,300, 0,0,0,0,0,0, GLFW_WINDOW ) )
return 0;
while( running )
running = !glfwGetKey( GLFW_KEY_ESC ) &&
glfwGetWindowParam( GLFW_OPENED );


return 0;

help would be much appreciated.

This example from the doc is best suited to games or anything that needs to be animated even without input from the user.

Search the GLFW reference for glfwWaitEvents, that is more what you need. It blocks until new events arrive. Then read all the events that are interesting for you.
There are also callbacks, that can be called automatically when (and only when) a resize, or a refresh, etc is needed.

thanks alot man,
everytime i have used some gl lib, i have always used the pollevent instead of waitevent, when i was looking for a solution i should’ve tried this, but for some reason i thought in my mind that it didn’t matter because i was running this inside another while(var=1) loop that was constantly looping in any case, silly me…
but i think you have clarified my situation and shown me correct direction to persue, and i really appreciate it.

edit: thanks again i changed my event callback and works fine now, major appreciation, i feel like such a plonk.