Shader Tool
Small shader visualiser.
|
Controls the application Front-end. More...
#include <UIController.hpp>
Public Member Functions | |
UIController (shared_ptr< st::DocumentManager > dm, shared_ptr< st::ConfigurationManager > cm) | |
Creates the controller and creates the UIBuilder. More... | |
void | run () |
Starts the drawing of nanogui and enters it's main loop. More... | |
Public Attributes | |
Canvas * | canvas |
nanogui::TextBox * | save_shader_name |
nanogui::TextBox * | open_shader_name |
nanogui::TextBox * | texture_path |
Private Member Functions | |
void | previewButton () |
Preview button functionality. More... | |
void | editButton () |
Edit button functionality. More... | |
void | saveButton () |
Save button functionality. More... | |
void | openButton () |
Open shader functionality. More... | |
void | openTexButton () |
Open texture functionality. More... | |
void | loadTexture (string path) |
Loads and sets the texture from the provided path. More... | |
Private Attributes | |
nanogui::Screen * | screen |
shared_ptr< st::DocumentManager > | doc_manager |
shared_ptr< st::ConfigurationManager > | conf_manager |
Controls the application Front-end.
st::UIController::UIController | ( | shared_ptr< st::DocumentManager > | dm, |
shared_ptr< st::ConfigurationManager > | cm | ||
) |
Creates the controller and creates the UIBuilder.
dm | DocumentManager used in the application. |
cm | CunfigurationManager |
|
private |
Edit button functionality.
Opens the current file with the configured text editor.
|
private |
Loads and sets the texture from the provided path.
|
private |
Open shader functionality.
Opens a new shader from the configured template.
|
private |
Open texture functionality.
Loads a new texture from the configured path.
|
private |
Preview button functionality.
Reads the shader from the file and sets it in the canvas.
void st::UIController::run | ( | ) |
Starts the drawing of nanogui and enters it's main loop.
|
private |
Save button functionality.
Saves the current shader with another name. By not using this, if you are editing the default "newShader" will be overwritten the next time the program is ran.
Canvas* st::UIController::canvas |
|
private |
|
private |
nanogui::TextBox* st::UIController::open_shader_name |
nanogui::TextBox* st::UIController::save_shader_name |
|
private |
nanogui::TextBox* st::UIController::texture_path |