03186ebea0
Platform/Unix/X11EventQueue.cpp: pass ButtonPress/ButtonRelease/MotionNotify events to X11Mouse
2020-12-19 18:55:11 +01:00
816cf3a072
Platform/Unix/X11Mouse: adding a basic implementation to get things going.
2020-12-19 18:55:11 +01:00
cfe064f02c
Platform/Unix/X11Keyboard: implement isKeyDown()
2020-12-19 18:55:11 +01:00
7356bdebdd
Platform/Unix/X11EventQueue: Fix bug where messeges where not flushed to the event queue.
...
XEventsQueued(disp, QueuedAlready) only returns the number of events currently in the queue and
does not flush new events. So this must happen elsewhere and if it does not we
will never see any events. i noticed this bug when removing the call to glXSwapBuffers().
Fix this by using XPending() instead as this flushes new events
if the queue is empty before returning the length.
see https://tronche.com/gui/x/xlib/event-handling/XEventsQueued.html
and https://tronche.com/gui/x/xlib/event-handling/XPending.html
2020-12-19 18:55:11 +01:00
4193b3b719
Platform/Unix/X11EventQueue: send KeyPress and KeyRelease events to X11Keyboard::handleMessage()
2020-12-19 18:55:11 +01:00
9954c45fe9
Platform/Unix/X11Keyboard: Implement handleMessage()
2020-12-19 18:55:11 +01:00
30dc11f0d5
Platform/Unix/X11Display.h: Some documentation.
2020-12-19 18:55:11 +01:00
23cf17f9af
Platform/Unix/X11EventQueue.cpp: Only process one event per call to poll(). Confirming to Platform API.
2020-12-19 18:55:11 +01:00
7648c23e43
Platform/Unix/X11EventQueue: get and release display handle in constructor/destructor instead of every call to poll()
...
Should be fine as the display should never change during runtime.
2020-12-19 18:55:11 +01:00
c5648a5105
Platform/Unix/X11EventQueue: redirect unkown events to X11WindowEventHandler.
2020-12-19 18:55:11 +01:00
2b14977eed
source/Platform/Unix/X11Display.cpp: register with X11WindowEventHandler
2020-12-19 18:55:11 +01:00
7402896ce6
Adding Platform/Unix/X11WindowEventHandler
2020-12-19 18:55:11 +01:00
7a694e8fd0
Platform/Unix/X11Display: Adding processEvent() to handle resize.
2020-12-19 18:55:11 +01:00
f07be50bd3
source/Platform/Unix/X11Display.cpp: Replace ResizeRedirectMask with StructureNotifyMask
...
ResizeRedirectMask is broken (will not update the window size). We use StrucutreNotifyMask instead and capture the window size from CaptureNotify event instead.
2020-12-19 18:55:10 +01:00
96b61f0ee3
source/Platform/Unix/X11Display.cpp: in create() call setSize()
2020-12-19 18:55:10 +01:00
9b5bd9dcd0
source/Platform/Unix/X11EventQueue.cpp: post quit event on "WM_DELETE_WINDOW".
2020-12-19 18:55:10 +01:00
035dd333da
source/Platform/Unix/X11EventQueue.cpp: log "WM_DESTROY_WINDOW" message.
2020-12-19 18:55:10 +01:00
46bf27f4a4
source/Platform/Unix/X11Display.cpp: call XSetWMProtocols with "WM_DELETE_WINDOW" flag.
2020-12-19 18:55:10 +01:00
d94c7fcf9a
Platform/Unix/X11SharedDisplay: adding getAtom()
2020-12-19 18:55:10 +01:00
f8188c4358
source/Platform/Unix/UnixEventQueue.cpp: implement a poll method (only log events for now)
2020-12-19 18:55:10 +01:00
5e27f820de
source/Platform/Unix/X11Display.cpp: in create() set the attr.event_mask to include some interesting events.
2020-12-19 18:55:10 +01:00
7dedabba57
source/Platform/Unix/GLXContext: Initial implementation
2020-12-19 18:55:10 +01:00
b65cb9c2d2
source/Platform/Unix/X11Display.cpp: Initial implementation
2020-12-19 18:55:10 +01:00
bd38e9e98f
Adding source/Platform/Unix/X11SharedDisplay.cpp
2020-12-19 18:55:10 +01:00
c41fb6c013
Adding glad GLX
2020-12-19 18:55:10 +01:00
6464838159
source/Platform/Unix: stub implementation
2020-12-19 18:55:10 +01:00
b43f2fcca8
Display/DisplayMode: adding empty()
2020-12-05 18:23:16 +01:00
c2b0d73888
source/Display/DisplayMode.cpp: initialize bpp to zero.
2020-12-05 18:23:16 +01:00
3f38286049
source/Platform/Win32/Win32EventQueue.cpp: change OutputDebugString() to Log::debug()
2020-12-05 15:31:48 +01:00
fc1fc7001a
Spectre/Display/Display: Adding setVisible()
2020-12-05 15:31:48 +01:00
5d433a7b80
source/Platform/Win32/Win32Display.cpp: don't call destroy() on WM_DESTROY as the window is already destroyed if we get this event.
2020-12-05 15:31:48 +01:00
2da0f7e712
Platform/Win32/Win32Display.cpp: change OutputDebugString() to Log::debug()
2020-12-05 15:31:47 +01:00
f0d769c923
Platform/Win32/Win32Display: minor fix.
2020-12-05 15:31:47 +01:00
04db63aa49
Platform/Win32/Win32Display: implement setVisible()
2020-12-05 15:31:47 +01:00
48b501e355
source/Platform/PlatformDisplay.h: add setVisible() to the interface
2020-12-05 15:31:47 +01:00
17759992c8
Platform/Win32/Win32Display: implement maximize() and minimize()
2020-12-05 15:31:47 +01:00
d7d8a23dc2
Platform/Win32/Win32Display: implement getPosition()
2020-12-05 15:31:47 +01:00
70f73c1d52
source/Platform/PlatformDisplay.h: add getPosition() to the intreface
2020-12-05 15:31:47 +01:00
33270d9f7b
source/Platform/PlatformDisplay.h: add minimize() and maximize() to the interface
2020-12-05 15:31:47 +01:00
0a5681c871
Spectre/Display/Display: implement grabCursor()
2020-12-05 15:31:47 +01:00
e64d9cdce0
Platform/Win32/Win32Display: implement grabCursor()
2020-12-05 15:31:47 +01:00
0a1c18548d
source/Platform/PlatformDisplay.h: add grabCursor() to the interface.
2020-12-05 15:31:47 +01:00
363afe111b
source/Platform/Win32/Win32EventQueue.cpp: should not return status from DispatchMessage()
...
this can falsely signal that we have translated a win32 event to engine event when in fact we have not.
2020-12-05 15:30:45 +01:00
92f42a08fb
Spectre/System/Event: Adding toString()
2020-12-05 15:23:06 +01:00
66a4011f4b
Spectre/Core/String: Adding to_string() for signed int.
2020-12-05 15:23:06 +01:00
c731cda1a2
Spectre/Graphics/PixelFormat: Rework
...
source/Graphics/Image/IcoFormat.cpp: use new PixelFormat.
source/Graphics/Image.cpp: update to confirm with new PixelFormat
Spectre/Graphics/PixelFormat: add PF_getNumChannels()
Spectre/Graphics/PixelFormat: Rework the enum with proper naming convention and documentation.
2020-11-03 14:23:38 +01:00
82add50157
Spectre/Display/Display: implement setIcon() with pixel array parameter.
2020-11-03 11:29:14 +01:00
2be3c66a2d
Platform/Win32/Win32Display: implement the new setIcon() with pixel array.
2020-11-03 11:29:14 +01:00
60653509fa
source/Platform/PlatformDisplay.h: change setIcon() parameters to take a pixel array instead of filename
2020-11-03 11:29:14 +01:00
5d391ef70c
source/Graphics/Texture.cpp: minor fix.
2020-10-23 11:11:41 +02:00