Giter Club home page Giter Club logo

diwi / pixelflow Goto Github PK

View Code? Open in Web Editor NEW
1.2K 81.0 131.0 35.31 MB

A Processing/Java library for high performance GPU-Computing (GLSL). Fluid Simulation + SoftBody Dynamics + Optical Flow + Rendering + Image Processing + Particle Systems + Physics +...

Home Page: https://diwi.github.io/PixelFlow

License: MIT License

GLSL 13.57% Java 70.85% C 15.09% JavaScript 0.49%
glsl fluid-simulation cloth-simulation skylight processing-ide softbody-dynamics postprocessing opengl filters antialiasing

pixelflow's Introduction

PixelFlow Header

PixelFlow

A Processing/Java library for high performance GPU-Computing (GLSL).


Features

+ Fluid Simulation (GLSL)
    - Jos Stam, Real-Time Fluid Dynamics for Games
    - Particle Sytems
    - Flow Field Visualisation
    - Streamlines
    - ...
+ Flow Field Particles (GLSL)
    - Collision Detection, Particle <-> Particle
    - Collision Detection, Particle <-> Obstacle
    - Cohesion
    - Verlet Integration
    - FlowField/SDF(Signed Distance Field) based
    - Streamlines
    - ...
+ Softbody Dynamics (CPU, GLSL is coming)
    - 2D and 3D
    - Collision Detection
    - Cloth, Grids, Chains, Rigid Folding ...
    - Particle Systems
    - ...
+ Skylight Renderer (GLSL)
    - Interactive/Realtime Viewport Renderer
    - Ambient Occlusion
    - Diffuse Shading
    - ShadowMapping
    - ...
+ PostProcessing Filters (GLSL)
    - Box Blur
    - Binomial Blur
    - Gauss Blur
    - Gauss Blur Pyramid
    - Median
    - Bilateral Filter
    - Custom Convolution Kernel
    - DoG (Difference of Gaussian)
    - BackgroundSubtraction
    - Difference
    - Laplace
    - Sobel
    - Gamma Correction
    - Luminace
    - Thresholding
    - Harris Corner Detection
    - Optical Flow
    - Bloom
    - Depth of Field (DoF)
    - Liquid FX Filter
    - Summed Area Table (SAT)
    - Distance Transform (Jumpflood), Voronoi, Distance Map
    - Min/Max (global)
    - Min/Max (local)
    - Merge Shader
    - FlowField
    - Line Integral Convolution (LIC) / Streamlines
    - ...
+ AntiAliasing (GLSL)
    - MSAA (Processing Default)
    - FXAA
    - SMAA
    - GBAA/DEAA
+ Shadertoy (GLSL)
    - Wrapper for running existing Shadertoy sketches inside Processing.
