Skip to content

Commit

Permalink
Apply to GPGPU point select
Browse files Browse the repository at this point in the history
  • Loading branch information
at-wat committed Nov 20, 2024
1 parent 3a93d1b commit 24d9ec7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,11 @@ func (pe *pcdeditor) runImpl(ctx context.Context) error {
gl.BindBufferBase(gl.TRANSFORM_FEEDBACK_BUFFER, 0, selectResultBuf)
gl.Enable(gl.RASTERIZER_DISCARD)
gl.BeginTransformFeedback(gl.POINTS)
gl.DrawArrays(gl.POINTS, 0, pp.Points-1)
for i, j := 0, 0; i < pp.Points; i, j = i+maxDrawArraysPoints, j+1 {
gl.DrawArrays(gl.POINTS, i, min(pp.Points-i, maxDrawArraysPoints)-1)
}
gl.EndTransformFeedback()

gl.Disable(gl.RASTERIZER_DISCARD)
gl.BindBufferBase(gl.TRANSFORM_FEEDBACK_BUFFER, 0, webgl.Buffer(js.Null()))

Expand Down

0 comments on commit 24d9ec7

Please sign in to comment.