Skip to content

Commit

Permalink
internal/builtinshader: add a comment to the generated file
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Dec 8, 2024
1 parent 4a7701c commit 191caa5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/builtinshader/defs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions internal/builtinshader/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ const license = `// Copyright 2024 The Ebitengine Authors
// limitations under the License.
`

const note = `// This file is intended for precompiled shaders that will be introduced in the future.
// All constant names are underscores and not actually used,
// so they do not affect the binary file size.
`

func xmain() error {
f, err := os.Create("defs.go")
if err != nil {
Expand All @@ -61,6 +66,12 @@ func xmain() error {
if _, err := w.WriteString(license); err != nil {
return err
}
if _, err := w.WriteString("\n"); err != nil {
return err
}
if _, err := w.WriteString(note); err != nil {
return err
}
if _, err := w.WriteString("\npackage builtinshader\n"); err != nil {
return err
}
Expand Down

0 comments on commit 191caa5

Please sign in to comment.