+ Utils
    - HalfEdge
    - Subdivision Polyhedra
    - Sampling
    - GLSL-Shader PreProcessor (#define, #include)
    - GLSL-Shader Uniform Caching
    - ...

JavaDoc: http://thomasdiewald.com/processing/libraries/pixelflow/reference/index.html


Download


Videos / Examples / Demos / Applications

Skylight Renderer

alt text alt text alt text alt text alt text

Softbody Dynamics

alt text alt text alt text

Computational Fluid Dynamics

alt text alt text alt text alt text alt text alt text

Optical Flow

alt text alt text alt text

Flow Field Particle Simulation

alt text alt text alt text

Flow Field - LIC

alt text alt text

Realtime 2D Radiosity - Global Illumination (GI)

alt text alt text alt text alt text alt text alt text alt text

Space Syntax

alt text alt text alt text


More Videos on Vimeo.


Getting Started - Fluid Simulation

// FLUID SIMULATION EXAMPLE
import com.thomasdiewald.pixelflow.java.DwPixelFlow;
import com.thomasdiewald.pixelflow.java.fluid.DwFluid2D;

// fluid simulation
DwFluid2D fluid;

// render target
PGraphics2D pg_fluid;

public void setup() {
  size(800, 800, P2D);

  // library context
  DwPixelFlow context = new DwPixelFlow(this);

  // fluid simulation
  fluid = new DwFluid2D(context, width, height, 1);

  // some fluid parameters
  fluid.param.dissipation_velocity = 0.70f;
  fluid.param.dissipation_density  = 0.99f;

  // adding data to the fluid simulation
  fluid.addCallback_FluiData(new  DwFluid2D.FluidData() {
    public void update(DwFluid2D fluid) {
      if (mousePressed) {
        float px     = mouseX;
        float py     = height-mouseY;
        float vx     = (mouseX - pmouseX) * +15;
        float vy     = (mouseY - pmouseY) * -15;
        fluid.addVelocity(px, py, 14, vx, vy);
        fluid.addDensity (px, py, 20, 0.0f, 0.4f, 1.0f, 1.0f);
        fluid.addDensity (px, py, 8, 1.0f, 1.0f, 1.0f, 1.0f);
      }
    }
  });

  pg_fluid = (PGraphics2D) createGraphics(width, height, P2D);
}


public void draw() {    
  // update simulation
  fluid.update();

  // clear render target
  pg_fluid.beginDraw();
  pg_fluid.background(0);
  pg_fluid.endDraw();

  // render fluid stuff
  fluid.renderFluidTextures(pg_fluid, 0);

  // display
  image(pg_fluid, 0, 0);
}


Installation, Processing IDE

  • Download Processing 3

  • Install PixelFlow via the Library Manager.

  • Or manually, unzip and put the extracted PixelFlow folder into the libraries folder of your Processing sketches. Reference and examples are included in the PixelFlow folder.

  • Also make sure you have the latest graphics card driver installed!

Platforms

Windows, Linux, MacOSX


Dependencies, to run the examples


Processing/Java Alternatives

JRubyArt

JRubyArt is a ruby wrapper for processing by Martin Prout (monkstone)

pixelflow's People

Contributors

diwi avatar sciencewiz08 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pixelflow's Issues

Add "Video" by The Processing Foundation to README.md

Currently, the list of "Dependencies, to run the examples" lists

I'm not sure if Andres was once the original author or if this is a confusion with Syphon, but for people installing dependencies via Processing 3.2.1 Contribution Manager, they won't be able to find "processing-video-library" in their Libraries tab. Instead (or in addition), the dependency should be listed as:

  • Video, by The Processing Foundation.

Problem with Javax in Processing IDE

When you want run few sketches who used Javax, it's necessary to import it, but how it's possible in Processing IDE ? I find no track to do it...

Optical Flow examples not working on new Macbook Pro

seems to quietly crash the rendering, the sketch seems to keep running but no pixelflow visible.

PixelFlow v0.51 - http://www.thomasdiewald.com

OPENGL_VENDOR:         ATI Technologies Inc.
OPENGL_RENDERER:       AMD Radeon Pro 460 OpenGL Engine
OPENGL_VERSION:        4.1 ATI-1.50.38
GLSLVersionString:     #version 410 core
GLSLVersionNumber:     4.10.0
GLVersion:             4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) - 4.1 ATI-1.50.38
GLVendorVersionNumber: 1.50.38 (ATI-1.50.38)

Import Processing

May be is not necessary to write by default,

import processing.core.*;
import processing.opengl.PGraphics2D;

because when you open the example in Processing, Processing return an error message.

Plus may be remove all the part private public... of course that depend if you want a novice or advance users :)

Movie Fluid optical flow not working

Hi,

I'm trying to get the Pixelflow Movie Fluid sketch working on a 2013 Mac Pro. Whenever I run the sketch, my video plays, but the optical flow doesn't appear to be affecting the fluid. There's some slight blurring and smoothing going on in density mode, but the temperature, velocity, and pressure modes are either black or just the regular video. However, I am able to affect the fluid by clicking and dragging the mouse. When I run the sketch I get this in the console: "WARNING: Output of vertex shader 'line_domain' not read by fragment shader"

Here are the specs of the machine:
Mac Pro (Late 2013)
macOS Sierra v10.12.5
3.5 GHz 6-Core Intel Xeon ES
32 GB 1866 MHz DDR3
AMD FirePro D700 6144 MB

There's also this info that prints in the console when I run the sketch, if that's helpful:
OPENGL_VENDOR: ATI Technologies Inc.
OPENGL_RENDERER: AMD Radeon HD - FirePro D700 OpenGL Engine
OPENGL_VERSION: 4.1 ATI-1.51.8
GLSLVersionString: #version 410 core
GLSLVersionNumber: 4.10.0
GLVersion: 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) - 4.1 ATI-1.51.8
GLVendorVersionNumber: 1.51.8 (ATI-1.51.8)

