Strange attractors with OpenCL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

39 lines
780 B

#include "app.hpp"
#include <NSWrapper.hpp>
#include <memory>
using namespace std;
int main() {
NSAppWrapper app;
unique_ptr<App> a;
app.create_window({
[&](ContextParameters ctxp){
a = make_unique<App>(ctxp.context);
},
[&](ContextParameters){
a->draw();
},
[&](ContextParameters, CGFloat w, CGFloat h){
a->resize(size_t(floor(w)), size_t(floor(h)));
}
});
// const float s = 10.962073;
// const float r = 31.211250;
// const float b = 1.537946;
app.create_window({{
{"s", 10.962073, 9, 13, [&](double x){ a->p_s = x; }},
{"r", 31.211250, 30, 32, [&](double x){ a->p_r = x; }},
{"b", 1.537946, 0.0001, 3, [&](double x){ a->p_b = x; }},
{"dt", 0.013040, 0.0001, 0.03, [&](double x){ a->p_dt = x; }}
}});
app.run();
}