1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef BT_SOFT_BODY_SOLVER_OUTPUT_CL_TO_GL_H
- #define BT_SOFT_BODY_SOLVER_OUTPUT_CL_TO_GL_H
- #include "btSoftBodySolver_OpenCL.h"
- class btSoftBodySolverOutputCLtoGL : public btSoftBodySolverOutput
- {
- protected:
- cl_command_queue m_cqCommandQue;
- cl_context m_cxMainContext;
- CLFunctions clFunctions;
-
- cl_kernel outputToVertexArrayWithNormalsKernel;
- cl_kernel outputToVertexArrayWithoutNormalsKernel;
- bool m_shadersInitialized;
-
- virtual bool checkInitialized();
- virtual bool buildShaders();
- void releaseKernels();
- public:
- btSoftBodySolverOutputCLtoGL(cl_command_queue cqCommandQue, cl_context cxMainContext) :
- m_cqCommandQue( cqCommandQue ),
- m_cxMainContext( cxMainContext ),
- clFunctions(cqCommandQue, cxMainContext),
- outputToVertexArrayWithNormalsKernel( 0 ),
- outputToVertexArrayWithoutNormalsKernel( 0 ),
- m_shadersInitialized( false )
- {
- }
- virtual ~btSoftBodySolverOutputCLtoGL()
- {
- releaseKernels();
- }
-
- virtual void copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer );
- };
- #endif
|