This is the initial code of flex1.2 doc, I change the initial position, and I add gravity, set the initial speed, and activate 100 particles, which is a very simple start, running, the 970 graphics card does not respond to 5 seconds, the print particle position result is 0, I include cuda8.044, in win7,64.
This is the initial code of flex1.2 doc, I change the initial position, and I add gravity, set the initial speed, and activate 100 particles, which is a very simple start, running, the 970 graphics card does not respond to 5 seconds, the print particle position result is 0, I include cuda8.044, in win7,64.
include
include
include
include
define _CRT_SECURE_NO_WARNINGS
include
include <../core/types.h>
include <../core/maths.h>
struct float4 { float a; float b; float c; float d; }; struct float3 { float a; float b; float c; };
void RenderParticles(float4 particles, float3 velocities, int* phases){ printf("%f,%f,%f\n..", particles[0].a, particles[0].b, particles[0].c); }
int main() { int n =100; NvFlexLibrary* library = NvFlexInit(); // create new solver NvFlexSolverDesc solverDesc; NvFlexSetSolverDescDefaults(&solverDesc); solverDesc.maxParticles = n; solverDesc.maxDiffuseParticles = 0;
}
Thank you very much for your suggestions. I am looking forward to your any help. Pay tribute to the great NVIDIA thinks!