Any ideas? Thanks!

OpticalFlow not working

Hey Thomas,

Excellent work on your library.

I've tried most of the examples you've provided and they all seem to work as expected, but for some reason OpticalFlow simply won't run, I've updated my drivers and made sure I don't have outdated dependencies. I have no clue as to why it won't work.

I get this error aswell:
The method addTemperatureTexture(DwFluid2D,DwOpticalFlow) from the type OpticalFlow_MovieFluid.MyFluidData is never used locally

This is what I get in my console:
opticalflow

changelog

Would you mind adding a changelog to every release? Just to keep us updated on what's new.
Thanks

Private Request on using PixelFlow in Graz

Hello Thomas couldn't reach you anywhere โ€“ There are not many processing users and supporters in Graz โ€“ maybe you'd like a meet-up too? Please excuse the unconventional way of attempting to reach you. I'm just a guy that admires your work (and past work at the TU)...

Experiencing glitches in OpticalFlow examples

Hey Thomas,

Excellent work on your library! ๐Ÿ‘

I've been trying out all the examples, looking good! ๐Ÿ˜„

I ran into some glitches in the OpticalFlow examples, leading to rectangles in the output (see screenshot below) and eventually preventing the sketch from functioning at all (the webcam image showed, but no optical flow). Luckily updating the drivers for my NVIDIA GeForce GTX 770 solved the problem and now everything is running smoothly!

But for future reference I thought I'd share this anyway, so if someone else runs into similar issues they know how to solve it: make sure to update your drivers!

glitch

a good way to customize colors

hey!

First, amazing stuff here! I was experimenting with the project and got stuck at customizing the colors of a ParticleSystem. What is a good way to do that?
I did see the PALLETTE variable here

Set OpenGL device for systems with integrated gpu

Hi,
PixelFlow uses my integrated GPU as default. Is there a way to change this?
`

PixelFlow v0.21

OPENGL_VENDOR:         Intel
OPENGL_RENDERER:       Intel(R) HD Graphics 530
OPENGL_VERSION:        4.4.0 - Build 20.19.15.4454
GLSLVersionString:     #version 440 core
GLSLVersionNumber:     4.40.0
GLVersion:             4.4 (Core profile, arb, compat[ES2, ES3], FBO, hardware) - 4.4.0 - Build 20.19.15.4454
GLVendorVersionNumber: 20.19.15 (- Build 20.19.15.4454)

`
I would like to use a NVIDIA GTX960M

2D radiosity

This is such amazing library. Lots of examples to learn from. Thanks a lot for this. Also, I was going through your website and noticed the 2D radiosity renderer that you've made. Would you be releasing that in the near future? I really would love to see the code behind that. :)

SMAA broken

Hi,

It seem that SMAA antialiasing is broken. I've tested both with 1.20 and 1.30.

In both the Simple_SMAA and AntiAliasingComparion examples it's just shows the "pixelated" result.

[-] PixelFlow v1.3.0 - www.thomasdiewald.com

[-] DEVICE ... Intel(R) Iris(TM) Graphics 6100
[-] GLSL ..... #version 410 core / 4.10.0
[-] GL ....... 4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) - 4.1 INTEL-10.25.17

LIC not working

The issue is limited to Line Integral Convolution (LIC) not showing anything. For example in example Fluid_Basic_LIC, I can only see UI when I run the sketch. As soon as I press "FF" button, I can see fluids moving around. Back to LIC, nothing. Same issue repeats in all LIC examples.
I am on MacOS version 10.14, Radeon Pro 575 4096 MB. Can anyone please help me get around this problem please?
Btw, amazing library, really great work !

Reference site down

It seems like the reference site is down. Is there still a reference available for this?

Reaction diffusion not working on Processing 3.5.3

I found that reaction diffusion does not work on Processing 3.5.3 (does not give errors in console, but it only shows blank white screen).

