I've recently started using multiple threads (-so it is likely I'm making mistakes there-) when I came accross the following problem:
My main routine (in draw()) clears the background and draws on it, as usual. Some other threads "prepare" things to be drawn, and they are drawn in a PGraphics buffer first (using both JAVA2D and P2D). Only when they are finished, the objects are used in the main thread.
That works nicely. However, every so often in a not quite regular way, my main drawing routine seems to "flicker" by displaying what seems to be a blue background for a very short time, while turning a grey rectangle red.
Now, I do not use blue at ANY time in my sketch, so where does it come from? Ideas?
Worthwhile mentioning: I don't seem to have the problem without using mutliple threads, and those threads do prepare graphics.
I'm not sure if this rather belongs in the "integration" or the "implementations" subforum, but I'm sure the mods will shift it
Anyway, I do have a nice working sketch, which runs smoothly from within Processing or when exported as application (Windows), but when exported for web, it does not run in my browser (iExplorer), while my other sketches do.
It does start, however. It even displays the initial screen (loading a PImage with background()), but then it freezes and does not react anymore. It is a rather complex sketch with some classes and several instances of PGraphics (both P2D and JAVA2D), but my real question is:
Where do I start hunting for the culprits? I do not get any error-messages. I simply do not know what is going on.
I was also trying to "export" the sketch with older versions of Processing, but to the same effect.
I do have objects which mutate in my sketch and each mutation creates a new set of images for animation.
While the animations are rather quick (-as they are just displaying different images of the array-) the preparation of the animation takes considerable time.
Because my objects change during the cause of the sketch, I can not pre-load all animations. So, what I'd like to do is to pre-create a few animations, then launch the sketch (which displays something with rather high frame-rate) and at the same time "prepare" other animations which will be used in the draw() routine once finished.
I do want to run this sketch rather "smoothly" and the preparation-thread doesn't have priority. How can I do this?
I remember to have seen a demo-sketch on "pre-loading" images which does a similar thing, but I've forgotten where that was...
Would it be worthwhile to have a sub-forum to the topic of Wiki-development? e.g. users who can't edit the Wiki might want to suggest what would be needed. It could be a "collection point" for tasks to be taken on in the Wiki (needed code-snippets) etc.
Or is this better done within the Wiki? In which case, should we create a Wiki-Page "dump" for brain-storming ideas which later will be added on, or should we rather create "dummy-pages" within the link, which need to be filled later? The last approach has the often-seen result of "big Wiki's" which in the end only offer a structure and no content...
I'm using pushMatrix and popMatrix to rotate and place images I draw in a graphic buffer using rotate(), but now I would like to FLIP the graphic buffer, but I can't find a working function to do that. I would like a matrix-operation which maps either X or Y to -X or -Y, but not both. Any ideas how to do that? (Other than loading the graphic buffer as pixel array.)
Hi! First of all: I am glad I made it back! Yes, I may not be overly fond of the the changes in the forum, but I can see the benefits and one has to go with the changes... BUT, it took me several attempts to "rejoin" the comunity and I was several times close to the point of giving up, and I think it is worthwhile to post this here - just in case others make the same experiences (-and can't complain, because they are not "logged in", as it was in my case.)
So, here's my story: When I discoved that the old forum was closed last week, I immediately went to the "new" forum and then to the login/register buttons on the right side, where I wanted to register as new Zoho user. So far so good, I entered my login/email/wished-for-password and also recieved (and acknowledged) the according create-account email. Next, I logged on to Zoho using the default settings ("secure connection" checked) and was still happy. But when I returned to the processing-forum and wanted to finally join the discussion, I was presented with a problem
I was first ask to allow ZoHo to give my data to the forum.processing.org site, which I allowed, but next my browser (IE, but same happened later with Firefox) warned me, that the security certificate of the site was incorrect and strongly adviced me to refuse. (I think, at this point more than 70% of newbies might have given up on joining...)
After some thought, I DID allow the site regardless of the security problem, but as a result, I was just presented with an error page of "unknown page" whenever I wanted to logon from the processing forum. I tried to search for any information on that within the forum - without success. I tired to search for help on the new wiki - without success. I tried to search for help on the Zoho pages - without success.
I think at that point 95% of all interested newbies might have given up. I gave up for that day - very angrie that I have spent more than 2 hours joing a simple forum! I also tried to use the "Feedback" button on the processing forum to ask for help, but haven't recieved any answer. (Unless it got lost in my spam-filters)
So, today on a boring train journey (with online connection) I gave it another try. I started from scratch with a differrent email (as one can't use the same for a second Zoho account), and this time I logged on to Zoho WITHOUT the "secure connection" option enabled. That seems to have done the trick, or at least I could go online this time. (I'll still have to try the same thing with my original account.)
I was close to be happy, just that it took me a while to realize that I - additionally to be logged on - had to "join this group" as well (blue button on the right) before I finally was able to post this message.
Honestly, this was the worst-ever exeperience of joining a community I have had so far, and if I wouldn't REALLY have liked to join as I really enjoy processing & the (old) forum discussions, I would have stayed away.
In the interst of other potential new users: Please give detailed instructions somewhere, or make everything a little easier to start. Maybe "closing" the old forum immediatly when opening the new one wasn't such a good idea either, as now nobody could "ask" for help in the old forum. I'd dare to suggest that the "old" forum should be reopened with at least one sub-forum open (but now new registration) such that the old users can ask for help and share their experiences until everybody has "migrated" to the new system.