Skip to content

Working on cross-compiling#4

Open
Nico-Curti wants to merge 28 commits intomatteomonti:masterfrom
Nico-Curti:master
Open

Working on cross-compiling#4
Nico-Curti wants to merge 28 commits intomatteomonti:masterfrom
Nico-Curti:master

Conversation

@Nico-Curti
Copy link
Copy Markdown

@Nico-Curti Nico-Curti commented Apr 3, 2019

Add some rules to create nocs shared and static libraries and add a pretty layout.
Fix many warnings and some (mini) errors.
Add CMakeFile
Working on Windows compatibility...

.travis.yml Outdated
- cd bin && ./testing && cd ..
- cd bin && ./testing && cd ..
- cd bin && ./Test && cd ..
- cd bin && ./Test && cd ..
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sai vero che lo esegui due volte e basta? :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sì sì sto solo facendo delle prove…
Adesso infatti ho messo a posto anche quello (spero)

@Nico-Curti Nico-Curti changed the title pretty makefile and add build libs Working on cross-compiling Apr 5, 2019
Nico-Curti and others added 6 commits April 5, 2019 16:02
Apparently, with older versions of g++, the constructor for std::tuple is explicit.
In order to maximize compatibility, we need to switch to this notation.
This breaks the "calligraphy" of the code a bit, but it's DEFINETLY for the best.
@carlidel
Copy link
Copy Markdown
Collaborator

Dovrei aver sistemato quell'errore di compilazione su g++-5... ma non so esattamente se/come/dove ho finito per pushare i cambiamenti 😅

@carlidel
Copy link
Copy Markdown
Collaborator

Ok, vedo che stanno allineati qua e che ho praticamente invaso il fork di Nico senza nemmeno chiedere permesso... chiedo venia per l'intrusione

Nico-Curti and others added 6 commits April 11, 2019 14:49
We now have a first working verson with the new graphics... but it's still necessary to clean a lot of stuff and check for stability problems (it seems that sometimes the code randomly freezes or crashes).
@carlidel
Copy link
Copy Markdown
Collaborator

Sono finalmente riuscito a prendermi un po' di tempo per imparare due righe di GLUT e far andare una mezza grafica decente su NOCS... ora vedo di capire se posso togliere un po' di robe vestigiali rimaste dalla vecchia versione basata su passe_par_tout.

@carlidel
Copy link
Copy Markdown
Collaborator

A quanto leggo in giro, GLUT di base non è indicato per nessun tipo di lavoro in multithreading... tant'è che tutti i forum che trovo dicono che lanciare glutMainLoop() al difuori del main thread risulta essere molto pericoloso.

Vedo se trovo qualche metodo rapido per rendere vivibile questa cosa...

carlidel and others added 2 commits April 21, 2019 23:35
This proper multithreaded implementation places the whole GLUT istance in a completely separate thread with proper mutex and atomic communication.

There are still some TODOs:
> reimplement properly wait_click() and wait_enter(), they now don't work.
> improve the interface for the graphical methods, right now is kinda basic.
> evaluate a proper framerate timing, since now it will inevitably skip more than some frames if the simulation is faster than the graphical rendering.
Carlo Emilio Montanari added 4 commits May 6, 2019 12:10
The main idea behind the implementation of wait_click was just plain wrong... You never ever interfere with the flow of the GLUT thread, instead you have to freeze the execution on the main thread.

This way, the callback functions actually work and mouse click is detected.
It's not needed anymore
Little better but in the future it might be ideal to study an actual system for custom color assignment.
As for now... I'd say we don't need these two methods to be detached.
Maybe in the future? When the tag system will be more documented? We'll see.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants