Commit Graph

1714 Commits

Author SHA1 Message Date
dcnieho
afdc54e910 kicking out the FGCBSelect function prototype that has been here since
the beginning of times (r3), but is not used anywhere and has no
equivalent in GLUT


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1488 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-24 01:18:34 +00:00
dcnieho
809dad066b argh! commit 1485 was cut and paste instead of copy paste...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1487 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 10:35:24 +00:00
dcnieho
231f05cf2c tiny cosmetics in resizer demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1486 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 09:43:18 +00:00
dcnieho
0715a20796 that was too quick, fgStructure.CurrentWindow can be NULL when glutGetting window
width or height


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1485 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 09:42:54 +00:00
dcnieho
1917f56dce GLUT_WINDOW_WIDTH and GLUT_WINDOW_HEIGHT can simply be gotten from the
window's state. This also simplifies GLUT_WINDOW_X and GLUT_WINDOW_Y a
lot


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1484 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 09:31:52 +00:00
dcnieho
0eb960d0a1 prevent resize callback (and indeed the whole resizing logic) from getting
called twice


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1483 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 09:30:57 +00:00
dcnieho
9d51152ba6 timer func now changes two colors alternatingly, using multiple active
timers


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1482 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 08:40:13 +00:00
dcnieho
95b2935ce9 nicer output to terminal in Position callback
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1481 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 08:22:28 +00:00
dcnieho
409ca5b133 now providing new position of child relative to parent in the position
callback
also need to set position func for the child window in the resizer demo


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1480 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 08:21:24 +00:00
dcnieho
9db85cd9b3 resizer demo now uses timer to display window information
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1479 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 08:03:20 +00:00
dcnieho
6badc4e20a removed unnecessary calls to SetWindowPos when entering and leaving
fullscreen mode. This caused the Position callback to fire more than
necessary


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1478 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 07:51:10 +00:00
dcnieho
aa38dc56b4 implemented position callback on windows and some other minor edits
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1477 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 07:41:39 +00:00
dcnieho
a0b41213a5 prepared callbackmaker for testing position callback
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1476 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 07:06:57 +00:00
dcnieho
4f66100b51 used a macro to remove all the code repetition in fg_callbacks.c
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1475 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 06:55:52 +00:00
dcnieho
d1efa5eb48 added glutPositionFunc callback, now just need to implement so it does
something
For all callbacks now using function type definitions from
fg_internal.h.
Reorganized and cleaned up fg_callbacks.c so that there are no wrong
comments in there (timers are global, not per window) and so that all
global, per menu, and per window callbacks are grouped together


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1474 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 06:40:06 +00:00
dcnieho
a99ea4e190 looked into purpose of glutWMCloseFunc, it was to prevent the window on
which the callback is called from being closed. The ultimate aim was to
prevent GLUT from exiting. We do this in a different way, which is added
to the docs in the discussion of glutCloseFunc


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1473 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 06:13:31 +00:00
dcnieho
6724c68a10 also added note about glutWMCloseFunc to docs, and forgot to put
glugCloseFunc in the index.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1472 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 05:35:31 +00:00
dcnieho
13a5f957f7 added WCB_Position callback in callback table (only so far), code for
zeroing callbacks upon window creation continues to work correctly


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1471 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 05:26:36 +00:00
dcnieho
e81ec9d7cd documenting glutCloseFunc. Thanks Phillip Kutin for the patch!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1470 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-23 00:50:02 +00:00
dcnieho
bfddcf9f7e some reorganization in docs as well, some callbacks missing or misplaced
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1469 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-22 06:05:30 +00:00
dcnieho
419e4793b0 more cleanup in callbackmaker demo, now showing best practice for
various callback. also added menustate/menustatus callbacks


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1468 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-22 05:52:02 +00:00
dcnieho
d07f4255be cleaned up callback registering code in One demo, now its best practice
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1467 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-22 05:49:53 +00:00
dcnieho
79f3a0d64d some callback naming cosmetics as suggested in an old comment
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1466 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-22 05:27:19 +00:00
dcnieho
eb968382e8 extensive changes in callbackmaker: each of the two windows now has its
own events registered and displayed separately


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1465 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-22 04:38:03 +00:00
dcnieho
a85eaf5632 nicely lining up the two windows for the callbackmaker demo, small other
edit


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1464 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-21 08:30:47 +00:00
dcnieho
74b361d347 now using WHEEL_DELTA for mouse wheel processing, instead of a magic
number


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1463 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-21 05:15:31 +00:00
dcnieho
2359c3cc11 wrote macro for the special key checks (shift, alt, ctrl) to
significantly reduce code length (and it was copy-paste code anyway)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1460 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-21 04:18:32 +00:00
dcnieho
507338a816 small enhancement to Callbackmaker demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1459 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-20 08:57:18 +00:00
dcnieho
26a07b9ef3 small updates to one demo, so windowed windows display after the
gamemode window is closed


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1456 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-20 05:25:14 +00:00
dcnieho
cd50f5fd92 forgot docs for last change
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1454 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-20 02:23:47 +00:00
dcnieho
d01664a8bf when entering game mode, now avoiding call to ChangeDisplaySettingsEx
when not necessary. Avoids flashing of the screen



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1453 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-20 02:17:31 +00:00
dcnieho
2de980d6b4 some comments missing in shapes demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1452 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-20 02:15:43 +00:00
dcnieho
5fb529348a cosmetics in one demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1448 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-19 13:32:44 +00:00
dcnieho
0517f0e543 pulling in cleanup from r1442
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1443 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-19 13:16:17 +00:00
dcnieho
9ec740114a specified in docs with geometric objects need depth test enabled for correct
rendering


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1441 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-19 12:52:31 +00:00
dcnieho
1759c0ef92 shapes demo: now only draw necessary size info, and calling that info by
the right name.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1409 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-19 02:46:34 +00:00
dcnieho
eec680a34b fixed normals of glutCone, thanks Ioannis!
Also now using irad as base input for cone and cylinder, while using
orad as height. Without that the problem can't be seen in our demo


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1408 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-19 02:26:07 +00:00
dcnieho
7e1599594c GLUT_GEOMETRY_VISUALIZE_NORMALS is a better name than GLUT_OBJECTS_VISUALIZE_NORMALS
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1407 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-19 02:01:52 +00:00
dcnieho
bc89db3fb9 can now visualize normals of GLUT geometry in GL2 mode as well
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1406 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-19 01:54:28 +00:00
dcnieho
6b77283fc1 size of cuboctahedron in shapes demo now in line with other shapes. and
resizes along with the other shapes


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1405 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-18 15:55:55 +00:00
dcnieho
b6f1526f6e shapes demo: cuboctahedron is from the demo itself and not from FreeGLUT
geometry. Hence not supported in shader drawing mode. Now skipping it


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1404 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-18 15:49:27 +00:00
dcnieho
465ff5d0d1 can now also draw the normal vectors (seems very useful for instructive
programs, something which FreeGLUT often gets used for). use the 'n' key
in the shapes demo



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1403 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-18 15:41:03 +00:00
dcnieho
1f1768f07e added note to docs that depth test is needed for correct drawing of some
of the objects


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1402 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-18 03:45:34 +00:00
dcnieho
5a0d107a9c wrote out the ipow function so its easier to mentally parse
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1401 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-18 03:31:47 +00:00
dcnieho
82cfc20eac small enhancements to shapes demo:
- pitch and yaw rotation speeds are now prime numbers so we don't have a
  repeating cycle
