|
static std::map< GLFWwindow
*, WindowGLFW * > | initPointerToObjectMap () |
|
static void | window_size_callback (GLFWwindow *window, int width, int height) |
|
static void | window_pos_callback (GLFWwindow *window, int xpos, int ypos) |
|
static void | mouse_button_callback (GLFWwindow *window, int button, int action, int mods) |
|
static void | cursor_position_callback (GLFWwindow *window, double x, double y) |
|
static void | cursor_enter_callback (GLFWwindow *window, int entered) |
|
static void | scroll_callback (GLFWwindow *window, double x, double y) |
|
static void | key_callback (GLFWwindow *window, int key, int scancode, int action, int mods) |
|
MinVR::WindowGLFW::~WindowGLFW |
( |
) | |
|
void MinVR::WindowGLFW::appendEvent |
( |
EventRef |
newEvent) | |
|
This method is called from the event callback methods to add an event to _currentEvents for the next pollForInput to process
static void MinVR::WindowGLFW::cursor_enter_callback |
( |
GLFWwindow * |
window, |
|
|
int |
entered |
|
) |
| |
|
static |
static void MinVR::WindowGLFW::cursor_position_callback |
( |
GLFWwindow * |
window, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| |
|
static |
glm::vec2 MinVR::WindowGLFW::getCursorPosition |
( |
) | |
|
Gets the most recently updated cursor position in this window
int MinVR::WindowGLFW::getHeight |
( |
) | |
|
|
virtual |
int MinVR::WindowGLFW::getWidth |
( |
) | |
|
|
virtual |
GLFWwindow* MinVR::WindowGLFW::getWindowPtr |
( |
) | |
|
int MinVR::WindowGLFW::getXPos |
( |
) | |
|
|
virtual |
int MinVR::WindowGLFW::getYPos |
( |
) | |
|
|
virtual |
static std::map<GLFWwindow*, WindowGLFW*> MinVR::WindowGLFW::initPointerToObjectMap |
( |
) | |
|
|
static |
static void MinVR::WindowGLFW::key_callback |
( |
GLFWwindow * |
window, |
|
|
int |
key, |
|
|
int |
scancode, |
|
|
int |
action, |
|
|
int |
mods |
|
) |
| |
|
static |
void MinVR::WindowGLFW::makeContextCurrent |
( |
) | |
|
|
virtual |
This method should be implemented for each derived class. It makes the associated context current on the calling thread.
- Note
- A context can only be current on one thread at a time. RenderThread calls this method for each thread.
Implements MinVR::AbstractWindow.
static void MinVR::WindowGLFW::mouse_button_callback |
( |
GLFWwindow * |
window, |
|
|
int |
button, |
|
|
int |
action, |
|
|
int |
mods |
|
) |
| |
|
static |
void MinVR::WindowGLFW::pollForInput |
( |
std::vector< EventRef > & |
events) | |
|
|
virtual |
This method should be implemented for each derived class. It collects window events and adds them to the events array.
Implements MinVR::AbstractWindow.
void MinVR::WindowGLFW::releaseContext |
( |
) | |
|
|
virtual |
This method should be implemented for each derived class. It releases the associated context that is current on the calling thread.
- Note
- A context can only be current on one thread at a time.
Implements MinVR::AbstractWindow.
static void MinVR::WindowGLFW::scroll_callback |
( |
GLFWwindow * |
window, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| |
|
static |
void MinVR::WindowGLFW::setCursorPosition |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
This method is called from the cursor position callback to keep track of the current cursor position to send along with mouse events
void MinVR::WindowGLFW::setPosition |
( |
int |
xPos, |
|
|
int |
yPos, |
|
|
bool |
actuallySet |
|
) |
| |
This method is called from the window_pos_callback to update the _xPos and _yPos member variables. It can also be used to change the window position if actuallySet is true.
void MinVR::WindowGLFW::setSize |
( |
int |
width, |
|
|
int |
height, |
|
|
bool |
actuallySet |
|
) |
| |
This method is called from the window_size_callback to update the _width and _height member variables. It can also be used to change the window size if actuallySet is true.
void MinVR::WindowGLFW::swapBuffers |
( |
) | |
|
|
virtual |
This method should be implemented for each derived class. It swaps the front and back opengl buffers.
Implements MinVR::AbstractWindow.
static void MinVR::WindowGLFW::window_pos_callback |
( |
GLFWwindow * |
window, |
|
|
int |
xpos, |
|
|
int |
ypos |
|
) |
| |
|
static |
static void MinVR::WindowGLFW::window_size_callback |
( |
GLFWwindow * |
window, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
static |
std::map<GLFWwindow*, WindowGLFW*> MinVR::WindowGLFW::pointerToObjectMap |
|
static |
This uglyness is caused because glfw is a C library so its callback functions for key presses, size changes, etc. must be static or regular functions. Unfortunately, we need to access the member variables in the callback functions, so we use this hash table as a way to find the object and access the members.
The documentation for this class was generated from the following file: