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
openGL in rev 91 (Read 2681 times)
openGL in rev 91
Jun 1st, 2005, 3:27pm
 
Hi fry

I'm posting this here because it's related to unreleased rev 91.
I'm trying to dig in through the code to find the bugs related to openGL or at least try to help out with them.  But I'm running in to a small problem with importing the OpenGL library.

I got the code through CVS (linCVS). It worked great.  I compiled it with no errors at all:
Code:

> ./make.sh
Building processing.core
Building PDE for JDK 1.3
ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com
ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com
Building serial library...
Building net library...
Building OpenGL library...


When I run processing I get no errors neither:
Code:

> ./run.sh


But when I run the Matrix example in Library-OpenGL I get the following error:
Code:

java.lang.RuntimeException: Before using OpenGL, you must first select Import Library > opengl from the Sketch menu.
at processing.core.PApplet.size(PApplet.java:769)
at Temporary_2026_4756.setup(Temporary_2026_4756.java:13)
at processing.core.PApplet.display(PApplet.java:1033)
at processing.core.PGraphics.requestDisplay(PGraphics.java:362)
at processing.core.PApplet.run(PApplet.java:934)
at java.lang.Thread.run(Unknown Source)



this is the code for the example:

Code:

// Matrix
// by Mixel

// Simple example utilizing the OpenGL Library for Processing.

// Created 15 April 2005


import processing.opengl.*;

void setup()
{
size(800, 600, OPENGL);
noStroke();
fill(0, 102, 153, 26);
}

void draw()
{
float x = mouseX - width/2;
background(255);
translate(width/2, height/2);
rotateZ(radians(mouseY/10));
for(int i=-height/2; i<height/2; i+=10) {
for(int j=-width/2; j<width/2; j+=10) {
beginShape(QUADS);
vertex(x+j, i, 0);
vertex(x+j, i+5, 0);
vertex(j-x, i+5, -400);
vertex(j-x, i, -400);
endShape();
}
}
}


The same example works great under rev 90 on my same computer (Linux on PC).

I know this rev is not supported since its unreleased.  But I was wondering if you could help me get through this one.  Maybe I could then help localizing the bugs in openGL (another pair of eyes never hurts).
Re: openGL in rev 91
Reply #1 - Jun 1st, 2005, 5:35pm
 
i'll take a look when i get a chance. as you say, it's totally unreleased and super unsupported.

if you want to just mess around with gl stuff, you might try grabbing tag processing-0090 from the cvs, which will give you the finalized version of rev 90 that went out, so you won't be subject to the day-to-day problems of when i'm working on things.
Re: openGL in rev 91
Reply #2 - Jun 1st, 2005, 6:20pm
 
I've done what you said, but it doesn't seem to be a revision problem, since with my compiled version of revision 90 it doesn't work either.

Code:

java.lang.RuntimeException: Before using OpenGL, you must first select Import Library > opengl from the Sketch menu.

at processing.core.PApplet.size(PApplet.java:757)
java.lang.ArrayIndexOutOfBoundsException: -1

at processing.app.Runner.message(Runner.java:491)

at processing.app.MessageSiphon.run(MessageSiphon.java:60)

at java.lang.Thread.run(Unknown Source)


I think it has something to do with how run.sh runs processing.  Or how the libraries are compiled.

When you have any news about this let me know.  And if I find out something I will let you know in case it's interesting enough to put it in the howto.txt of the build directory.
Re: openGL in rev 91
Reply #3 - Jun 7th, 2005, 6:57am
 
k, so i'm not sure what happened, but the .so libs for opengl were missing (perhaps they've never been there?) but it's fixed now for the release version of 91.
Page Index Toggle Pages: 1