Running sketch GPU accelerated


I am trying to run a processing sketch GPU accelerated but can't make it work. (from the Processing IDE)

I am on a Windows7 laptop with a GeForce GT630M Graphics card. This card switches from the graphic chip onboard to the card when needed or defined.

I tried to explicitly set two processes to use the graphics card in its settings.


/[myProcessingDir]/java/bin/java.exe /[myProcessingDir]/java/bin/javaw.exe

but that doesn't seem to activate the graphics card (the taskbar always shows that only the graphics chip onboard is activated)

I don't know if I am missing something like to declare another process or if it would only activate the graphics card when using e.g. shaders or something.

I use some heavy calculation in the setup function and would like to accelerate that.



  • edited February 11 Answer ✓

    You can use P2D or P3D in the size command to get processing to use opengl for graphics.

    But getting the card to just do general calculations is another thing, it requires specialised code for that. See opengl or cuda.

  • typo 8(

    there is a glsl-enabled library, pixelflow, but it's kind of specialised.

  • I do use P3D in the size command, I thought that this might be enough to kick in my graphics card.

    So what I understand from your comments is that it is kind of normal that Processing, per se, only use the graphic chip and if I want GPU accelerated computation I would have to use a special library which can shift calculations to the GPU.

    I should probably update my graphics drivers as well because I rolled them back to factory versions some time ago.

    Thank you for your answers.

  • If you want to speed things up you have to show a lot more. Then we might can help by speeding things up.

  • @clankill3r This wasn't a question about code optimization or algorithm enhancement but thanks for the proposal. If I have a question about that I would open another discussion.

Sign In or Register to comment.