dcnieho
b7bbf6277e
bit more cleanup
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1572 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 15:12:49 +00:00
dcnieho
86a5d3fc91
note about glutSetVertexAttribTexCoord2 in shapes demo
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1571 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 12:25:53 +00:00
dcnieho
67cd64fd7a
implement setter for texture coord 2 (u,v) vertex attribute so it can be used by FreeGLUT
...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1570 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 12:01:17 +00:00
dcnieho
1af0007c38
further worked on the teapot drawing code:
...
cleaned up some debug stuff, and generalized the code
now added teacup and teaspoon too, so we have Newell's set complete
As source attribution, i copied in the whole original email message that the data was taken from, and where i downloaded that email message
fixed z offset as well, so all three objects now drawn centered
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1569 7f0cb862-5218-0410-a997-914c9d46530a
2013-04-01 11:46:20 +00:00
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