C Code Instead of memcpy
you know, it’s a shame that C is designed by ISO/IEC JTC1/SC22/WG14 and not the OpenGL Architecture Review Board. i’m sure we’d all rather write: glDisable(GL_MASKING); glEnableClientState(GL_SOURCE_DATA_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, 0); glSourceDataPointer(1, gl::UNSIGNED_BYTE, 1, dst_ptr); glEnableClientState(GL_DESTINATION_DATA_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, 0); glDestinationDataPointer(1, gl::UNSIGNED_BYTE, 1, src_ptr); glCopyBytes(0, num_bytes); if (glGetError() != 0) { // fuck } rather than memcpy(dst_ptr, src_ptr, size);
The meme contrasts a simple C memcpy call with an absurdly overcomplicated fake OpenGL-style sequence for copying bytes. The joke mocks verbose graphics APIs and suggests that programmers would suffer through needless setup, state changes, and an error check instead of using the straightforward standard-library function. EN: The meme contrasts a simple C memcpy call with an absurdly overcomplicated fake OpenGL-style sequence for copying bytes. The joke mocks verbose graphics APIs and suggests that programmers would suffer through needless setup, state changes, and an error check instead of using the straightforward standard-library function.
anime girl avatar / аватарка с аниме-девушкойstar emoji / эмодзи звездыsocial media post / пост в социальной сетиdark gray background / тёмно-серый фонcode block / блок кодаmonospaced text / моноширинный текстC programming language / язык программирования COpenGL-style function calls / вызовы функций в стиле OpenGLmemcpy function / функция memcpysource pointer / указатель на источникdestination pointer / указатель назначенияerror check / проверка ошибки
- @ithueti / 8667 2023-01-20
- Type
- image
- Size
- 800×771 · 85.8 KiB
- Mood
- sarcastic, absurd
- Language
- en
- Added