texture_goxjs.go 463 B

123456789101112131415161718192021
  1. //go:build js || wasm || test_web_driver
  2. // +build js wasm test_web_driver
  3. package cache
  4. import gl "github.com/fyne-io/gl-js"
  5. // TextureType represents an uploaded GL texture
  6. type TextureType = gl.Texture
  7. var NoTexture = gl.NoTexture
  8. type textureInfo struct {
  9. textureCacheBase
  10. texture TextureType
  11. }
  12. // IsValid will return true if the passed texture is potentially a texture
  13. func IsValid(texture TextureType) bool {
  14. return gl.Texture(texture).IsValid()
  15. }