git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Screenshot using glReadPixels instead
[ipdf/code.git]
/
src
/
screen.h
diff --git
a/src/screen.h
b/src/screen.h
index
8452efc
..
f5ae753
100644
(file)
--- a/
src/screen.h
+++ b/
src/screen.h
@@
-24,8
+24,8
@@
namespace IPDF
void Present();
// Get the current width/height of the window's viewport.
void Present();
// Get the current width/height of the window's viewport.
- int ViewportWidth() { return m_viewport_width; }
- int ViewportHeight() { return m_viewport_height; }
+ int ViewportWidth()
const
{ return m_viewport_width; }
+ int ViewportHeight()
const
{ return m_viewport_height; }
// Handle mouse input.
typedef std::function<void(int x, int y, int button, int wheel)> MouseHandler;
// Handle mouse input.
typedef std::function<void(int x, int y, int button, int wheel)> MouseHandler;
@@
-43,10
+43,14
@@
namespace IPDF
CursorHand
};
void SetMouseCursor(MouseCursors cursor);
CursorHand
};
void SetMouseCursor(MouseCursors cursor);
+
+ void ScreenShot(const char * filename) const;
private:
void ResizeViewport(int width, int height);
MouseHandler m_mouse_handler;
private:
void ResizeViewport(int width, int height);
MouseHandler m_mouse_handler;
+ int m_last_mouse_x;
+ int m_last_mouse_y;
int m_viewport_width;
int m_viewport_height;
int m_viewport_width;
int m_viewport_height;
UCC
git Repository :: git.ucc.asn.au