mupen64plus / mupen64plus-video-glide64mk2

Video plugin for Mupen64Plus 2.0 based on 10th anniversary release code from gonetz
28 stars 37 forks source link

Use `GL_NUM_EXTENSIONS` and `glGetStringi` to check OpenGL extensions #126

Closed jgcodes2020 closed 1 year ago

jgcodes2020 commented 1 year ago

According to official documentation, glGetString(GL_EXTENSIONS) will return NULL. (link)

The officially supported method goes something like:

int numExtensions = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
for (int i = 0; i < numExtensions; i++) {
  const char* ext = (const char*) glGetStringi(GL_EXTENSIONS, i);
  // do something with ext
}

A similar issue for Rice has been posted here: https://github.com/mupen64plus/mupen64plus-video-rice/issues/109

richard42 commented 1 year ago

I believe that this documentation is referring to the Core (OpenGL 3.0) profile, whereas these video plugins are so old that they are still using the Compatibility (OpenGL 1.2) profile. So the current behavior is correct.