Fix color blending (component VAO), add config.hpp
This commit is contained in:
parent
1a200205a5
commit
b530f65f38
8 changed files with 65 additions and 17 deletions
|
|
@ -15,10 +15,12 @@ int main()
|
|||
uui::GlApplication app;
|
||||
// uui::GlApplication app2; // exception : application already created
|
||||
auto window = app.create_window(800, 600, "OpenGl!");
|
||||
// auto comp = window->create_component(0, 100, 0.5f, 50);
|
||||
// comp->set_background_color(0.8f, 0.1f, 0.5f);
|
||||
auto comp = window->create_component(0, 100, 0.5f, 50);
|
||||
comp->set_background_color(0.8f, 0.1f, 0.5f);
|
||||
comp = window->create_component(0.25f, 50, 0.4f, 150);
|
||||
comp->set_background_color(0.3f, 0.8f, 0.4f, 0.5f);
|
||||
auto label = window->create_label(50, 50, "Hello World!", {0.5f, 1.0f, 0.5f, 1.0f});
|
||||
label->set_background_color(0.1f, 0.2f, 0.5f);
|
||||
label->set_background_color(0.1f, 0.2f, 0.5f, 0.8f);
|
||||
label = window->create_label(0.5f, 0.5f, "Hello World!", {1.0f, 1.0f, 1.0f, 0.5f});
|
||||
label->set_background_color(0.5f, 0.5f, 0.1f);
|
||||
label = window->create_label(0.75f, 0.75f, "Hello World!", {1.0f, 1.0f, 1.0f, 0.1f});
|
||||
|
|
@ -32,9 +34,12 @@ int main()
|
|||
// comp->set_background_color(0.8f, 0.1f, 0.5f);
|
||||
// comp = window_1->create_component(0.75f, 0.75f, 0.25f, 0.25f);
|
||||
// comp->set_background_color(0.2f, 0.1f, 0.5f);
|
||||
|
||||
// auto window_2 = app.create_window(600, 600, "OpenGL 2!");
|
||||
// comp = window_2->create_component(0, 0.5f, 100, 0.5f);
|
||||
// comp->set_background_color(0.2f, 0.5f, 0.3f);
|
||||
// auto label = window_2->create_label(50, 50, "Hello World!", {0.5f, 1.0f, 0.5f, 1.0f});
|
||||
// label->set_background_color(0.1f, 0.2f, 0.5f);
|
||||
// app.run();
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue