This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Add glad library for glfw. #12265
Closed
Closed
Add glad library for glfw. #12265
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
5302cf8
Merge pull request #1 from flutter/master
cloudwebrtc 2953e13
Merge remote-tracking branch 'upstream/master'
cloudwebrtc 42b7502
Merge remote-tracking branch 'upstream/master'
cloudwebrtc ee2a336
Merge remote-tracking branch 'upstream/master'
cloudwebrtc bfd31aa
Merge remote-tracking branch 'upstream/master'
cloudwebrtc 7df876c
Add glad project.
cloudwebrtc 973c111
Create README.md
cloudwebrtc 00ab503
Update README.md
cloudwebrtc e294632
clang-format.
cloudwebrtc 40af09c
clang-format.
cloudwebrtc 561e3af
Update.
cloudwebrtc f62b6b6
clang-format.
cloudwebrtc 8d21caa
Merge remote-tracking branch 'upstream/master' into glad
cloudwebrtc 79c2e01
Update.
cloudwebrtc 3bfe653
Update copyright block.
cloudwebrtc 0433590
Resolve the CI error.
cloudwebrtc 8e9c1fb
update.
cloudwebrtc fe32f27
Add generate.py for glad.
cloudwebrtc e3cd53f
update.
cloudwebrtc 8107ad8
update.
cloudwebrtc b9c5c52
Add arguments for generate.py.
cloudwebrtc f06c1be
update.
cloudwebrtc a5d8dfe
update.
cloudwebrtc 2467525
Add related files to inputs.
cloudwebrtc 59c734b
update.
cloudwebrtc 056a1c7
Add comment for generate.py.
cloudwebrtc 7d84e72
update.
cloudwebrtc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # Copyright 2013 The Flutter Authors. All rights reserved. | ||
| # Use of this source code is governed by a BSD-style license that can be | ||
| # found in the LICENSE file. | ||
cloudwebrtc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| _glad_gen_dir = "$root_out_dir/gen/flutter/third_party/glad" | ||
| _public_headers = [ | ||
| "$_glad_gen_dir/include/KHR/khrplatform.h", | ||
| "$_glad_gen_dir/include/glad/glad.h", | ||
| ] | ||
| _glad_sources = [ "$_glad_gen_dir/src/glad.c" ] | ||
|
|
||
| config("glad_public") { | ||
| include_dirs = [ "$_glad_gen_dir/include" ] | ||
| } | ||
|
|
||
| source_set("glad") { | ||
| public_configs = [ ":glad_public" ] | ||
|
|
||
| public = _public_headers | ||
|
|
||
| sources = _glad_sources | ||
|
|
||
| deps = [ | ||
| ":gen_glad_sources", | ||
| ] | ||
| } | ||
|
|
||
| action("gen_glad_sources") { | ||
cloudwebrtc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| visibility = [ ":*" ] | ||
| script = "generate.py" | ||
| inputs = [ | ||
| "scripts/glad/__init__.py", | ||
| "scripts/glad/__main__.py", | ||
| "scripts/glad/opener.py", | ||
| "scripts/glad/parse.py", | ||
| "scripts/glad/spec.py", | ||
| "scripts/glad/util.py", | ||
| "scripts/glad/files/__init__.py", | ||
| "scripts/glad/files/egl.xml", | ||
| "scripts/glad/files/glx.xml", | ||
| "scripts/glad/files/wgl.xml", | ||
| "scripts/glad/files/gl.xml", | ||
| "scripts/glad/files/khrplatform.h", | ||
| "scripts/glad/lang/__init__.py", | ||
| "scripts/glad/lang/common/__init__.py", | ||
| "scripts/glad/lang/common/generator.py", | ||
| "scripts/glad/lang/common/loader.py", | ||
| "scripts/glad/lang/common/util.py", | ||
| "scripts/glad/lang/c/__init__.py", | ||
| "scripts/glad/lang/c/debug.py", | ||
| "scripts/glad/lang/c/generator.py", | ||
| "scripts/glad/lang/c/loader/__init__.py", | ||
| "scripts/glad/lang/c/loader/gl.py", | ||
| "scripts/glad/lang/c/loader/wgl.py", | ||
| "scripts/glad/lang/c/loader/egl.py", | ||
| "scripts/glad/lang/c/loader/glx.py", | ||
| ] | ||
|
|
||
| outputs = _public_headers + _glad_sources | ||
|
|
||
cloudwebrtc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| args = [ | ||
| "--profile=compatibility", | ||
| "--api=gl=3.3", | ||
| "--generator=c", | ||
| "--spec=gl", | ||
| "--extensions=", | ||
| "--reproducible", | ||
| "--quiet", | ||
| "--out-path", | ||
| rebase_path("$_glad_gen_dir"), | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| Copyright 2013 The Flutter Authors. All rights reserved. | ||
|
|
||
cloudwebrtc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Redistribution and use in source and binary forms, with or without modification, | ||
| are permitted provided that the following conditions are met: | ||
|
|
||
| * Redistributions of source code must retain the above copyright | ||
| notice, this list of conditions and the following disclaimer. | ||
| * Redistributions in binary form must reproduce the above | ||
| copyright notice, this list of conditions and the following | ||
| disclaimer in the documentation and/or other materials provided | ||
| with the distribution. | ||
| * Neither the name of Google Inc. nor the names of its | ||
| contributors may be used to endorse or promote products derived | ||
| from this software without specific prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
| ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
| ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
| ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/usr/bin/python | ||
| # -*- coding: UTF-8 -*- | ||
|
|
||
cloudwebrtc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # GN can't run python scripts in `python -m scripts/glad` mode, | ||
| # so the generate.py file seems to be necessary. | ||
|
|
||
| import os | ||
| import sys | ||
| sys.path.append(os.path.split(os.path.abspath(__file__))[0] + '/scripts') | ||
| from glad import __main__ | ||
|
|
||
| if __name__ == '__main__': | ||
| __main__.main() | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbracken Do we want a mirror of this? It seems like we have other direct GitHub dependencies, but I'm not sure if there's a policy for when that's allowed.