dav1dde / glad-web Goto Github PK
View Code? Open in Web Editor NEWWebinterface for glad -> https://github.com/Dav1dde/glad
Home Page: http://glad.dav1d.de/
Webinterface for glad -> https://github.com/Dav1dde/glad
Home Page: http://glad.dav1d.de/
According to the spec, glMapBuffer
should be supported by OpenGL ES2. When generating the header, however, it is not included. Could you tell me what I am doing wrong?
To generate the files, I have used the web service with these settings:
--profile="compatibility" --api="gles2=3.2" --generator="c" --spec="gl"
, and included all the extensions.
~Paul
Hi,
I'm trying to set up my build system so that others can easily build my project. Is there a way to get a permanent link for a given configuration?
Thanks
Rust as a programming language is growing rapidly. It would be nice if there way a way to be able to Add all versions of OpenGL in glad to rust. By Far glad is perfect for my needs for the Intel GM45 that is in my Inspiron 1545 that actually does not crash on me when I compile. I know of a few games that uses OpenGL newer than 2.1 that causes the crash. Otherwise good work on being able to select version 2.1 on the website that suits my needs.
When I recieve the zip, Make complains about clock skew detected. After looking at the files I dropped off, it says the data was last done in 2021.
Modifying the date with touch *.h glad.c
fixes this issue.
Note: this could be a problem with glad, not glad-web
BTW, i want to embedding glad source code in to my app. Like glfw
, I fetch is use cmake FeachContent
from git repo, compile and link locally.
GET
SET
.found this private function in emscripten, and it works.
#if defined(__EMSCRIPTEN__)
extern void* emscripten_GetProcAddress(const char *name_);
#endif
src/glad.c:1698:25: error: ISO C forbids conversion of object pointer to function pointer type [-Werror=pedantic] glad_glGetnHistogram = (PFNGLGETNHISTOGRAMPROC)load("glGetnHistogram"); ^
src/glad.c:1700:26: error: ISO C forbids conversion of object pointer to function pointer type [-Werror=pedantic] glad_glTextureBarrier = (PFNGLTEXTUREBARRIERPROC)load("glTextureBarrier"); ^
Changing the code to this
1698 glad_glGetnHistogram = (PFNGLGETNHISTOGRAMPROC)load("glGetnHistogram");
1699 *(void**) (&glad_glGetnMinmax) = load("glGetnMinmax");
1700 glad_glTextureBarrier = (PFNGLTEXTUREBARRIERPROC)load("glTextureBarrier");
based on an stackoverflow comment eliminates the issue.
I know there is a closed issue for this that essentially recommends not using glad on emscripten ("no loader needed"), but the best thing about glad is that the headers are the same and found in the same place across all platforms. It would be awesome if glad supports emscripten through the same API as all other platforms. Besides, the glad API has other functions, not only dynamic function lookup.
Hi,
As far as I can tell, glad-web doesn't expose options --local-files
and --omit-khrplatform
.
Is there a reason why?
Thank you!
Hello, thank you for glad and this web frontend!
For build scripts it would be nice to have a URL from which to download the correct glad version instead of including the generated code in the project's repository. Right now, non-interactive use would require a script to send a post request and get the proper URL from there, which is not hard, but a lot less comfortable than just generating a URL which could then be used e.g. in CMake's ExternalProject_Add directive.
You already support "Permalinks" to pre-fill the form, like this one:
http://glad.dav1d.de/#profile=core&specification=gl&api=gl%3D3.3&api=gles1%3Dnone&api=gles2%3Dnone&api=glsc2%3Dnone&language=c&loader=on
Would you be willing to support a similar url that would directly lead to the zip file?
There's a huge number of possible configurations for glad, so I understand that you cannot persistently host all combinations. Generating the zip files on the fly and caching them should be alright though.
I attempted to do it myself but the README is not sufficiently detailed enough for someone who is not familiar with Python web development like myself and I don't want to invest the time to learn it because it would be a one-off thing for me...
Alternatively, I could make a PR "blind" containing the changes and then you could test it etc... But the necessary changes seem to be quite trivial, probably a half an hour job anyway...
Using the web service I noticed you have to choose between OpenGL, EGL, WGL, GLX to add extensions to the list, when you change the Specification, the list is reseted.
It would be great to be able to add OpenGL extensions together with, for example, WGL extensions.
See: Dav1dde/glad#53
Web-interface returns a 500 Internal Server Error while attempting to use GLES2 versions 3.0, 3.1 or 3.2.
When I look in the files generated by GLAD web, I see the line:
Omit khrplatform: False
glad.c also always has:
#include <KHR/khrplatform.h>
As far as I can tell I don't need this file, I certainly don't use it. Every time I emit GLAD I manually delete the "#include khrplatform" line.
The line in the header comments implies that GLAD has the ability to omit the khrplatform include. Could this ability be exposed in the web interface? I see no such button currently.
Redirect to a page where you have the choice of downloading specific files individually or a complete zip.
Depending on a configuration make it possible to keep this page permanently, either store the glad options associated with the page or the generated files.
Hello,
the option mx global causes an error.
Error:
Invalid option 'MX_GLOBAL'
Also the user experience on the website is rather ..., it looses inputs if an error is raised. I tested it a little bit, selecting debug and mx, -> everything gets lost. Happens also with mx global.
Error:
option MX can not be used together with DEBUG
Maybe the UI should show the user which inputs are valid, before he clicks generate and looses every input.
for people who have run-time decisions based on which API is being used, like different shaders for example.
on executing my code I am facing this error
./sample2D: symbol lookup error: /usr/local/lib/libftgl.so.2: undefined symbol: glad_glGenTextures
all: sample2D
sample2D: Sample_GL3_2D.cpp glad.c
g++ -o sample2D Sample_GL3_2D.cpp glad.c -lGL -lglfw -lGLU -lftgl -ldl -std=c++11
clean:
rm sample2D
this is my Makefile
I choseed WGL and generated the code,but the generated file glad_ wgl. c seems to contain errors
static int has_ext(const char *ext) {
const char *terminator;
const char *loc;
const char *extensions;
if(wglGetExtensionsStringEXT == NULL && wglGetExtensionsStringARB == NULL)
return 0;
if(wglGetExtensionsStringARB == NULL || GLADWGLhdc == INVALID_HANDLE_VALUE)
extensions = wglGetExtensionsStringEXT();
else
extensions = wglGetExtensionsStringARB(GLADWGLhdc);
if(extensions == NULL || ext == NULL)
return 0;
...
identifier wglGetExtensionsStringEXT
wglGetExtensionsStringARB
is undefined.
Not sure if this is the right place to file this but it seems to be working locally so I figure it's web-specific.
I was using the online generator and I found that glad_wgl.h generated with --local-files
isn't quite right, see glad_wgl.h (while that file lasts) built from this config:
/*
WGL loader generated by glad 0.1.27 on Mon Sep 10 13:11:26 2018.
Language/Generator: C/C++
Specification: wgl
APIs: wgl=1.0
Profile: -
Extensions:
Loader: True
Local files: True
Omit khrplatform: False
Commandline:
--api="wgl=1.0" --generator="c" --spec="wgl" --local-files --extensions=""
Online:
http://glad.dav1d.de/#language=c&specification=wgl&loader=on&api=wgl%3D1.0
*/
// ....
#include <glad/glad.h>
But if I clone the same version of glad locally it generates #include "glad.h"
as I'd expect.
The same seems to happen with glx.
todo...
Is there any license this project's generated loader files (glad.c and glad.h) are under? I want to ship my project that contains both files in the project source tree.
My project is being released under both GPLv3 and LGPLv3.
Hi, I would like to get some clarification regarding the loading of OpenGL ES function pointers. Please note that this may not be a bug and just a misunderstanding on my side.
I have generated a loader from your website with the following settings:
Language: C/C++
Specification: OpenGL
Profile: Core
gl: Version 4.5
gles1: None
gles2: Version 3.1
glsc2: None
Extensions: None
When I then open an OpenGL ES 3.1 context and call gladLoadGL(), I notice that glad_glDispatchCompute is unresolved:
printf("Address of glad_glDispatchCompute: %p\n", glad_glDispatchCompute); // (nil)
A closer look at the generate glad.c file reveals that the OpenGL ES loader is not called:
int gladLoadGL(void) {
int status = 0;
if(open_gl()) {
status = gladLoadGLLoader(&get_proc);
close_gl();
}
return status;
}
If however I replace the call to gladLoadGLLoader() to gladLoadGLES2Loader(), then I do get glad_glDispatchCompute resolved to a correct address:
int gladLoadGL(void) {
int status = 0;
if(open_gl()) {
//status = gladLoadGLLoader(&get_proc);
status = gladLoadGLES2Loader(&get_proc);
close_gl();
}
return status;
}
Address of glad_glDispatchCompute: 0x7f3ae8d09580
Can you help clarify what is the expected behaviour here? If I open an OpenGL ES context, shouldn't glad call the OpenGL ES loader?
Given that glad is calling the GL loader and not the GL ES loader, I have also tried generating a loader with no gl version (only gles2):
Language: C/C++
Specification: OpenGL
Profile: Core
gl: none
gles1: None
gles2: Version 3.1
glsc2: None
Extensions: None
However, if I generate such a loader, I cannot even compile the generated files.
Please clarify if this is a bug in the loader generator or a misunderstanding on my side.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.