Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Physics using OpenCL?  (Read 898 times)
0 Members and 1 Guest are viewing this topic.
Offline ags1

JGO Ninja


Medals: 46
Projects: 2
Exp: 5 years


Make code not war!


« Posted 2013-02-27 17:15:55 »

I see AMD has produced a a very cool Tress FX API for physics based hair, that uses DirectCompute.

Which got me thinking that surely OpenCL could be used for physics calculations. Has anyone already built a library to do this?

EDIT: A quick google shows AMD demoed something like this back in 2009, but obviously that got shelved...

EDIT: Ah...

http://bulletphysics.org/wordpress/?p=340

Offline Spasi
« Reply #1 - Posted 2013-02-27 17:56:39 »

OpenCL can be used for anything really, but interop with OpenGL is still problematic. Sharing buffers is easy enough, but when it's time to synchronize CL computation with GL rendering, we're forced to use clFinish/glFinish, sacrificing performance. It's been almost 3 years and no vendor supports ARB_cl_event or KHR_gl_event yet.

ARB_compute_shader, which is compute via OpenGL/GLSL, might be a more approachable (and obviously less powerful) solution. There are no synchronization issues and you won't have to learn another API. Only Nvidia supports this currently but we should see support from other vendors soon. Unfortunately the spec has bumped the required GL version to 4.2 (was 3.0 originally), so hardware support will be limited.
Offline ags1

JGO Ninja


Medals: 46
Projects: 2
Exp: 5 years


Make code not war!


« Reply #2 - Posted 2013-02-27 19:48:05 »

Very informative, thanks.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline deepthought
« Reply #3 - Posted 2013-03-02 21:45:39 »

Use it for skeletal animation or morph targets. Performance problems caused by cl/glfinish are moot because you have to transform your vertices before you can render them anyways.

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline theagentd
« Reply #4 - Posted 2013-03-02 22:08:32 »

Performance problems caused by cl/glfinish are moot because you have to transform your vertices before you can render them anyways.
How does that matter?

Myomyomyo.
Offline ags1

JGO Ninja


Medals: 46
Projects: 2
Exp: 5 years


Make code not war!


« Reply #5 - Posted 2013-03-05 22:15:22 »

Since when did I become senior member??? If only my programming skills would increase as steadily as my forum ranking  Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (22 views)
2014-07-24 01:59:36

Riven (20 views)
2014-07-23 21:16:32

Riven (17 views)
2014-07-23 21:07:15

Riven (20 views)
2014-07-23 20:56:16

ctomni231 (48 views)
2014-07-18 06:55:21

Zero Volt (44 views)
2014-07-17 23:47:54

danieldean (35 views)
2014-07-17 23:41:23

MustardPeter (38 views)
2014-07-16 23:30:00

Cero (53 views)
2014-07-16 00:42:17

Riven (52 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!