pointers don't work) on the way:
* Use slightly more compatible cursor shapes for GLUT_CURSOR_RIGHT_ARROW
and GLUT_CURSOR_LEFT_ARROW.
* Refactored and fixed the erroneous code for GLUT_CURSOR_NONE.
* Removed the incorrect use of XFreeCursor and use a cache of cursors
instead. Cursors are never freed now, we could do this e.g. via
reference countig if this is really needed.
* Fixed error handling.
* Unknown cursor types are an error now.
* Now the window state always corresponds to the wanted cursorID, even in
the case of GLUT_CURSOR_FULL_CROSSHAIR.
NOTE: I am not sure where the cursor cache should really reside, currently it
is simply a file-local variable.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@560 7f0cb862-5218-0410-a997-914c9d46530a
fullscreen): Now we first try to get an exact mode match, ignoring the
refresh rate if none could be found. This way the X11 part and the WinDoze
behave similarly. NOTE: We still don't behave like GLUT, because it has a
wider notion of "best" match. We have to refactor and extend freeglut quite
a bit to do that.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@558 7f0cb862-5218-0410-a997-914c9d46530a
fullscreen), i.e. memory leak caused by not freeing the mode lines
returned by XF86VidModeGetAllModeLines
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@557 7f0cb862-5218-0410-a997-914c9d46530a
few things I've fixed already a few days ago. Have today's commits
been done by copying instead of merging? :-(
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@544 7f0cb862-5218-0410-a997-914c9d46530a
issue a warning about select when a non-blocked signal was caught.
This makes sense and is more compatible with GLUT.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@531 7f0cb862-5218-0410-a997-914c9d46530a
If you wish to do offscreen supportin a portable manner, you will
no longer be able to do so with current versions of freeglut.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@481 7f0cb862-5218-0410-a997-914c9d46530a
CreateWindowEx(WS_EX_TOOLWINDOW,...) extended style suppresses the popup menu window from the taskbar or ALT-TAB list
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@474 7f0cb862-5218-0410-a997-914c9d46530a
For compatibility with GLUT, the mode should be FALSE by default
This issues was probably undetected until now because ignoreKeyRepeat didn't yet work.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@473 7f0cb862-5218-0410-a997-914c9d46530a
This allows some additional flexibility with file layout.
It should be the responsibility of the build environment, rather than at source level.
This change tested on MSVC 6, cygwin and mingw32 gcc and Linux gcc.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@470 7f0cb862-5218-0410-a997-914c9d46530a
(These are warnings about gamemode features not working the same on
some systems as on others. The semantics of gamemode are dubious,
since it was never formally documented, and has for a long time
worked in different ways on different systems, so it is arguable that
there is nothing really wrong with systems that don't support
resolution-changes.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@468 7f0cb862-5218-0410-a997-914c9d46530a
glutPostRedsiplay(). This is wrong on the face of it, and may be
at root for some of the annoying "timing" issues we've had with
redisplay events being called inappopriately.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@467 7f0cb862-5218-0410-a997-914c9d46530a
window and, upon command, renders a similar offscreen display and writes
the result to disk.
Also, modified the build structure for UNIX_X11 to autobuild the demo.
(Not done for WIN32 at this time.)
Also, forgot to previously commit the updated freeglut_ext.h include.
Eeep.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@465 7f0cb862-5218-0410-a997-914c9d46530a
the display handler in the client. (Okay, it was calling a function
that operates on the window handle.)
If you have any complexity to the display code, this can be painful
to watch. I can't think of a good reason to do the display immediately,
so I fixed the code to do a glutPostRedisplay().
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@461 7f0cb862-5218-0410-a997-914c9d46530a
Thierry).
* Renamed some of the old PLIB functions to have glut* prefixes.
(I guess that there is some thought about exporting them to the
API.)
* Changes from Thierry for FreeBSD support, and/or results of testing?
* I re-merged an XXX comment re. NetBSD/amd64 and propogated a
comment on a duplicated #define for FreeBSD. We need the GNU
autoconfig stuff to be updated by someone who groks it, now.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@460 7f0cb862-5218-0410-a997-914c9d46530a
offscreen window. (^& This is no longer permitted.
(Actually, it would be nice if it would work, but I don't think that you
can subwindow a pixmap in UNIX_X11, and assume that subwindowing offscreen
doesn't work on WIN32, either.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@456 7f0cb862-5218-0410-a997-914c9d46530a
* Recognizing the mode when you call glutCreateWindow().
(Offscreen looks and acts like a top-level window in many
ways.)
* During the life of the offscreen "window", various window-management
functions are modified to respect offscreen status.
(Excepting reshaping windows, there is not much useful interpretation
for managment of offscreen areas. Reshaping is possibly more work
than it's worth to support, and GLUT specs allow us to ignore the
request.)
* Cleanup for "offscreen" windows is a little different than for regular
windows.
Windows still don't start up quite ideally. Offscreen windows should
probably get a reshape event, but not a display.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@451 7f0cb862-5218-0410-a997-914c9d46530a
Steve Baker. Most of the adaptation done by John, with a little bit
of testing and changes by Thierry Thomas and myself. Seems to compile on:
WIN32
Red Hat LINUX
FreeBSD
NetBSD/amd64
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@450 7f0cb862-5218-0410-a997-914c9d46530a
caught between the socket and the client-side queue on X, sometime
after glutMainLoopEvent()'s loop quits and before the sleep code is
invoked.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@449 7f0cb862-5218-0410-a997-914c9d46530a
before John's changes. No functional changes:
* Removed some hard TABs introduced.
* Removed some spaces-at-end-of-line introduced.
* A couple of function calls were touched up.
I did this separately only because I don't like messing with other people's
commits. (I don't like feeling like the style police, either, but when
I mess with the commit, there's no room for reverting my interference if
it is deemed undesirable...)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@447 7f0cb862-5218-0410-a997-914c9d46530a
Restrict resize callbacks to visible windows
When iconified via glutIconifyWindow(), don't pass (0,0) to resize callback
Note that minimising the window via the menu or minimise button is not yet resolved.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@443 7f0cb862-5218-0410-a997-914c9d46530a
Some reorgansiation of navigation structure.
Developer Info "dinfo.php" and User Info "uinfo.php" now obsolete.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@441 7f0cb862-5218-0410-a997-914c9d46530a
Adjusted some spacing in a few spots to be more consistant with
freeglut style. Including one unindented if() body.
Eliminated a dead variable.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@437 7f0cb862-5218-0410-a997-914c9d46530a
Move assignment out of while test, scope temporary inside loop
Be explicit about assignment/comparison in if test for gcc peace of mind
suppress gcc -Wall -pendantic "noise"
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@431 7f0cb862-5218-0410-a997-914c9d46530a
The windows mmsystem header need only be included internally to freeglut
strdup vs _strdup is specific to the MS compiler
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@430 7f0cb862-5218-0410-a997-914c9d46530a
Also, changed to follow the convention that stuff-you-type is in
a "typewriter" font (use <tt> tags).
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@417 7f0cb862-5218-0410-a997-914c9d46530a
* CallbackMaker defined, but did not use, the Joystick() function
(a callback for the freeglut joystick interface). I uncommented
the callback-registration. I assume that it was commented out
because it was spammy. (freeglut does joysticks by polling with a
timer.) Perhaps a longer interval than 10ms would be advisable?
* fractals.c used strcpy() without getting the prototype. Added
#include <string.h> at the top.
* fractals_random.c had the same problem as fractals.c.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@415 7f0cb862-5218-0410-a997-914c9d46530a
pending resize for the window, whether or not the window is visible or
in need of a redisplay. The resize is now done before the visibility
and need-to-redisplay checks.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@414 7f0cb862-5218-0410-a997-914c9d46530a
casting an {int} to a pointer, and later retrieving the int
by another cast. It should be safe provided that pointers
are at least as big as {int}, but GCC was giving warnings on
my system, so...fixed.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@413 7f0cb862-5218-0410-a997-914c9d46530a
the FETCH_WCB() as an lvalue (which it shouldn't, since the value of
the FETCH is cast to the correct function-pointer type).
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@410 7f0cb862-5218-0410-a997-914c9d46530a
There were no changes other than replacing about 10 to 12 TABs with a
visually-suitable number of spaces, so this can probably be blindly treated
as equivalent to the previous versions of the two affected files.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@397 7f0cb862-5218-0410-a997-914c9d46530a
order. This cased a crash when the call to glutDestroyWindow() for a sub
windows was immediately followed by a call to glutDestroyWindow() for it's
parent. fgCloseWindows() would call fgDestroyWindow() for the parent first
fgDestroyWindws() would recurse over the children and then fgCloseWindows()
would call fgDestroyWindow() again for the child.
I've replaced the single linked list with one of our two way link list
structures. I've also moved it into fgStructure because that seemed the
consistent thing to do.
I said the the deferred windows destruction causes more problems then it
solves.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@396 7f0cb862-5218-0410-a997-914c9d46530a
{OldWidth} in the window structure should be done for both windows
and sub-windows, and the easiest way to do this is in the
freeglut_structure.c:fgCreateWindow() code. So, transplant one line.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@383 7f0cb862-5218-0410-a997-914c9d46530a
only windows left are freeglut menu windows, and correctly calls exit()
if we drop out of the main loop without having requested any freeglut
extensions to glutMainLoop() handling.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@382 7f0cb862-5218-0410-a997-914c9d46530a
* Updated shapes.c. I think that it's just reformatting and the addition
of some comments.
* Added shapes.dsp, a Microsoft Visual C++ Developer Studio Project file
for building shapes on WIN32 with MSVC++.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@381 7f0cb862-5218-0410-a997-914c9d46530a
{...Height}. Those are *not* records of the old values, but rather
of the *desired* *new* values, hence it was inappropriate to use them
in ConfigureNotify X11 event handling. Doing so introduced some new
problems.
So, I created OldHeight and OldWidth in the window State structure,
and *those* do what I require.
I also stripped out the obsolete comment about getting extra/bogus
reshape events. (Though I maintain that an application should be
robust against them, freeglut should no longer generate them if the
window has not changed size since last reported.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@378 7f0cb862-5218-0410-a997-914c9d46530a
* Just need to call GETWINDOW() once. Ooops. Heh.
* Update {window->State} with the new size of the window.
* If the window-size has NOT changed, then do NOT call the Reshape event.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@377 7f0cb862-5218-0410-a997-914c9d46530a
definitely in need of consideration, I believe, but is not immediately
a major bug, so I'd rather not mess with it at the risk of postponing
a release "soon".)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@376 7f0cb862-5218-0410-a997-914c9d46530a
to mark the window as *needing* a reshape (which during general display
callback handling would result in effectively a glutReshapeWindow()).
The code is now system-dependant. It should be abstracted to a function,
but is presently copied in two places. Sorry.
Also, inverted the order of the associated if()/else check (in both
WIN32 and UNIX_X11 branches) since the former "else" part was a one-line
callback invocation.
This fixes two seemingly unrelated bugs that I was seeing in UNIX_X11.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@374 7f0cb862-5218-0410-a997-914c9d46530a
highst-window-ID marker when the highest window is deleted. (This
was a half-way measure for an idea that was decided to be dubious
in the first place.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@366 7f0cb862-5218-0410-a997-914c9d46530a
Massive rework of the geometric primitive code. Includes a new
primitive (cylinder; solid and wireframe) and corresponding update
to freeglut_ext.h for the prototype.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@364 7f0cb862-5218-0410-a997-914c9d46530a
* We forgot to bump our version number in freeglut_internal.h
It is now at 2.0.2 (actually, I think that 2.1.0 might be
a better choice), which is presumably going to be our next
formal release. 2.0.1 is incorrectly identified as 2.0.0 in
the header.
* A typo in a comment has been corrected ("than"/"that").
* Numerous "manual" checks for callbacks are omitted now, since
INVOKE_WCB() does this for us. These were holdovers from the
pre-INVOKE_WCB() days. There may be some very subtle changes
in freeglut behavior, since freeglut used to test the callbacks
a little earlier in some cases and may have skipped some minor
things (like changes to the current window) in some special cases,
otherwise. It is not believed that any documented behavior is
broken, and it is unlikely---not to say impossible---that any
extant applications will detect the change. It is even possible
that there is no external behavioral change in freeglut.
This also significantly simplifies some sections of code that used
to have conditional execution. "Unconditional code is simpler code"
as one of the comments used to say.
* Lots of XXX commentary is now removed. Some of it was obsoleted
by other changes, some by changes from John.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@363 7f0cb862-5218-0410-a997-914c9d46530a
his freeglut_internal.h file where they were wrapping in EMACS; otherwise,
the files are exactly as he sent them to me).
The change unifies the WIN32 and UNIX_X11 code by defining our own
window-handle-type in freeglut_internal.h. This let John rip out some
#if garbage in several places. The result is clearer code.
Thanks, John!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@362 7f0cb862-5218-0410-a997-914c9d46530a
(a) I re-inserted the meat of a comment that I still feel is relavent.
(b) I fixed a compile-time error in the UNIX_X11 code where a variable
is declared after executable code in a block without creating
a new sub-block for the declaration.
Changes from John include:
(a) Style revision.
(b) Changes to postpone the handling of window resizes.
Lots of lines were changed, but I think that thos two cover the ground that
he hit. See the diffs for details.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@360 7f0cb862-5218-0410-a997-914c9d46530a
Moved geometry parsing to after fgInitialize() so we can use the screen size
to correctly calculate negative positions in the geometry string.
Copied the code for XParseGeometry from the X11 sources for use in the
Win32 version.
freeglut now passes test1 of the glut test suite.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@355 7f0cb862-5218-0410-a997-914c9d46530a
Replaced referenced to Time.Set with this new variable where appropriate.
fgElapsedTime() now set the start time if Time.Set is false.
Moved glutGet(GLUT_ELAPSED_TIME) handling to before the assert.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@348 7f0cb862-5218-0410-a997-914c9d46530a
And I left alone the "INIT DISPLAY STRING PARSING" section, since
it still appears to be in flux.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@346 7f0cb862-5218-0410-a997-914c9d46530a
Sorry, but that's all that I'm up to at the moment. On the plus,
excepting the font_data file (which I've been skipping), up through
this file, I think that the code style is pretty close to uniform.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@345 7f0cb862-5218-0410-a997-914c9d46530a
efficiently be postponed, quite easily---and which GLUT promises *is* to
be postponed. (It is unlikely that the difference will break any apps, but
postponing should be easy...)
No real change, just a comment in the code.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@341 7f0cb862-5218-0410-a997-914c9d46530a
few in the "one" demo, it seems, and some more crept back into
freeglut_(ext|font).c, presumably due to my own edits when I forgot to
use the "freeglut-c-mode" in EMACS.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@339 7f0cb862-5218-0410-a997-914c9d46530a
glutInit() in general, since it allows the user to override settings via
{argc, argv} command-line params.)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@338 7f0cb862-5218-0410-a997-914c9d46530a
Added entries summarizing my commits since September or late August, for
the benefit of those lacking both CVS and web access.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@336 7f0cb862-5218-0410-a997-914c9d46530a
WIN32 expected us to pass the message on up the chain (or do something
else with it), rather than just throwing away the event, for a certain
class of events. (See the diffs for more details.)
The code is also slightly reformatted from what was previously in the
repository.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@334 7f0cb862-5218-0410-a997-914c9d46530a