We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Difficulty with box() method
Page Index Toggle Pages: 1
Difficulty with box() method (Read 1274 times)
Difficulty with box() method
Apr 2nd, 2010, 5:27am
 
Im looking to create simply 3d boxes for use in a graph.  Iv tried using the box method a number of ways but it just wont run.  

''box() is not available with this renderer.'' - is the error i get.  Im running the latest version of processing, but amnt importing any libraries.  Should i be?

Also, if someone could explain how the box() method works along with translate() then that would be appreciated also.  Thanks.
Re: Difficulty with box() method
Reply #1 - Apr 2nd, 2010, 5:33am
 
I guess you try to use box() with the default renderer, ie. JAVA2D. Try to use P3D or OPENGL renderers (in the size() call).
Re: Difficulty with box() method
Reply #2 - Apr 2nd, 2010, 6:10am
 
Could you explain in more detail how to fix it please ?  I have only begun to learn to program, and when i import the OPENGL one, nothing happens still.
Re: Difficulty with box() method
Reply #3 - Apr 2nd, 2010, 6:30am
 
Code:
size(200, 200, P3D); 



reference for size()

translate(x, y, z) will translate your box at (x, y, z). you may need to call pushMatrix() and popMatrix and use proper camera() settings to render your scene.
Re: Difficulty with box() method
Reply #4 - Apr 2nd, 2010, 6:50am
 
Perfect, im getting there now, just one more problem.  When im using the OPENGL render from the size(), and have imported it, i get an error.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x69036811, pid=5884, tid=5256
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode windows-x86 )
# Problematic frame:
# C  [atioglxx.dll+0x36811]
#
# An error report file with more information is saved as:
# C:\Users\Shane\Documents\processing-1.0.9\hs_err_pid5884.log
#
# If you would like to submit a bug report, please visit:
#  [website was here]
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Re: Difficulty with box() method
Reply #5 - Apr 3rd, 2010, 2:52am
 

if you use OPENGL

you need these lines at the beginning of your program:

// imports ================================================

/** opengl **/
import processing.opengl.*;

Wink
Re: Difficulty with box() method
Reply #6 - Apr 3rd, 2010, 3:04am
 
Chrisir, Aurora mentioned she (?) imported opengl already.
Aurora, it looks like Java has an issue with the OpenGL driver of Windows. I suggest to try and upgrade your video driver, it often solves such issues and can dramatically increase the speed of your video rendering.
Re: Difficulty with box() method
Reply #7 - Apr 3rd, 2010, 3:07am
 


@PhiLho, oh she did. I'm sorry.
Wink
Page Index Toggle Pages: 1