Eliminate GLEW dependency
GL entrypoint resolution is now done manually. This has a couple immediate benefits, such as not having to retrieve hundreds of functions pointers that we'll never use. It's also nice to have an exact overview of all the entrypoints used by mkxp. This change allows mkxp to run fine with core contexts, not sure how relevant that is going to be in the future. What's noteworthy is that _all_ entrypoints, even the ones core in 1.1 and guaranteed to be in every libGL, are resolved dynamically. This has the added benefit of not having to link directly against libGL anymore, which also cleans up the output of `ldd` quite a bit (SDL2 loads most system deps dynamically at runtime). GL headers are still required at build time.
This commit is contained in:
parent
640b01e518
commit
6c481e5eb8
16 changed files with 470 additions and 272 deletions
src
|
@ -655,7 +655,7 @@ Color Bitmap::getPixel(int x, int y) const
|
|||
glState.viewport.pushSet(IntRect(0, 0, width(), height()));
|
||||
|
||||
uint8_t pixel[4];
|
||||
glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel);
|
||||
gl.ReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel);
|
||||
|
||||
glState.viewport.pop();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue