| //////////////////////////////////////////////////////////////////////////////// |
| // Do not modify! |
| // Generated by codergen |
| //////////////////////////////////////////////////////////////////////////////// |
| |
| package gfxapi |
| |
| import ( |
| "fmt" |
| |
| "android.googlesource.com/platform/tools/gpu/binary/schema" |
| ) |
| |
| var ConstantValues schema.Constants |
| |
| const _FramebufferAttachment_name = "ColorDepthStencil" |
| |
| var _FramebufferAttachment_map = map[FramebufferAttachment]string{} |
| |
| func init() { |
| _FramebufferAttachment_map[0] = _FramebufferAttachment_name[0:5] |
| _FramebufferAttachment_map[1] = _FramebufferAttachment_name[5:10] |
| _FramebufferAttachment_map[2] = _FramebufferAttachment_name[10:17] |
| |
| ConstantValues = append(ConstantValues, schema.ConstantSet{ |
| Type: &schema.Primitive{Name: "FramebufferAttachment", Method: schema.Uint32}, |
| Entries: []schema.Constant{ |
| {Name: _FramebufferAttachment_name[0:5], Value: uint32(0)}, |
| {Name: _FramebufferAttachment_name[5:10], Value: uint32(1)}, |
| {Name: _FramebufferAttachment_name[10:17], Value: uint32(2)}, |
| }, |
| }) |
| } |
| |
| func (v FramebufferAttachment) String() string { |
| if s, ok := _FramebufferAttachment_map[v]; ok { |
| return s |
| } |
| return fmt.Sprintf("FramebufferAttachment(%d)", v) |
| } |
| |
| func (v *FramebufferAttachment) Parse(s string) error { |
| for k, t := range _FramebufferAttachment_map { |
| if s == t { |
| *v = k |
| return nil |
| } |
| } |
| return fmt.Errorf("%s not in FramebufferAttachment", s) |
| } |