I recently updated Processing - when I open 3.3.7, reaction diffusion works fine - but with 3.5.3, it doesn't give any output. I guess any of

    // init
    tex_render = (PGraphics2D) createGraphics(width, height, P2D);
    tex_render.smooth(0);
    tex_render.beginDraw();
    tex_render.textureSampling(2);
    tex_render.blendMode(REPLACE);
    tex_render.clear();
    tex_render.noStroke();
    tex_render.background(0xFFFFFFFF);
    tex_render.fill      (0x0000FF00);
    tex_render.noStroke();
    tex_render.rectMode(CENTER);
    tex_render.rect(width/2, height/2, 20, 20);
    tex_render.endDraw();

this is not applied to the buffer at all.

pixelflow particles inconsitency, "brownian" motion

hi there.

i'm running the flowfieldparticles_opticalflow capture example completely unedited on 2 different computers

both computers are running processing 3.4 64 bit,
glsl version 4.60.0
nvidia driver 397.64
Open pixel flow version 1.3.0 installed from add library menu.
both using same USB webcam

the difference is one is a laptop with 980m and one is a desktop with gtx1080.
the desktop is windows OS build 17134.165
the laptop is windows OS build 17134.165

the laptop runs well, but the when i run it on the dekstop the simulation quickly deteriorates into chaotic "brownian" motion. where as the laptop version settles nicely with no action on the camera, and forms nice waves on action.

now the REAL weird thing is the example used to run well on the desktop, i'm not sure what had changed that would break it, possibly a windows update? my windows version on the desktop with the issue is
"Feature update to Windows 10, version 1803"
but the laptop is W10 version 1803 as well

already reinstalled . processing, opf library, video library, gpu driver.

any suggestions of other things i could check would be very much appreciated.

EDIT: upon further inspection of the motion, the desktop particles are taking velocity from optical flow but not colliding with other particles, this means that each particle keeps its own trajectory without influence from the ones around it.

EDIT2: tried on 3rd PC, desktop ,
identical zotac gtx1080
graphics driver 398.11
fresh install processing 3.4
fresh install of libraries from add library (opf 1.3.0)
glsl 4.60.0
same USB webcam
windows version 1803
Windows OS build 17134.112
3rd PC worked well, properly formed waves. updated desktop with issue to 398.11 to attempt to match that config , still experiencing Brownian motion. is it possible that the difference is windows OS build is causing the issue?

EDIT 3 FIXED:
updated to latest driver 398.82 and it worked.
this to me implies that when windows updated from build .112 to .165 they broke compatibility with nvidia gpu driver 398.11 and earlier.
the reason i didnt try that first was because it was working fine on the other computers with the older gpu driver version numbers so i wanted to try those first for consistency.
i hope this info can be useful to someone,
Thomas, sorry for cross-posting this issue as a comment on your open-processing and vimeo
but i was kind of mind-boggled.

properly formed waves on laptop

opfgood

brownian motion from desktop
opfbad

info from processing console on desktop

desktopinfo

Skylight_Poisson Example not compiling

PixelFlow v0.51 - http://www.thomasdiewald.com

OPENGL_VENDOR:         ATI Technologies Inc.
OPENGL_RENDERER:       AMD Radeon Pro 460 OpenGL Engine
OPENGL_VERSION:        4.1 ATI-1.50.38
GLSLVersionString:     #version 410 core
GLSLVersionNumber:     4.10.0
GLVersion:             4.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware) - 4.1 ATI-1.50.38
GLVendorVersionNumber: 1.50.38 (ATI-1.50.38)

poisson samples: 181
null (/com/thomasdiewald/pixelflow/glsl/antialiasing/SMAA/smaa1_edges.vert)
ERROR: 0:306: '' : syntax error: incorrect preprocessor directive
ERROR: 0:306: '' : syntax error: unexpected tokens following #if preprocessor directive - expected a newline
ERROR: 0:510: '' : syntax error: incorrect preprocessor directive
ERROR: 0:510: '' : syntax error: unexpected tokens following #if preprocessor directive - expected a newline
ERROR: 0:524: '' : syntax error: incorrect preprocessor directive
ERROR: 0:524: '' : syntax error: unexpected tokens following #if preprocessor directive - expected a newline
ERROR: 0:525: 'SamplerState' : syntax error: syntax error
RROR: 0:525: 'SamplerState' : syntax error: syntax error

