We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I got changed my GUI in Processing3. Now I have issues with the 3d Render. I get this error message:
translate(), or this particular variation of it, is not available with this renderer. rotateX() can only be used with a renderer that supports 3D, such as P3D.
I tested with P3D and PDF. For controls i use Java AWT.
@ Override
public void settings() {
size(1300, 700); P3D or PDF
}
@ Override
public void setup(){
menu_setup();
}
void menu_setup(){
mainFrame = new Frame();
menuListen = new myMenuListener();
myMenu = new MenuBar();
mainFrame.setMenuBar(myMenu);
mainFrame.setVisible(true);
}
can anybody help me?
Regards Willi
Answers
Format your code. Edit post, select code and hit ctrl+o. Ensure there is an empty line above and below your code block.
Kf
Sorry, and thanks
and the imports?
and the member declarations?
and myMenuListener()?
In the MainClass
In the used class.
Willi
The whole Flyer class
that's better
you can't translate with two arguments in 3d space. just past 0 for z.
(oops, i should've re-read the original post, was a 2d error, not a 3d error.)
Use size with P3D as 3rd parameter
Thanks for your supports. If i use P3D as 3rd Parameter, i get this message.
Here the main Class
This error message
Gruß Willi
Did you have this sketch running in Processing 2? Are you trying to update it for Processing 3?
Yes, in Processing 2 it works fine. Now i would update to Processing 3. My IDE ist Netbeans.
You will not be able to update the code easily because of changes introduced in PS3.
In PS2 the PApplet class was a windowed component, in other words had a visual component, but in PS3 this is no longer the case so it is extremely difficult to embed a PApplet into a Java application.
Also in PS2 all 3 renderers (JAVA2D, P2D and P3D) were displayed inside a java.swing.JFrame in PS3 the P2D and P3D renderers are displayed inside a com.jogamp.newt.opengl.GLWindow making it difficult to use in a Java application.
@quark Then what are the JAVA2D based ones displayed with? The same old java.swing.JFrame?
Thank you for the explanation. I suspected it. Can you show me a small example? Netbeans-Jawa-Processing3 and a 3d object. I could go on with it. Have a nice day.
@Lord_of_the_Galaxy
JAVA2D sketches are still displayed in a JFrame but it is implemented differently in PS3
@kucky
I don't have a simple or even a hard example of how to embed a Processing 3 sketch inside a Java Swing application, in fact AFAIK it's not possible. In G4P I use PApplet.runSketch(...) to launch multiple windows but this will not allow me to embed into another window.
Thanks at all. I think i got a solution. If I still have a question about GSVideo, I sign up again. Have a nice Weekend
If you find a solution please post it here.
I will do my best. I´m not a expert. The Flyer move in the 3D space. This is OK. But i can not add a menu.
The Main Class
The Flyer Class
Gruß Willi
Hi, The menu problems is solved. There is an new version of ControlP5. Thanks to sojamo. Can anybody help me with GSVideo? I need a video capture for my Quadrocopter GUI. GSVideo doesn't works.
Thanks for help, I´m not an expert
P.S. My IDE is Netbeans 8.2, Processing3 and windows 10, both 64bit
What does the error say? You can add the error below (copy and paste).
I am not familiar with your GSCapture class. Have you tried the Capture class as provided by the video library which you can access through Processing's library manager? Try the provided examples. On the other hand, some runnable code to reproduce your problem will be helpful. Include your import lines in your code, and also it will be helpful to know your OS and Processing version.
Kf
I thought, video is no more part of Processing. But it´s works. Thanks for the tip. If my GUI complete works, i will say it.
Great to hear. Can I ask where did you get your initial code? Where did you get the reference to GSCapture from?
Kf
1-I don't understand your first question.
2-In this thread: https://forum.processing.org/two/discussion/2659/issues-with-the-new-version-2-1-1#latest And here: Changed
The Video and Sound libraries are no longer included in the download (because they've grown too large) and must be installed separately. Use Sketch → Import Library → Add Library... to install either one.
My Quadrocpter GUI works fine. All components can be simulated with the mouse.