When using the accelerometer example sketch for android, there are commented out commands to use a shake command. i've tried to activate these again but it doesn't work.
does this code not work anymore or is there something else i need to do?
i want to draw a ellipse, and be able to move the camera around the ellipse. but I want the ellipse to always face the camera, i.e. billboard sprites.
I'm currently also trying to use peasycam with a pgraphics image, where the peasycam changes the matrix in the pgraphics "world". but not getting too far. i've found a example that almost works but only draws the screen when the camera moves?
i dont know why this code seems to get fast over time?
the "worm" starts off wiggling nice and smooth, but by a few seconds in gets more and more until the ellipses form a tight spiral. but i cant work out whats accerlerating in my code.
i'm trying to use the blur shader included in the examples folder.
when i use it on a android device full screen, i sometimes get starnge errors at the top and right hand side of the screen.
i think it is trying to blur pixels from the desktop or other image, when its at the edge of the blurs processing image.
is there anyway to make sure the buffer is empty before bluring? i've tried setting the background black before blurring, but the error still occurs, plus i want to not clear the buffer to have acumative effect
i'm hoping to use some glsl shaders that were written for GLGraphic library, but use processing 2.0. as the GLGraphics library hasn't been updated yet for Processing 2.0 the current form of the Glsl shaders don't work. I presume it should be possible to use the new PShader system in Processing to use the old shaders, but i'm unsure how to convert them. looking at the included shaders in the processing 2,0 examples doesn't help too much.
anyone know how a good tutorial or even library of useful glsl shaders for processing 2.0?
i have a strange issue where i can build using processing 2 for android. it works smoothly and without issue. but because i want to use the glgraphics librarys i'm trying to use processing 1.5. When using 1.5 i get a failure to build, this is the same when using basic example sketchs.
i'm trying to make balls tat spawn from the mouse drag to turn on grid boxes in the same location.
i almost have it working, a ball will enter the area of the square and the square class will draw for that particular area. but rather than only turn on when the ball is in the area. i want the ball to change the life value of the square, so that i can fade the squares out after the ball has left that grid position.
i'm trying to run the function void.live in the square class, this sets the life value to 255. but it doesn't seem to update that particular arrays life value? i'm new to programming so not sure why this doesn't work. any help would be good.
here's the code.
import toxi.geom.*;
//declare
ArrayList Box_Collection;
Square[] Square_Collection;
int rows = 16;
int cols = 9;
float spacing = 1.0;
int value = 0;
int powerup = 1;
void setup() {
size(1280, 720, P3D);
background(0);
noStroke();
smooth();
//initialize
Box_Collection = new ArrayList();
//square background attempt
int total = (rows)*(cols);
Square_Collection = new Square [total];
for (int j = 0; j < rows; j++)
{
for (int i =0; i < cols; i++)
{
Vec3D squarepos = new Vec3D((j*80), (i*80), 0);
Square_Collection[(j*(cols))+i] = new Square(squarepos);
}
}
}
void draw() {
background (0);
for ( int i = 0; i < Square_Collection.length; i++ )
{
Square_Collection[i].display();
}
for (int i =Box_Collection.size()-1; i > 0;i-- ) {
Box mybox = (Box) Box_Collection.get(i);
for ( int j = 0; j < Square_Collection.length; j++ ) {
when ever i load a example sketch, or a sketch from the forums that use opengl and the line
GL gl = renderer.gl;
i get the following error
renderer.gl cannot be resolved
am i right in thinking i don't have the openGL libraries installed correctly?.
is this related to graphic card drivers? if so i'm running a ati HD 3600 gfx card, and i'm aware that ati are a bit crap when it comes to OpenGL. i've got the most up to date drivers, and have even tried old drivers that have fixed other opengl issues with games.
any help would be useful, and i'm not sure what else to try.