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.
Page Index Toggle Pages: 1
what iz openGL?!? (Read 1005 times)
what iz openGL?!?
Jan 17th, 2010, 6:23pm
 
Hi, im a newB who doesnt know much about Processing. (have been messing around w/ it 4 a few days) I dont have a book on it & havent taken a class b4, so i was wondering if some1 could tell me what open GL is and why i need it 4 3d sketches in simple terms. (and how do i use a library?) Undecided
Re: what iz openGL?!?
Reply #1 - Jan 17th, 2010, 8:17pm
 
OpenGL is a standard to rendering graphics.  The other major one is Microsoft DirectX.

You don't need know OpenGL to do 3d.  You can use the P3D format.
size(800, 800, P3D);

Pure OpenGL is a bit more complex, but faster and you can do some really neat stuff with it.
Re: what iz openGL?!?
Reply #2 - Jan 18th, 2010, 10:09am
 
Oh. OMG, i feel stupid... Embarrassed
thnx, but where do i get it?
Re: what iz openGL?!?
Reply #3 - Jan 18th, 2010, 10:52am
 


Take a look at this:
http://processing.org/learning/gettingstarted/
http://processing.org/learning/3d/primitives3d.html
or maybe
http://processing.org/learning/drawing/
opengl:
http://processing.org/reference/libraries/opengl/

the second link shows an 3D example which works also with OPENGL; the code would then look like this:



// use the library for opengl
import processing.opengl.*;

// here you call OPENGL
size(640, 360, OPENGL);
background(0);
lights();

noStroke();
pushMatrix();
translate(130, height/2, 0);
rotateY(1.25);
rotateX(-0.4);
box(100);
popMatrix();

noFill();
stroke(255);
pushMatrix();
translate(500, height*0.35, -200);
sphere(280);
popMatrix();

Greetings, Chrisir   Wink



Page Index Toggle Pages: 1