Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: gl33 example #31

Merged
merged 1 commit into from
Aug 13, 2024
Merged

fix: gl33 example #31

merged 1 commit into from
Aug 13, 2024

Conversation

lesleyrs
Copy link
Contributor

Added define to fix example on windows, also the windows.h defines can be removed in the example altogether but RGFW_NO_GL_HEADER is broken right now if you include glad2 with debug after rgfw without it.

This function is the only remaining problem if you want to remove the windows.h in example: u8* RGFW_getMaxGLVersion(void).

@ColleagueRiley
Copy link
Owner

RGFW_NO_GL_HEADER was designed for another platform I think. I'm pretty sure it won't work with Windows because of WGL.

In retrospect, RGFW_getMaxGLVersion should be removed from RGFW, there's no reason for it to be there.

@ColleagueRiley ColleagueRiley merged commit 93b13ab into ColleagueRiley:main Aug 13, 2024
4 of 5 checks passed
@ColleagueRiley
Copy link
Owner

c037c44 removes RGFW_getMaxGLVersion

@lesleyrs
Copy link
Contributor Author

lesleyrs commented Aug 13, 2024

RGFW_NO_GL_HEADER was designed for another platform I think. I'm pretty sure it won't work with Windows because of WGL.

fwiw this seems to work in gl33.c on windows now and shows the rectangle:

#ifdef __APPLE__
#define GL_SILENCE_DEPRECATION
#endif

#define RGFW_ALLOC_DROPFILES
#define RGFW_IMPLEMENTATION
#define RGFW_PRINT_ERRORS
#define RGFW_NO_GL_HEADER
#include <RGFW.h>

#ifndef __EMSCRIPTEN__
#define GLAD_GL_IMPLEMENTATION
#include "gl_debug.h"
#else
#include <GLES3/gl3.h>
#endif
...
      if (!gladLoadGL((GLADloadfunc)RGFW_getProcAddress))
        {
          printf("Failed to initialize GLAD\n");
          return -1;
        }

thanks

@ColleagueRiley
Copy link
Owner

Cool! Maybe I was misremembering something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants