After weeks of development from the previous version
GenomeScroller finally made it to
DAW Singapore! This live, dynamic, processing visualization of the human genome and the information cloud surrounding it, is now being displayed on a 7680x4320 video wall (at 40 fps, no less!) here at the
VALUE Lab Asia. It'll be scrolling its way to the end of Chr
omosome 13 for the next 10 days, or so, live tweeeting about more than 1000 genes and pushing more that 1 petapixel during the period (is this a record for a processing sketch?!). This is what it looks like:
If anyone is interested in following its progress at daw, you can follow the sketch
tweets on @Genomescroller.
I'd like to extend a big thank-you to Ben Fry, Casey Reas and the team of volunteers that develop processing and, of course, to everyone here on the forum for providing such useful help. We would never have been able to develop this without processing and would never have managed to push this many pixels at at a reasonable without the kind help of people on this forum.
Hi All I'm trying to learn how to use fragment shaders in process, but I can't get them to work as expected. Here is an example that takes an image as a texture and uses a fragment shader as a filter to swap the red and green channels... only it doesn't. It seems to replace the image with a slightly off-red fill and I have no idea why. What am I doing wrong?
PShader myShader;
PImage rtex;
Boolean customShader = false;
PGraphics pg;
void setup() {
size(1000, 600, OPENGL);
noSmooth();
rtex = loadImage("someimage.png");
myShader = loadShader("test.fs");
pg = createGraphics(1000, 600, OPENGL);
}
void draw() {
pg.beginDraw();
pg.image(rtex, 0, 0);
if (customShader) {
pg.filter(myShader);
}
pg.endDraw();
image(pg,0,0,width,height);
}
void mousePressed() {
customShader = !customShader;
}
And here is the shader code:
#define PROCESSING_TEXTURE_SHADER
uniform sampler2D textureSampler;
uniform vec2 pixel;
uniform vec2 resolution;
void main() {
vec2 position = gl_FragCoord.xy / resolution.xy;
vec4 current = texture2D(textureSampler, position);
I'm trying to figure out how to write to and draw from opengl pixel buffer objects in a processing sketch, but 1) I'm a complete novice to opengl coding and 2) my code is not working, but not failing catastrophically and producing a weird error. I'd really appreciate it if anyone can throw some light on this....
The source code is below. When I run it I get the not-particularly-informative error "OpenGL error 1282 at top endDraw(): invalid operation", the screen open and the sketch keeps running, but doesn't draw anything. I was hoping for a screen with a back bit on top and a red bit below...
import javax.media.opengl.GL2;
import java.nio.*;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
PGraphicsOpenGL pgl;
GL2 gl;
ByteBuffer bb;
int[] pboIds;
boolean buffReady;
void setup() {
size(300,300,OPENGL);
pgl = (PGraphicsOpenGL) g;
pboIds = new int[2];
buffReady = false;
}
void draw() {
println(frameCount);
background(0);
if (!buffReady) {
println("buffer not ready, building it now...");
gl = pgl.beginPGL().gl.getGL2();
//set the way the data is packed in and unpacked from memory - 1=byte alignment
I'm having a problem with a processing sketch not using the graphics hardware to run a sketch. The sketch is being run with Processing 2.0b8 with the P3D renderer which (I thought) used opengl by default to render the sketch. When I run the sketch and monitor the activity of my graphics card, however, it shows quite clearly that the card is doing no work at all, while the CPU is chugging hard.
Am I missing something really simple here? I though that one of the big advantages of using processing 2 was supposed to be default opengl usage without having to use any specific libraries, is that not correct?
I'm having some problems trying to get opengl to play nice with the eclipse processing plugin (which I got as per these instructions:
http://wiki.processing.org/w/Eclipse_Plug_In). The plugin installed fine, and I've imported my old sketchbook no problem, but it reported an error saying that the OpenGL.jar file was missing from the plugin library.
So I did some reading on here (and a few other places). I've put opengl.jar and gluegen-rt.jar in the 'libraries' directory int he sketch, and then added them to the Java Build Path (r-click on the base sketch folder, properties, Java Build Path', Libraries, Add Jars...). This deals with the original error but now I get a new error saying
"The import processing.opengl cannot be resolved"
Double-clicking the error opens the sketch java file and highlights the 'import processing.opengl.*;' line as the source of the error.
Has anyone got any idea what its complaining about?
I'm having problems playing movies with processing 1.2.1 and windows 7 Enterprise (64-bit). I posted about the problems trying to use jmcVideo here
https://forum.processing.org/topic/jmcvideo-error, thinking it was a problem with jmc video, but I've now tried several other methods of movie playback that have all failed at every turn:
The standard movie library reports that it can't find Quicktime, despite having 7.6.7 installed.
The latest GS movie reports a similar error of jmcvideo:
processing.app.debug.RunnerException: UnsatisfiedLinkError: can't load library libpixman-1-0 (libpixman-1-0|liblibpixman-1-0|liblibpixman-1-0-0) with -Djna.library.path=C:/Users/nick/Documents/Processing/libraries/GSVideo/library\gstreamer\win
So, as far as I can tell, there doesn't seem to be any way of playing any movies using processing on windows 7 64-bit. I usually develop on linux, so I'm not very familiar with debugging things in windows; maybe I'm missing something?
I'm running windows 7 enterprise (64 bit) with processing 1.2 and the 64bit java5 jdk. I have jmcVideo 1.2, javaFX 1.2, the relevant files (jmc.dll, jmc.jar, jmcvideo.jar) in my processing sketchbook libraries folder.
I can't find anything on the net or in previous discussions on this form that solves this problem. Any help, greatly appreciated!