Advertisement

OpenGL without glut?

Started by April 22, 2000 06:02 PM
7 comments, last by UsefulIdiot 24 years, 1 month ago
How do you swap buffers without glut? a replacement to glutSwapBuffers() for example.
SwapBuffers Lib "gdi32" Alias "SwapBuffers" (ByVal hDC As Long

The Rock
The Rock
Advertisement
I''m still confused, im doing this in linux and ive never taken a programming class... self taught copycat. hDC is a windows thing i think. more info please
The function I showed you is to swap buffers under windows.
I have no experience under linux.

sorry

The Rock
The Rock
I found how to do it with glaux... but my install of Mesa3.1 didnt include the header file... where do i get it?
You also can use another portable library such as SDL that implements this function, with some very useful others for game programming. It''s aivalable on many many platforms.

PH.
Advertisement
glaux is deprecated, GLUT replaces it. You shouldn''t really be using glaux, though some OpenGL distributions have it in there for legacy support.

If you''re using OpenGL under some flavor of Unix/X-Windows and don''t want to use GLUT, check out the documentation on glX (the *nix equivalent to Windows'' wgl) on www.opengl.org.

-Brian Sharp
www.maniacal.org
I''ve ported all of NeHe''s tutorials to use glX. This should help you to use OpenGL on Linux without having to resort to GLUT. (http://opengl.koolhost.com)

The function you need to swap buffers, if you are using glX, is:

void glXSwapBuffers(Display *dpy
GLXDrawable Drawable)

Where:

dpy : Specifies the connection to the X server.

Drawable : Specifies the window whose buffers are to be swapped.

Check out the code for examples.

GLUT is definitely the easiest for implementing OpenGL programs, but once you have a glX skeleton it''s just as easy and you aren''t as limited.

Cheers,
Andy

surgeon: Your website seams to be down, and I''d be interested in checking out the GLx version of the tutorials. Does your website still exist? or does anyone know of a similar site?

This topic is closed to new replies.

Advertisement