mightymandel v16

GPU-based Mandelbrot set explorer

poll.h File Reference

(v16)

#include <GL/glew.h>
#include <GLFW/glfw3.h>
+ Include dependency graph for poll.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  poll_result {
  poll_continue,
  poll_display,
  poll_abort,
  poll_timeout
}
 What the renderer should do after polling. More...

Functions

enum poll_result poll_t (struct poll *)
 The type of a polling function.
struct pollpoll_new (GLFWwindow *window, bool interactive, struct render_options *render_options, double ui_poll_timeout, double display_timeout, struct filename *filename, struct record *record)
 Create a new polling state structure.
void poll_delete (struct poll *poll)
 Delete a polling state structure.
enum poll_result poll_ui (struct poll *poll, bool should_wait)
 Poll the user interface for any events.
void poll_swap_buffers (struct poll *poll)
 Display the result.
void poll_set_timeout (struct poll *poll, double timeout)

Enumeration Type Documentation

What the renderer should do after polling.

Enumerator:
poll_continue 

Carry on calculating.

poll_display 

Call the display function.

poll_abort 

Abort immediately.

poll_timeout 

Finish up cleanly and return.

Definition at line 24 of file poll.h.

Function Documentation

void poll_delete ( struct poll poll)

Delete a polling state structure.

Parameters
pollThe polling state.

Definition at line 55 of file poll.c.

References poll::last_display, poll::last_ui_poll, and stopwatch_delete().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct poll* poll_new ( GLFWwindow *  window,
bool  interactive,
struct render_options render_options,
double  ui_poll_timeout,
double  display_timeout,
struct filename filename,
struct record record 
)
read

Create a new polling state structure.

Returns
The polling state.

Definition at line 34 of file poll.c.

References poll::display_timeout, poll::filename, poll::interactive, poll::last_display, poll::last_timeout, poll::last_ui_poll, poll::record, poll::render_options, poll::save_screenshot, poll::screenshot_count, stopwatch_new(), stopwatch_start(), poll::timeout, poll::ui_poll_timeout, and poll::window.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void poll_set_timeout ( struct poll poll,
double  timeout 
)

Definition at line 126 of file poll.c.

References poll::last_timeout, stopwatch_reset(), and poll::timeout.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void poll_swap_buffers ( struct poll poll)

Display the result.

Parameters
pollThe polling state.

Definition at line 114 of file poll.c.

References collect_metadata_to_string(), poll::filename, filename_name(), render_options::height, poll::record, record_do(), poll::render_options, poll::save_screenshot, poll::screenshot_count, render_options::width, and poll::window.

+ Here is the call graph for this function:

enum poll_result poll_t ( struct poll )

The type of a polling function.

enum poll_result poll_ui ( struct poll poll,
bool  should_wait 
)

Poll the user interface for any events.

Parameters
pollThe polling state.
should_waitShould be false except in interactive main().
Returns
What the renderer should do next.

Definition at line 61 of file poll.c.

References interact::centerx, interact::centery, debug_message, poll::display_timeout, interact_reset(), poll::interactive, poll::last_display, poll::last_timeout, poll::last_ui_poll, poll_abort, poll_continue, poll_display, poll_timeout, interact::quit, interact::radius, poll::render_options, render_options_set_location(), interact::save_screenshot, poll::save_screenshot, interact::show_glitches, render_options::show_glitches, stopwatch_elapsed(), stopwatch_reset(), poll::timeout, poll::ui_poll_timeout, interact::updated, interact::weight, render_options::weight, and poll::window.

Referenced by fpxx_start_atom_abort(), main(), and render_calculate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: