Uderzo v0.1.0 Uderzo.Bindings View Source

Uderzo Elixir->C bindings in Clixir. Note that for demo purposes, this is a hodgepodge of various modules - NanoVG, GLFW, utility methods, demo methods; there’s nothing however that precludes a clean separation.

Link to this section Summary

Functions

Very high level - this just invokes the renderDemo method

Draw creepy eyes following you around

Complete a frame. Similarly to uderzo_start_frame, this does some housekeeping and eventually a buffer swap to display the frame

Setup the start of a frame. This function combines several things that should happen at the start of every frame: get the window size, the cursor position, etcetera, then set the viewport and clear the framebuffer

Link to this section Functions

Link to this function demo_render(mx, my, width, height, t) View Source

Very high level - this just invokes the renderDemo method.

Link to this function draw_eyes(x, y, w, h, mx, my, t) View Source

Draw creepy eyes following you around

Link to this function glfw_create_window(width, height, title, pid) View Source
Link to this function glfw_destroy_window(window) View Source
Link to this function uderzo_end_frame(window, pid) View Source

Complete a frame. Similarly to uderzo_start_frame, this does some housekeeping and eventually a buffer swap to display the frame.

Link to this function uderzo_start_frame(window, pid) View Source

Setup the start of a frame. This function combines several things that should happen at the start of every frame: get the window size, the cursor position, etcetera, then set the viewport and clear the framebuffer.

When this function completes, it sends the mouse location and window dimensions back. It’s recommended to wait for this message and then send the rest of the frame drawing commands.