Kode / Kha

Ultra-portable, high performance, open source multimedia framework.
http://kha.tech
zlib License
1.48k stars 174 forks source link

Minor webgl fixes #1418

Closed RblSb closed 2 years ago

RblSb commented 2 years ago
  1. Do not push clear command at the end of frame if browser is not ie
  2. Remove bufferIndex + 1 to fully fill vertex buffers
  3. If Vertex buffer is full, use bufferData instead of bufferSubData (should not have negative efffects, i hope)

More testing is better here, i just publish it to not to forget about

RblSb commented 2 years ago

I think most of that bufferIndex + 1 checks miss the opportunity to add last object to the buffer to fill it, if i dont miss some idea about it. Its only useful to fix for bunnymark stresstests anyway, so i'm not that curious.

RobDangerous commented 2 years ago

We should really never use bufferData unless we are on Safari.

RblSb commented 2 years ago

Yea, i guess that check is not related to gl buffer size to use bufferData anyway. Do you think that if (ie && SystemImpl.gl != null) change is ok or better to skip?

RobDangerous commented 2 years ago

That's ok. With IE being less and less important it's good to make all IE fixes actual ie-only affairs.

RblSb commented 2 years ago

Don't want to remove + 1 from size checks for now, too much responsibility. I hope you know where is squash button.

RobDangerous commented 2 years ago

I'm a history-fan, I never squash.