ERROR: One or more attached shaders not successfully compiled
/com/thomasdiewald/pixelflow/glsl/antialiasing/SMAA/smaa1_edges.vert//com/thomasdiewald/pixelflow/glsl/antialiasing/SMAA/smaa1_edges.frag: uniform location "wh_rcp" = -1

null (/com/thomasdiewald/pixelflow/glsl/antialiasing/SMAA/smaa2_blend.frag)
ERROR: 0:306: '' : syntax error: incorrect preprocessor directive
ERROR: 0:306: '' : syntax error: unexpected tokens following #if preprocessor directive - expected a newline
ERROR: 0:510: '' : syntax error: incorrect preprocessor directive
ERROR: 0:510: '' : syntax error: unexpected tokens following #if preprocessor directive - expected a newline
ERROR: 0:524: '' : syntax error: incorrect preprocessor directive
ERROR: 0:524: '' : syntax error: unexpected tokens following #if preprocessor directive - expected a newline
ERROR: 0:525: 'SamplerState' : syntax error: syntax error

Spout - Fluid density

Trying to get this to work with the Movie and Still example....
Hi just wondering you could point me in the right direction so I can read a Spout sender and use the receiver as input for Fluid density etc?

Can you create a soft body from an imported stl ??

Hi I have been trying to use the library for softbody simulations and i was wondering if it was possible to create custom softbodies from triangle meshes or do they have to be either a cloth/sphere/cube

Thanks

Math

Collision

Hi dude,
This rules.Do you think it would be possible to load a .png with alpha as a collision object?
Or even have a input luminance or alpha from a video as a collision object as well?

Android campatible (WindTunnel)

The library is very useful. I think if we can use pixelflow library in android device will more useful.
I use WindTunnel example.
capture366

1. ERROR in C:\Users\AppData\Local\Temp\android4724942770669103924sketch\app\src\main\java\processing\test (at line 1137)
	context.begin();
	^^^^^^^^^^^^^^^
The type com.jogamp.opengl.GL2ES2 cannot be resolved. It is indirectly referenced from required .class files
----------
2. ERROR in C:\Users\AppData\Local\Temp\android4724942770669103924sketch\app\src\main\java\processing\test (at line 1137)
	context.begin();
	        ^^^^^
The method begin() from the type DwPixelFlow refers to the missing type GL2ES2
----------
3. ERROR in C:\Users\AppData\Local\Temp\android4724942770669103924sketch\app\src\main\java\processing\test (at line 1159)
	context.begin();
	        ^^^^^
The method begin() from the type DwPixelFlow refers to the missing type GL2ES2
----------
3 problems (3 errors)
 FAILED

FAILURE: Build failed with an exception.

Thanks in advance.

Read optical flow vectors

Hi,
I want to calculate the average optical flow in an area of my camera feed.
Is it possible to access the velocity vector of a certain pixel?
opticalflow.getVelocity() throws a null pointer exeption when I try to print one element of the float[] to console.

FlowField particles not working

Hey one of the earlier updates to this broke the flowfield particles on MacOS. Nothing shows up in the examples. Here's the error i get in Processing:

null (/com/thomasdiewald/pixelflow/glsl/FlowFieldParticles/particles_display_points.glsl) ERROR: 0:59: '{' : syntax error: syntax error

Seems like vec4 uniform arrays aren't compatible on MacOS

Android Support

Cool library.
Couldn't make it work on Android unfortunately (App crashes immediately when run with Processing Android Mode).
Any suggestions about what has to be made to make it compatible with Android?

fluid.getVelocity(float[] dir,int x,int y,int w ,int h), buffer too small

I'm trying to lower the CPU load per frame by only transferring a vertical strip of the velocity map each game frame with arrayCopy, so with 16 sections maybe it takes 16 frames to completely refresh but no part of the full CPU map goes too far behind the GPU map and significantly less load.

fluidMapSection= fluid.getVelocity(fluidMapSection,0, 0, width, height);
Works fine for full frames, but if width or height are changed to anything less than the fluid frame size, I get the error

DwGLTexture.getData_GL2GL3: buffer to small 512000 < 2048000,

where 512000 is the number of pixels in the strip section * 2 and 2048000 is the fluid's width * height * 2. So even if I ask for a smaller section than the total size, it resizes my buffer to the correct size but errors trying to fill it with an entire frames worth of data.

