Skip to content

Commit

Permalink
Make m and d members of sui since they are not separable
Browse files Browse the repository at this point in the history
  • Loading branch information
aftersomemath committed Mar 24, 2022
1 parent c216a59 commit c20fab5
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 73 deletions.
8 changes: 4 additions & 4 deletions sample/simulate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void simulate(void) {
// run event loop
int main(int argc, const char** argv) {
// initialize everything
init(&m, &d, &sui);
init(&sui, &m, &d);

// request loadmodel if file given (otherwise drag-and-drop)
if (argc>1) {
Expand All @@ -162,7 +162,7 @@ int main(int argc, const char** argv) {
// load model (not on first pass, to show "loading" label)
if (sui.loadrequest==1) {
{
loadmodel(&m, &d, &sui);
loadmodel(&sui);

// allocate ctrlnoise
free(ctrlnoise);
Expand All @@ -177,13 +177,13 @@ int main(int argc, const char** argv) {
glfwPollEvents();

// prepare to render
prepare(m, d, &sui);
prepare(&sui);

// end exclusive access (allow simulation thread to run)
mtx.unlock();

// render while simulation is running
render(m, d, &sui);
render(&sui);
}

// stop simulation thread
Expand Down
Loading

0 comments on commit c20fab5

Please sign in to comment.