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

Sokol fails to compile for SOKOL_GLES2 #54

Closed
breakin opened this issue Jun 19, 2018 · 5 comments
Closed

Sokol fails to compile for SOKOL_GLES2 #54

breakin opened this issue Jun 19, 2018 · 5 comments

Comments

@breakin
Copy link

breakin commented Jun 19, 2018

In the function _sg_create_context the line

SOKOL_ASSERT(0 == ctx->vao);

fails to compile when compiling with #define SOKOL_GLES2.

This is not surprising since we have

typedef struct {
    _sg_slot slot;
    #if !defined(SOKOL_GLES2)
    GLuint vao; 
    #endif
    GLuint default_framebuffer;
} _sg_context;

Should be an easy fix. Just a side question; this makes me feel that SOKOL_GLES3 is more tested. Are there maybe more issues related to vao for GLES2? Things seems to work and afaict the sokol-samples are compiled for GLES2...?

@floooh
Copy link
Owner

floooh commented Jun 19, 2018

Hmm, most of the HTML5 samples are compiled with SOKOL_GLES2, I'll have a look!

@breakin
Copy link
Author

breakin commented Jun 19, 2018

Good! If you can't reproduce I might be the problem here. Let me know if that is the case and I might be able to give you more information!

@floooh
Copy link
Owner

floooh commented Jun 19, 2018

argh ok... looks like I only ever compile the emscripten stuff in release mode, SOKOL_ASSERTs are removed in this case. Fix incoming (I also need to improve the TravisCI scripts to test more build configs)

@breakin
Copy link
Author

breakin commented Jun 19, 2018

Makes perfect sense! I've been compiling sokol_gfx without fips so I probably got other build settings.

@floooh floooh closed this as completed in 87910eb Jun 19, 2018
@floooh
Copy link
Owner

floooh commented Jun 19, 2018

Ok, this should be fixed now. Thanks for the bug report :)

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

No branches or pull requests

2 participants