protected override void DoInitialize() { { // particleSimulator-fountain.comp is also OK. var shaderCode = new ShaderCode(File.ReadAllText(@"shaders\ParticleSimulatorRenderer\particleSimulator.comp"), ShaderType.ComputeShader); this.computeProgram = shaderCode.CreateProgram(); } { BufferPtr bufferPtr = this.positionBufferPtr; Texture texture = bufferPtr.DumpBufferTexture(OpenGL.GL_RGBA32F, autoDispose: false); texture.Initialize(); this.positionTexture = texture; } { BufferPtr bufferPtr = this.velocityBufferPtr; Texture texture = bufferPtr.DumpBufferTexture(OpenGL.GL_RGBA32F, autoDispose: false); texture.Initialize(); this.velocityTexture = texture; } { IndependentBufferPtr bufferPtr = null; using (var buffer = new UniformBuffer <vec4>(BufferUsage.DynamicCopy, noDataCopyed: true)) { buffer.Create(elementCount: 64); bufferPtr = buffer.GetBufferPtr(); } bufferPtr.Bind(); OpenGL.BindBufferBase((BindBufferBaseTarget)BufferTarget.UniformBuffer, 0, bufferPtr.BufferId); this.attractorBufferPtr = bufferPtr; bufferPtr.Unbind(); } }