4 ms·
But still, just one page of code? Ideally, drawing a quad should be a one-liner.
by continuational 10y ago
But still, just one page of code? Ideally, drawing a quad should be a one-liner.
- vvanders 10y agoIf you want to use a higher-level framework then one-liner might make sense. For OpenGL you want control over state changes, uniforms and a slew of other things. Otherwise your performance/control will suffer significantly. Look at the things I listed there, that's the bare minimum you need to do the above, and fitting that in one page is pretty impressive.
- kbutler 10y agoOpenGL is set up to optimize for all those things, instead of optimizing for the learner/simple case. It's definitely a valid approach, but it means for simple cases, you're copy & pasting a lot of boilerplate for performance, control, and a slew of other things you don't need. You have to learn/paste a lot before you get a little reward.
- kvark 10y agoThere is also kiss3d for some higher-level rendering: https://github.com/sebcrozet/kiss3d/blob/master/examples/cube.rs https://github.com/sebcrozet/kiss3d/blob/master/examples/cub...