It is also not clear to me why it needs to be passed the buffer as well as be set equal to the buffer instead of just one or the other.

Also is there a way to perhaps resize on the gpu before returning the velocity float list, so it could be smaller, faster, lower resolution, without affecting the fluid simulation with fluid.resize?

Help!

Hello,
i need help. Is there someone that has a reference for this library?
TNX

OpticalFlow_MovieFluid not working

hey,

I have a problem with OpticalFlow_MovieFluid, after pressing Run in Processing, a new window opens and is immediately closed. This happens on my windows7 64bit computer. Every other example in optical flow works fine. The console says:

[-] PixelFlow v1.20 - www.thomasdiewald.com

[-] DEVICE ... AMD Radeon R9 200 / HD 7900 Series
[-] GLSL ..... #version 450 core / 4.50.0
[-] GL ....... 4.5 (Core profile, arb, compat[ES2, ES3, ES31], FBO, hardware) - 4.5.13506 Core Profile Context 23.20.15002.11

And I get one Error:

The method addTemperatureTexture(DwFluid2D fluid, DwOpticalFlow opticalflow) from the type OpticalFlow_MovieFluid.MyFluidData is never used locally.

I have updated my graphics driver and I'm using PixelFlow 1.20. In the original code I changed your pulp Fiction video with my own.

Hope this helps

Using on Raspberry Pi (is it a dead end?)

Hello,

I'm trying to run a processing sketch on a Raspberry Pi 3b, but I get this error:

glGetError 0x500
DwGLTexture.resize tex | GL_ERROR: invalid enumerant
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
WARNING: DwGLFrameBuffer.bind(...) number of textures exceeds max limit: 1 > 0
com.jogamp.opengl.GLException: array offset argument "bufs_offset" (0) equals or exceeds array length (0)
        at jogamp.opengl.es3.GLES3Impl.glDrawBuffers(GLES3Impl.java:3212)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLFrameBuffer.bind(Unknown Source)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLFrameBuffer.clearTexture(Unknown Source)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLTexture.clear(Unknown Source)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLTexture.clear(Unknown Source)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLTexture$TexturePingPong.clear(Unknown Source)
        at com.thomasdiewald.pixelflow.java.fluid.DwFluid2D.clearTextures(Unknown Source)
        at com.thomasdiewald.pixelflow.java.fluid.DwFluid2D.reset(Unknown Source)
        at com.thomasdiewald.pixelflow.java.fluid.DwFluid2D.resize(Unknown Source)
        at com.thomasdiewald.pixelflow.java.fluid.DwFluid2D.<init>(Unknown Source)
        at fluid.setup(fluid.java:144)
        at processing.core.PApplet.handleDraw(PApplet.java:2401)
        at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
        at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
        at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
        at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
        at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
        at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
        at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
        at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

This is using the Legacy OpenGL driver, not the "Fake KMS" or "Full KMS" one (those fail for other reasons).

Not sure if the above error is because Pixelflow/Java assumes it is using GLES3, but the RPi only supports GLES2. And that's the reason it fails?

at jogamp.opengl.es3.GLES3Impl.glDrawBuffers(GLES3Impl.java:3212)

The actual code where it gets the max_draw_buffers has an if statement to check if its GLES3 or not:

public void allocate(GL2ES2 gl){
if(!isFBO()){
this.gl = gl;
if(gl.isGL3()){
this.gl3 = gl.getGL3();
}
gl.glGenFramebuffers(1, HANDLE_fbo, 0);
int[] buf = new int[1];
// gl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, buf, 0);
// max_color_attachments = buf[0];
gl.glGetIntegerv(GL2.GL_MAX_DRAW_BUFFERS, buf, 0);
max_draw_buffers = buf[0];
// max_bind = Math.min(max_draw_buffers, max_color_attachments);
// max_bind = max_draw_buffers;
}
}

Anyway, I'm no OpenGL expert, so I don't know if there's no point in even running Pixelflow on a Raspberry Pi. Or if this is just some bug?

Rigid Origami Examples

Fantastic work. Any chance we'll get to see a Rigid Origami (e.g. RonResch_Tri) in the examples?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.