dcnieho
78b4e988c4
same as for all other geometry functions, teapot takes double, not GLdouble now.
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1568 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-31 09:46:27 +00:00
dcnieho
6581072673
teapot now using vertex arrays or vertex attribute arrays, using handwritten Bezier surface evaluation code
...
in fg_geometry, fixed up normal generation for visualization and added support for drawing texture coordinates (teapot has texture coordinates, other geometric shapes don't)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1567 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-31 09:21:14 +00:00
dcnieho
fc84854e33
wasn't using GLbooleans in this platform independent part of the code
...
(e.g. used TRUE instead of GL_TRUE)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1566 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-21 05:23:31 +00:00
dcnieho
eca6fc6749
normalizing line endings..
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1565 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-19 16:34:21 +00:00
dcnieho
3d935ff946
added some beginner notes for compiling through cmake on Unix
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1564 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-19 14:50:44 +00:00
dcnieho
dbad51f95b
note on use of gluint/glushort in fg_geometry
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1563 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-19 10:23:18 +00:00
dcnieho
074ae923ab
- another strdup
...
- windows only opened in iconic state if its a non-gamemode, non-menu toplevel window
- depending on whether window is iconic or not glutSetWindowTitle or glutSetIconTitle call should have immediate effect on windows
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1562 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-17 14:01:46 +00:00
dcnieho
ace8df53ef
strdup instead of malloc/strcpy
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1561 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-17 09:09:41 +00:00
dcnieho
24caa9843b
small comment fix (this was not todo, we're not leaking memory here)
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1560 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-16 15:46:39 +00:00
dcnieho
7d4a63d970
on windows too: call resize callback only in response to WM message
...
(yes, on both platform we now don't have an initial resize callback call, it'll be back later)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1559 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 09:27:18 +00:00
dcnieho
9ae70d72c7
gamemode: just go fullscreen
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1558 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 09:17:52 +00:00
dcnieho
b3b678a2f7
now have a default reshape callback function that is used if the user didn't set any, instead of having what to do spread out over the code
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1557 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 09:17:13 +00:00
dcnieho
d2991524cb
fghHavePendingRedisplaysCallback: docs fixed up, and return without checking subwindows first if we have already found a window with pending redisplay
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1556 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 03:51:01 +00:00
dcnieho
05fc819508
comment on timer checking, are timers always sorted by triggertime? Else the code is wrong...
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1555 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 03:50:14 +00:00
dcnieho
9c2936cd85
joystick:
...
- only poll joysticks if we have an active joystick
- active joystick is defined as having callback and having positive (NON-ZERO!) pollInterval, as per GLUT sources
- use fgState.NumActiveJoysticks instead of fghHaveJoystick to save bunch of unnecessary function calls etc
- fghcbCheckJoystickPolls more concervative, per window we first check if a joystick is active (per above definition)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1554 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-06 03:39:00 +00:00
dcnieho
59ae6d2a56
fghSleepForEvents immediately returns if we have an idle callback, so simply don't call the function at all if we just processed the idle callback
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1553 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-05 17:08:32 +00:00
dcnieho
7365dc38d4
error when entering main loop with no windows defined, as GLUT does
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1552 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 16:27:00 +00:00
dcnieho
9fa8bcf4db
if user opens menu in parent window and then clicked child window, the menu wasn't closed. Fixed (and some cleanup)
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1551 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 10:18:35 +00:00
dcnieho
5e97fed06a
MenuStatusCallback when menu was closed did not return location of pointer relative to child window's top-left, it only worked for top level windows.
...
To make this work, fghPlatformGetCursorPos now can return cursor pos relative to top-left of a specified window's client area (this is untested on X11)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1550 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 09:54:55 +00:00
dcnieho
5398d76b76
callign entryfunc should not steal the current window, so save before calling and restore after callback returns
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1549 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 09:25:15 +00:00
dcnieho
76f9c9a902
handling of mouse messages more conform docs, some cleanup
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1548 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-04 09:17:03 +00:00
dcnieho
bf4a53a72e
missed the windowproc return value
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1547 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 18:43:22 +00:00
dcnieho
bab8eb3423
WM_PAINT more conform to docs
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1546 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 18:28:55 +00:00
dcnieho
c8177024db
document glutSetWindowTitle, glutSetIconTitle
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1545 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 17:44:44 +00:00
dcnieho
4edd89470b
some cleanup: on window creation, don't have to zero variables that
...
already set to zero by calloc
in windowproc, don't have handlers that only forward the message to
defwindowproc
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1544 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 17:22:34 +00:00
dcnieho
78707f3e63
implemented glutSetIconTitle that works on win32, when a window is
...
minimized, its title is now changed, and changed back when it is restored
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1543 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 17:20:47 +00:00
dcnieho
736f745cc1
fixed up handling of WM_MOUSEWHEEL, low order of wParam is not the mouse
...
wheel number, but indicates which virtual keys are pressed during the
scroll wheel motion
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1542 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 15:42:26 +00:00
dcnieho
7caa405f57
Visibility functions better implemented now. All goes through
...
WM_SHOWWINDOW except for a newly created window (WM_SHOWWINDOW is too
early for callback then). I now have a state variable that indicates
whether visibility has been notified yet for a new window. This
notification gets done just before the window is first drawn. This
removes the need for fgPlatformMainLoopPreliminaryWork on windows, and
it also works for windows created when the mainloop is already running
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1541 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 10:31:34 +00:00
dcnieho
c7656b8659
comment on implementation of window status callback
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1540 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 07:43:48 +00:00
dcnieho
4d83b5ab50
simplified some window rect calculations
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1539 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 07:41:23 +00:00
dcnieho
5e48d25cdb
document coordinates returned by glutPositionFunc, other doc
...
improvements regarding docs
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1538 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 07:15:20 +00:00
dcnieho
6d9e4fdb30
updated docs for fgPlatformMainLoopPreliminaryWork
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1537 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 06:50:15 +00:00
dcnieho
1d9ec8e1e9
implemented somewhat better visibility/windowstatus support, some small
...
cleanup
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1536 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 05:53:51 +00:00
dcnieho
f46574e263
library should call window status func at all times, translation to
...
visibility callback happens if needed. Documented this, and added notes
on visibility/windowstatus func in callbackmaker demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1535 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 03:08:05 +00:00
dcnieho
41dd280289
made fghVisibility more intuitive, documented glutVisibilityfunc and
...
glutWindowStatusFunc
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1534 7f0cb862-5218-0410-a997-914c9d46530a
2013-03-01 02:42:14 +00:00
dcnieho
a2e3b9c31d
fixed up docs a bit, provided docs for some functions
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1533 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 18:26:14 +00:00
dcnieho
8cafb13ec9
doc cleanup
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1532 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 17:41:20 +00:00
dcnieho
3299e79bdf
files for demoing GLUT_ICON
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1531 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 17:40:45 +00:00
dcnieho
cd92d7fdd2
fixed documentation for GLUT_ICON (its not an environment variable, but
...
an identifier for a resource file) and added an example of it for the
One demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1530 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 13:40:28 +00:00
dcnieho
766e0cafc5
implemented GLUT_WINDOW_STENCIL_SIZE and GLUT_WINDOW_BUFFER_SIZE for glutGet
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1529 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-28 08:53:31 +00:00
dcnieho
ccebf6f3df
No need to handle WM_CANCELMODE, defwindowproc takes care of it
...
(releasing capture), and we have WM_CAPTURECHANGED to make sure our
application is in consistent state
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1528 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 12:11:33 +00:00
dcnieho
c0522d1fcf
updated README to point to README.cmake for building
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1527 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 12:07:26 +00:00
dcnieho
953dcc637c
now that mouse capture was properly implemented, menus could be opened
...
outside the window when the window had capture because another mouse
button was depressed. fixed
Also implemented WM_CANCELMODE, which could be important as we should
cancel capture when it comes in
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1526 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 11:36:14 +00:00
dcnieho
a5ed343b38
Mousemotion events now generated outside the window until all mouse
...
buttons released, as is done on X11 (according to comments i now
deleted)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1525 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 10:46:13 +00:00
dcnieho
371adb260e
fgDeactivateMenu could sometimes be called twice on the same menu, avoid
...
crash in that situation
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1524 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 10:29:24 +00:00
dcnieho
5fe69bdac1
GLUT_CURSOR_INHERIT now works, also implemented another cursor
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1523 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 09:35:38 +00:00
dcnieho
0d353df338
should return zero after processing any of the mouse button down or up
...
events
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1522 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 08:18:09 +00:00
dcnieho
b362113e1f
Only do mouse tracking for EntryFunc if user specified an entryfunc
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1521 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 08:06:24 +00:00
dcnieho
3eda176577
Now implemented properly working mouse entry and exit (EntryFunc callback) support on windows
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1520 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 07:52:55 +00:00
dcnieho
eccb722d20
demo glutSetCursor
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1519 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 07:07:55 +00:00
dcnieho
9652d57d4f
Simplified fghWindowUnderCursor, cleane dup code
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1518 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 07:01:43 +00:00
dcnieho
363c2c363a
Only check for child window when needed, some cleanup
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1517 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 06:18:20 +00:00
dcnieho
8363fa9507
WM_SETFOCUS should not change focus to child instead, then all input goes to child even if it should go to parent. Mousewheel needed to check if actually in child, other mouse action (move, press) are automatically passed to child
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1516 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 06:11:51 +00:00
dcnieho
6f9152c92e
Use GetMessagePos, not GetCursorPos to make sure we get the right mouse position. Also, no need to get mouse position at time of keypress, every mouse movement before the keypress is processed in an earlier WM_MOUSE message already, so mouse position in the window state is all we need.
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1515 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 05:58:56 +00:00
dcnieho
b1274e9078
added API doc for glutSetKeyRepeat and glutIgnoreKeyRepeat
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1514 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 04:58:23 +00:00
dcnieho
00260311f3
clean up glutSetKeyRepeat function body
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1513 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 04:44:14 +00:00
dcnieho
e9318d4e55
Added subwindows to CallbackMaker demo, for testing and demonstration. Also figured out how key repeat's global and per-window flags are supposed to interact, documented and demonstrated it.
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1512 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 04:36:48 +00:00
dcnieho
71c6054fe0
added modifier key status to callbackmaker output, also added entryfunc
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1511 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-27 03:58:05 +00:00
dcnieho
ddda931bac
reworked fullscreen code based on implementation of Chromium. can now handle/restore windows in maximized state and no longer uses WS_POPUP.
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1510 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 16:49:19 +00:00
dcnieho
5fa61c0c64
subwin demo now has a grandchild (subwin in subwin) for testing
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1509 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 16:14:41 +00:00
dcnieho
3b5f3573a1
some msgs only sent to parent window, find child under cursor. This before only search for childs of the parent, not grandchilds or more derived. Fixed
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1508 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 16:13:09 +00:00
dcnieho
fdbb8086ed
better name for key up/down function
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1507 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 15:21:34 +00:00
dcnieho
a6e021db4a
win API docs say that defWndProc must be called for system keydown/keyup
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1506 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 15:20:18 +00:00
dcnieho
cf6e2a419c
win32: updating keyboard down/up handling. Split off to own function that deals with both down and up to reduce code duplication. Also only get async keystate to see if left or right alt, control, shift is pressed/released when a press on one of these is detected in the first place, not with every message that comes in.
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1505 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-26 15:05:41 +00:00
dcnieho
813addede1
moving fgPlatformReshapeWindow and fgPlatformDisplayWindow from fg_main_x to fg_window_x. Hope this didn't break anything for X11 or andriod
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1504 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-13 10:28:26 +00:00
dcnieho
4f1f85c231
api doc for glutWMClosefunc was wrong....
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1503 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-13 09:48:51 +00:00
dcnieho
dae7120ed5
now have 64bit internal time on Windows, as we deal with wrap of timeGetTime manually
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1502 7f0cb862-5218-0410-a997-914c9d46530a
2013-02-09 11:59:32 +00:00
dcnieho
17a8372217
can now configure build such that runtime warnings and/or errors occuring in lib are not printed to stderr (thanks Nigel Steward)
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1501 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-27 12:38:28 +00:00
dcnieho
f79dae9865
smoothgl3 and shapes demos, now checking if glutGetProcAddress calls give us valid function pointers
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1500 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-27 11:56:32 +00:00
dcnieho
05a9a7c907
Make CTRL and SHIFT arrive properly in single (as opposed to MultiButton) mouse events, thanks Philipp!
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1496 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-17 14:53:30 +00:00
dcnieho
d657a564e5
fixed closing window crash, thanks Philipp!
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1495 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-17 14:51:25 +00:00
dcnieho
242d359f5b
oops, debug code that shouldn't have been committed got in there...
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1494 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-17 14:46:22 +00:00
dcnieho
14276cac9e
Updating last edit time and FreeGLUT version for API document
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1493 7f0cb862-5218-0410-a997-914c9d46530a
2013-01-17 14:33:54 +00:00
dcnieho
bbefe8aee0
avoid crash on null temp_window, thanks Phillip Kutin!
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1490 7f0cb862-5218-0410-a997-914c9d46530a
2012-12-18 05:19:21 +00:00
dcnieho
ff0366185f
removed unnecessary token pasting (##) preprocessor directives that blew
...
up some builds. thanks Phillip Kutin!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1489 7f0cb862-5218-0410-a997-914c9d46530a
2012-12-18 05:13:42 +00:00
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
dcnieho
0500cfdf4c
reimplemented the client-area/window-area conversion code. It should now
...
be robust across Windows and Visual Studio versions. Bugs in window
size with VS2012 fixed!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1394 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-16 11:02:06 +00:00
dcnieho
9241bedc2f
including OpenGL/gl.h and OpenGL/glu.h when on apple platform
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1393 7f0cb862-5218-0410-a997-914c9d46530a
2012-11-16 00:14:55 +00:00
dcnieho
45f45042c2
fixing conflicts with opengl headers on some systems, same solution as
...
by John in r1385
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1390 7f0cb862-5218-0410-a997-914c9d46530a
2012-09-25 07:46:25 +00:00
dcnieho
767cf1bcbe
GLUT_WINDOW_HEADER_HEIGHT should always have been GLUT_WINDOW_BORDER_HEIGHT.
...
Adding the second, keeping the first for backward compatibility
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1389 7f0cb862-5218-0410-a997-914c9d46530a
2012-09-25 07:39:13 +00:00
dcnieho
eae233fe6e
fixed shader route in shapes demo:
...
- small bug in gl_frustum implementation in matrix lib, element (4,4)
should be 0
- default OpenGL ambient color is (.2, .2, .2, 1.), not black
little bit of formatting
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1388 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-13 04:59:48 +00:00
dcnieho
b76e745afc
shapes demo: material color now set to red in shader, ambient light off again. looks
...
better now that i understand light a bit better
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1387 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-13 02:57:30 +00:00
jtsiomb
b8ea74d51e
The mapping from XInput button mask to the standard X event button mask is not 1-1, fixed.
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1386 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-09 01:36:31 +00:00
jtsiomb
03fea19290
- trying to fix bug 2781865
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1385 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-07 11:15:01 +00:00
dcnieho
d598173a25
also add an InvalidateRect call before the BeginPaint in WM_PAINT
...
handler.this ensures the whole window is repainted, and hopefully fixes
some bug reports.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1384 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-06 15:05:10 +00:00
dcnieho
80ed4c02f9
better to put code to check if menu should be deactivated in
...
fg_menu_mswin.c
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1383 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-06 15:03:20 +00:00
dcnieho
c1492ab1ef
some doc on why not using GetClientRect for getting the position of the
...
client rect on the screen
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1382 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-06 03:10:33 +00:00
dcnieho
19c5ab0140
calling glutExit in the erro callback is a really bad example...
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1381 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-05 04:28:57 +00:00
jtsiomb
4c740e0f35
gamemode-x11: fixed the conditions checking for XR&R >= 1.1, as it where they would match 1.0 too
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1380 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-31 14:33:26 +00:00
dcnieho
01d00ef0d0
forgot to set use to true (not that its useful, but avoid confusion that
...
could arise when returning false)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1379 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 05:33:07 +00:00
dcnieho
3173417248
attempt to implement fghPlatformGetCursorPos on X11
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1378 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 05:28:10 +00:00
dcnieho
89df7d96ed
fg_cursor is a much better place for code reading the mouse position
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1377 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 05:18:36 +00:00
dcnieho
faf732bda6
some cleanup
...
now have function fghPlatformGetMousePos to get current mouse position
in screen coordinates
Using this in fg_menu as all that code should be platform independent
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1376 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 05:11:53 +00:00
jtsiomb
3162c53c9f
Fixed broken X11 menus. The MPX patch would naively just call the
...
standard (non-multi) callbacks directly, overriding all the
menu-handling logic in the standard X event processing loop.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1375 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 04:11:01 +00:00
dcnieho
8c81fedaa0
little bit of cleanup and extra comments
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1374 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-26 15:11:37 +00:00
dcnieho
fc4d999897
the Callbackmaker demo, with its window close callback, is a nice place
...
to test glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_CONTINUE_EXECUTION)
working fine :)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1373 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 17:43:12 +00:00
dcnieho
1b92446cdd
adding option (on windows) to also install .pdb files
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1372 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 17:38:58 +00:00
dcnieho
2a1ed68305
fix to smooth demo to work with GL 3.3 and higher, thanks Neil Mannall
...
(bug tracker ID 3496257)!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1371 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 15:37:28 +00:00
dcnieho
75bc716354
update to README.win32 from José Caetano A. C. Silva (bug tracker
...
#3505577 ). Thanks!
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1370 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 15:30:35 +00:00
dcnieho
fc3aa8f406
added warning and error callbacks to demo
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1369 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 15:03:53 +00:00
dcnieho
0e41b344b8
implementing menu status callback
...
Now erroring out when trying to modify menu when a menu is currently
active
small fix to callbackmaker: glutMenuDestroyFunc is per defined menu
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1368 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 14:37:42 +00:00