aboutsummaryrefslogtreecommitdiff
path: root/platform/haiku/haiku_gl_view.cpp
diff options
context:
space:
mode:
authorKostadin Damyanov2015-06-16 21:52:24 +0300
committerKostadin Damyanov2015-06-16 21:52:24 +0300
commit1505d65ac9ec9f44195e961f0089343aabe3de79 (patch)
tree2403f0d581fb8f93fae6055ccd49dec3eaa7cea9 /platform/haiku/haiku_gl_view.cpp
parent8df3e30abd06ce8d51e6b1ad696aabf97ea9f178 (diff)
downloadgodot-1505d65ac9ec9f44195e961f0089343aabe3de79.tar.gz
godot-1505d65ac9ec9f44195e961f0089343aabe3de79.tar.zst
godot-1505d65ac9ec9f44195e961f0089343aabe3de79.zip
Diffstat (limited to 'platform/haiku/haiku_gl_view.cpp')
-rw-r--r--platform/haiku/haiku_gl_view.cpp45
1 files changed, 11 insertions, 34 deletions
diff --git a/platform/haiku/haiku_gl_view.cpp b/platform/haiku/haiku_gl_view.cpp
index 61a012065..8adab96a8 100644
--- a/platform/haiku/haiku_gl_view.cpp
+++ b/platform/haiku/haiku_gl_view.cpp
@@ -1,54 +1,31 @@
+#include "main/main.h"
#include "haiku_gl_view.h"
HaikuGLView::HaikuGLView(BRect frame, uint32 type)
- : BGLView(frame, "SampleGLView", B_FOLLOW_ALL_SIDES, 0, type), rotate(0)
+ : BGLView(frame, "SampleGLView", B_FOLLOW_ALL_SIDES, 0, type)
{
- width = frame.right-frame.left;
- height = frame.bottom-frame.top;
}
-void HaikuGLView::AttachedToWindow(void)
-{
+void HaikuGLView::AttachedToWindow(void) {
LockGL();
BGLView::AttachedToWindow();
UnlockGL();
MakeFocus();
}
-void HaikuGLView::FrameResized(float newWidth, float newHeight)
-{
-}
-
-void HaikuGLView::gDraw(float rotation)
-{
-}
-
-void HaikuGLView::gReshape(int width, int height)
-{
-}
-
-void HaikuGLView::Render(void)
-{
- LockGL();
- SwapBuffers();
- UnlockGL();
+void HaikuGLView::Draw(BRect updateRect) {
+ Main::force_redraw();
}
-void HaikuGLView::MessageReceived(BMessage * msg)
+void HaikuGLView::MessageReceived(BMessage* msg)
{
+ // TODO: remove if not needed
switch (msg->what) {
- case 'rdrw':
- Render();
- /* Rotate a bit more */
- rotate++;
- break;
-
- default:
- BGLView::MessageReceived(msg);
+ default:
+ BGLView::MessageReceived(msg);
}
}
-void HaikuGLView::KeyDown(const char *bytes, int32 numBytes)
-{
-
+void HaikuGLView::MouseMoved (BPoint where, uint32 code, const BMessage *dragMessage) {
+ ERR_PRINT("MouseMoved()");
}