Commit graph

6109 commits

Author SHA1 Message Date
thefiddler fbeac9c323 [Graphics] Redirect GetAddress(string)
GetAddress(string) now calls GetAddress(IntPtr) internally. This
reduces the number of APIs that must be implemented for each platform.
2014-04-26 14:19:19 +02:00
thefiddler 9605940661 [X11] Optimized XKey translation 2014-04-25 21:55:00 +02:00
thefiddler 6257858d54 [Bind][ES][GL] Output entry points as byte[]
Moving from string[] to byte[] reduces startup memory allocations
tremendously (up to 70% lower memory use on Windows!)
2014-04-25 17:25:20 +02:00
thefiddler c1f284f101 [Win] Wgl no longer inherits GraphicsBindingsBase
This is a necessary step for the next commit.
2014-04-25 17:23:06 +02:00
thefiddler e433aad4b4 [ES] ES10 does not require initialization
It consists solely of DllImports that will be initialized on first use,
regardless of the existence of an OpenGL context.
2014-04-25 14:50:55 +02:00
thefiddler 3658fac263 [Input] Use Key.LastKey instead of Enum.GetValues
This avoids unnecessary memory allocations in the KeyboardDevice
constructor.
2014-04-25 14:15:06 +02:00
thefiddler 58e41a2b97 [Win] Replaced KeyMap dictionary with switch
This reduces the amount of allocations on the startup path.
2014-04-25 14:13:55 +02:00
thefiddler e36a0d0fbc [OpenTK] Rebased on develop 2014-04-25 13:38:53 +02:00
thefiddler 774ebd1df7 [Bind] Do not generate slots for OpenGL <= v1.1
We can use DllImports for OpenGL functions <= v1.1 on all platforms,
including Windows. This allows us to reduce the number of required
GetProcAddress calls by 474, reducing startup time and memory
consumption.

This setting can be turned off through Settings.Legacy.UseDllImports
and UseWindowsCompatibleGL.
2014-04-25 12:14:28 +02:00
thefiddler 6994a13770 [OpenTK] Fixed DllImport library for OpenGL on Mac OS X 2014-04-25 12:14:28 +02:00
thefiddler 66e78ad3f6 [Examples] Improved ExternalContext test
Also added documentation
2014-04-25 12:14:27 +02:00
thefiddler 03a8a6da0e [SDL2] Optimized Sdl2KeyCode translation
Also fixed Key.WinLeft, WinRight and Menu translation.
2014-04-25 12:14:27 +02:00
thefiddler 9f39aa1b88 [Mac] Optimized MacOSKeyCode translation
This also reduces memory allocations on startup by ~10K.
2014-04-25 12:14:26 +02:00
thefiddler 4ae65c86ff [GL] Added missing GetPName.MaxPatchVertices 2014-04-25 11:11:42 +02:00
thefiddler 824f238973 [Mac] Removed most legacy Carbon code 2014-04-24 13:48:26 +02:00
thefiddler 5f44f3d491 [Mac] Removed unused Carbon APIs 2014-04-24 13:48:26 +02:00
thefiddler cdd88e6f7e [Mac] Migrated AglContext to OpenTK.GLControl 2014-04-24 13:48:26 +02:00
thefiddler 3475582c30 [Mac] Mouse coordinates are reported in pixels 2014-04-24 13:47:30 +02:00
thefiddler e0848f9d6d [Mac] SendFloat should use _fpret on i386 2014-04-24 13:47:30 +02:00
thefiddler 3250cbbc91 [Mac] Use scrollFactor variable 2014-04-24 13:47:30 +02:00
thefiddler a2212f0184 [Mac] Fixed a warning related to volatile UniqueId
Also changed the class name to OpenTK_GameWindow
2014-04-24 13:47:30 +02:00
thefiddler acb7dd27a7 [Mac] Window should be invisible on startup
Also fixes the initial position of the window.
2014-04-24 13:47:30 +02:00
thefiddler ef4cfbdd4b Merge branch 'pr/101' into develop 2014-04-24 13:45:17 +02:00
Olle Håkansson 64fb043b77 Licensed files under MIT/X11. 2014-04-24 13:45:06 +02:00
thefiddler b0eedc122d [Mac] Avoid class conflicts for multiple windows
When creating multiple windows, their classes must have different class
names or they will fail to construct.