- made window slightly larger so we have more space for the info printed
- added info for 2D rotation vs 1D rotation
- added keys to info where they were missing


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1400 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-18 03:30:54 +00:00
dcnieho
a1daa9fc77 fixed install target:
- freeglut shared library now in /bin dir, as is its pdb file
- its import library, the static library and the static lib's debug info
  are installed in /lib


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1399 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-17 02:20:20 +00:00
dcnieho
a7771ab4b2 menus attached to child windows did not appear in the right place.
Fixed in fghActivateMenu, whose logic is now simpler and commented as
well


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1398 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-17 01:02:30 +00:00
dcnieho
de8853e675 minor cosmetics
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1397 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-17 00:07:30 +00:00
dcnieho
610b006221 now have function to get window style based on FreeGLUT's stateflag
(fgState.DisplayMode) so that window decoration specification is only in
one place in the code. Also, glutGet(GLUT_WINDOW_BORDER_WIDTH); and
glutGet(GLUT_WINDOW_HEADER_HEIGHT); now return the right sizes, i.e.,
taking the display mode into account, for the border and caption when no
window is created yet


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1396 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-17 00:03:10 +00:00
dcnieho
dec5717f1e added note about maximizing behavior on Windows (when the maximize
window tool is pressed by the user) -- resize borders are by default of
the screen to maximize the client area. Lets not change this as FreeGLUT
has stuck with this default for a long time.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1395 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-16 15:07:33 +00:00