So I've struck upon a problem I can't fathom. I'm writing a sketch that draws to an off-screen OPENGL buffer and then resizes that buffer to display at the correct resolution.
Hi.
I have a rather large project I've been working on for quite some time. It uses PGraphics objects to draw offscreen, as this psuedocode hopefully shows:
Why is the angle (varname: craftvec) which is meant to be in the direction of travel, not correct in this sketch? If you copy and run it, everything else seems alright, so what am I missing? The calculation is on line 43.
Hello again. I'm not sure if I'm doing this incorrectly or if it's a different problem. I've been trying to use blend() but it doesn't seem to be blending as expected. I have a background image and a greyscale image that I'd like blended on top of that. I've taken to putting one image offscreen because I couldn't work out any other way to not have the target and source be the same, and thus the blended image gets lost in the original. Tell me how far off the road I am, please! How do I do this properly and see the same effects as seen on the demo page? (
http://www.processing.org/reference/blend_.html)
Can anyone please explain why the code below produces THIS output?
285
44
214
285
44
214
Every time I get 3 different numbers, but every set of 3 is the same. How would I go about fixing this? Maybe this is a case of "brain on holiday" for me again, but I'm confused as heck and I can't say I recall anything similar I've done in the past having this problem.
This is confusing me. This sketch draws the screen as it should if not drawing offscreen, with drawTerrain() drawing the shapes per frame properly. However as soon as i draw to buf and then try to load the resulting image, the image doesn't seem to update, continuing to render only the first frame.
I'm trying to work around a problem I have; To do so I'd like to create an unknown number of public variables with unknown names. This data is being read from an external file so can't be declared before the file is read, of course.
Is there a way I can declare public variables after reading the file from within a function, where they would normally be private?
Basically, my program runs fine in the PDE, but the compiled exe fails to update the java window unless focus is switched away and then back to it.. but.. It works briefly after the switch before becoming "stuck" again. The first screen is a menu with user input using the cursor keys to select an option. As an example, the program updates fine the first time you hit a key, but then you have to switch focus to see further updates to the screen.
Again, it works fine when run from within the Processing environment.
I don't know how else to concisely describe the problem. Please can anyone tell me what's going on? Ask any questions you need. I'm desperate because I have absolutely no idea...
It refuses to run with the reason "This method must return a result of type float."
The pType array is definately full. I know it is because I use it elsewhere without problem.
What am I not doing right?