This commit ensures their names are unique. It also fixes a potential
memory leak in the Icon setter.
2014-04-24 13:45:06 +02:00
thefiddler 287c2b3415 [Mac] Add CocoaContext.GetGraphicsMode via CGL
Once the context is constructed, we use GetGraphicsMode to retrieve the
exact GraphicsMode that was selected by CocoaContext.
2014-04-24 13:45:06 +02:00
Olle Håkansson 2943bdfecb Fixed too high mouse scrolling speed. 2014-04-24 13:45:06 +02:00
Olle Håkansson 4573db2ceb Much improved handling of window/border states. 2014-04-24 13:45:06 +02:00
Olle Håkansson df6caa3cbb Fixed missing Mode value in CocoaContext.
Crashed E.g. GameWindow States example.
2014-04-24 13:45:06 +02:00
Olle Håkansson ddcc8df5ec Fixed the HelloGL3 example for the Mac.
Upped versions to make it work on Mac; think this should not be a
problem for most other machines.
2014-04-24 13:45:05 +02:00
Olle Håkansson 374ce26186 Added a helper for creating cocoa window infos. 2014-04-24 13:45:05 +02:00
Olle Håkansson 86a5399534 Register mouse drag as well as move. 2014-04-24 13:45:05 +02:00
Olle Håkansson 46856dc21d Closing should occur in ProcessEvents. 2014-04-24 13:45:05 +02:00
Olle Håkansson ed87814a7f Cleanups. 2014-04-24 13:45:05 +02:00
Olle Håkansson 3798d268dc Fixed mouse position not being received. 2014-04-24 13:45:05 +02:00
Olle Håkansson 9183e3ae0d Fixed crashes from callbacks. 2014-04-24 13:45:05 +02:00
Olle Håkansson d1fb2597bb Better handling of maximized window.
Used the “zoom” command before, but it has some limitations (e.g. no
event when zoom is done).
2014-04-24 13:45:05 +02:00
Olle Håkansson 7c3872531e Disabled capturing when changing resolution.
Might be off here, but without capturing it seems like we get a
behaviour closer to that of the PC.
2014-04-24 13:45:05 +02:00
Olle Håkansson 50ed0ee9da Bug fixes. 2014-04-24 13:45:05 +02:00
Olle Håkansson 63d0d057c5 Better fullscreen handling. 2014-04-24 13:45:05 +02:00
Olle Håkansson 59d7889ce0 Restored most window functionality. 2014-04-24 13:45:05 +02:00
Olle Håkansson 5457651676 Fixed swap interval. 2014-04-24 13:45:04 +02:00
Olle Håkansson 6c6beae4fc Setup listening for window events. 2014-04-24 13:45:04 +02:00
Olle Håkansson 5e1b7c82ab Cocoa bindings through libobjc.dylib 2014-04-24 13:45:04 +02:00
thefiddler 4ce1289d85 Merge branch 'es_docs' into develop 2014-04-02 09:27:23 +02:00
thefiddler 985aca3752 [Examples] Test mouse input under heavy load 2014-04-01 09:49:56 +02:00
thefiddler 74cff79d64 Merge remote-tracking branch 'frassle/issue76' into develop 2014-04-01 09:39:48 +02:00
thefiddler d292d44b90 [Math] Replaced tab characters with spaces 2014-03-31 18:20:08 +02:00
thefiddler e4fd62c0ff Merge branch 'pr/84' into develop 2014-03-31 18:19:18 +02:00
thefiddler bd920a15f2 [Bind] Corrected CSharpSpecWriter output and warning messages
CSharpSpecWriter now correctly outputs doc summaries on ARB_imaging
functions that do not have a version/deprecation string. Additionally,
it no longer warns about documentation parameter mismatches for
parameters matching C# keywords.
2014-03-31 17:40:15 +02:00