Skip to content

Transform feedback objects - #153

Merged
shrekshao merged 4 commits into
WebGLSamples:masterfrom
tsherif:xform-feedback-obj
Jun 10, 2017
Merged

shrekshao merged 4 commits into
WebGLSamples:masterfrom
tsherif:xform-feedback-obj

Conversation

@tsherif

@tsherif tsherif commented Jun 4, 2017

Copy link
Copy Markdown
Contributor

See the wiki entry here: https://www.khronos.org/opengl/wiki/Transform_Feedback#Feedback_objects

Transform feedback objects capture the state of TRANSFORM_FEEDBACK_BUFFER bindings, so when they are set up correctly, you don't have to bind the individual buffers (kind of like an output version of a VAO).

This update moves the setup of transform feedback objects for relevant samples into the parts of the code that set up VAOs, and then simply bind/unbind the transform feedback objects when drawing (rather than binding each individual output buffer).

@shrekshao

Copy link
Copy Markdown
Member

Thanks @tsherif. New stuff learnt. But there's a problem in current version's code: neither of xform seaparated 2 (particle system) and transform instanced sample work. Seems like buffer ping pong is wrong so the simulation stuck at the first frame? Will review in details later.

@tsherif

tsherif commented Jun 4, 2017

Copy link
Copy Markdown
Contributor Author

Hmm... they're both working for me in Firefox and Chrome on Ubuntu 16.04/Quadro M1000. I'll try it out on some of my other machines.

@tsherif

tsherif commented Jun 4, 2017

Copy link
Copy Markdown
Contributor Author

@shrekshao (cc:@kenrussell) This is an ANGLE bug. I saw the issue in both Firefox and Chrome on Windows, then when I disabled the ANGLE backend it worked fine in both. I'll put together a small example when I have some time and report.

@tsherif

tsherif commented Jun 5, 2017

Copy link
Copy Markdown
Contributor Author

@tsherif

tsherif commented Jun 6, 2017

Copy link
Copy Markdown
Contributor Author

@shrekshao I updated those two examples with workarounds for the ANGLE bug. I think it's worth having the samples structured around how things should work, with the workarounds clearly marked as such so they can be easily removed later. What do you think?

@shrekshao

Copy link
Copy Markdown
Member

@tsherif . Agree. Thanks for the great work. Will review later and merge.

@shrekshao
shrekshao merged commit 63ed7ca into WebGLSamples:master Jun 10, 2017
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.

2 participants