Skip to content

Conversation

@syurkevi
Copy link
Contributor

@syurkevi syurkevi commented Dec 9, 2015

Addresses issue #1144
Needs fixes to collision code. Problems with indexing...
Should simulation speed be based on timestep instead of framerate?

@9prady9
Copy link
Member

9prady9 commented Dec 9, 2015

@umar456 Yes, convolution with Gaussian is separable, we just need to split the 2d kernel into two separate 1d kernels. @syurkevi Can you try splitting them.

@pavanky pavanky added this to the 3.3.0 milestone Dec 11, 2015
@pavanky
Copy link
Member

pavanky commented Dec 21, 2015

@syurkevi Can you also remove the #ifdef for the windows at the end? We realized that we no longer need it and fixed in the hotfixes branch. We fixed for the remaining examples and since this is a new one it is best not to include it at all.

9prady9 added a commit that referenced this pull request Dec 28, 2015
@9prady9 9prady9 merged commit c62eea0 into arrayfire:devel Dec 28, 2015
@unknowazrael
Copy link

@pavanky Can I ask you some other questions? I want to replace the graphics into openGL. But I meet problems.
1.How can I get the elements from the array? I currently use like this
image
but I could not free memory (if I add "delete[] host_a", then)
image
2.What is the right way to do arrayfire+openGL? If I do this every frame
image
will it spend much time to copy an array on the device to the host?

@9prady9
Copy link
Member

9prady9 commented Dec 30, 2015

@unknowazrael What do you mean by arrayfire+opengl ?

They are following possible ways to do opengl graphics with arrayfire:

  • Use arrayfire graphics functionality, which is not currently extensive but good for simple debugging.
  • Use arrayfire with your own opengl
    • via CPU - you don't need anything special but it would be slower than interop option.
    • using opengl interop
      • cpu/cuda backend, you can use current release 3.2.1
      • opencl backend, you would need current devel(beta) build of arrayfire

@unknowazrael
Copy link

@9prady9
Use arrayfire with your own opengl
using opengl interop
cpu/cuda backend, you can use current release 3.2.1

Now I use 3.2.1. May I ask how to using opengl interop? Is there an example?

@9prady9
Copy link
Member

9prady9 commented Dec 30, 2015

@unknowazrael

  • We have CUDA-Interop example code in our github, but i believe this has been written when ArrayFire was v2., which is not API compatible with current stable release, v3.. However, the set of operations you would need to do for OpenGL interoperation with CUDA backend can be understood from this code.
  • As far as CPU backend goes, you just need to use the functions you pointed out earlier: host<T> and then copy it into OpenGL buffer for rendering.

@pavanky
Copy link
Member

pavanky commented Dec 30, 2015

@unknowazrael @9prady9 This is getting off topic, can you either create a new issue or discuss this on our gitter chat room?

@unknowazrael
Copy link

@pavanky Sorry, I have a problem.

How to design collision between particle and particle like this
http://stackoverflow.com/questions/2481479/2d-colliding-n-body-simulation-fast-collision-detection-for-large-number-of-bal

@pavanky
Copy link
Member

pavanky commented Mar 21, 2016

@unknowazrael We can't help you write the code. The example should provide you as a starting point to do what you are looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants