mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
internal/builtinshader: add a comment to the generated file
This commit is contained in:
parent
4a7701cf3a
commit
191caa5f78
@ -14,6 +14,10 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// 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
|
package builtinshader
|
||||||
|
|
||||||
//ebitengine:shader
|
//ebitengine:shader
|
||||||
|
@ -46,6 +46,11 @@ const license = `// Copyright 2024 The Ebitengine Authors
|
|||||||
// limitations under the License.
|
// 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 {
|
func xmain() error {
|
||||||
f, err := os.Create("defs.go")
|
f, err := os.Create("defs.go")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -61,6 +66,12 @@ func xmain() error {
|
|||||||
if _, err := w.WriteString(license); err != nil {
|
if _, err := w.WriteString(license); err != nil {
|
||||||
return err
|
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 {
|
if _, err := w.WriteString("\npackage builtinshader\n"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user