Repository navigation
Commit f9ce3a1
authored
[test] Fix WebGL errors in
`draw_gear` in `full_es2_sdlproc.c` was calling `glDrawElements` with
`GL_FLOAT` (an invalid index type in OpenGL ES 2.0 / WebGL) and passing
an integer vertex offset (`gear->strips[n].first`) as the client-side
`indices` pointer without a bound `GL_ELEMENT_ARRAY_BUFFER`.
Construct a valid `GLushort` index array for each strip and pass
`GL_UNSIGNED_SHORT` to `glDrawElements`, call `gears_reshape(300, 300)`
before `gears_draw()`, and assert `glGetError() == GL_NO_ERROR`. Also
remove the `-Wno-int-conversion` workaround from `test_fulles2_sdlproc`.full_es2_sdlproc.c (#27834)1 parent c0edf5b commit f9ce3a1
2 files changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
501 | | - | |
502 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
503 | 508 | | |
504 | 509 | | |
505 | 510 | | |
| |||
725 | 730 | | |
726 | 731 | | |
727 | 732 | | |
| 733 | + | |
728 | 734 | | |
| 735 | + | |
729 | 736 | | |
730 | 737 | | |
731 | 738 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1668 | 1668 | | |
1669 | 1669 | | |
1670 | 1670 | | |
1671 | | - | |
| 1671 | + | |
1672 | 1672 | | |
1673 | 1673 | | |
1674 | 1674 | | |
| |||
0 commit comments