internal/builtinshader: add a comment to the generated file

This commit is contained in:
Hajime Hoshi 2024-12-08 23:40:37 +09:00
parent 4a7701cf3a
commit 191caa5f78
2 changed files with 15 additions and 0 deletions

View File

@ -14,6 +14,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// 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.
package builtinshader
//ebitengine:shader

View File

@ -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 {
@ -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
}