| 246 | } |
| 247 | |
| 248 | func (t *tweaker) glGenFramebuffer(ctx context.Context) FramebufferId { |
| 249 | id := FramebufferId(newUnusedID(ctx, 'F', func(x uint32) bool { return !t.c.Objects().Framebuffers().Get(FramebufferId(x)).IsNil() })) |
| 250 | tmp := t.AllocData(ctx, id) |
| 251 | t.doAndUndo(ctx, |
| 252 | t.cb.GlGenFramebuffers(1, tmp.Ptr()).AddWrite(tmp.Data()), |
| 253 | t.cb.GlDeleteFramebuffers(1, tmp.Ptr()).AddRead(tmp.Data())) |
| 254 | return id |
| 255 | } |
| 256 | |
| 257 | func (t *tweaker) glGenTexture(ctx context.Context) TextureId { |
| 258 | id := TextureId(newUnusedID(ctx, 'T', func(x uint32) bool { return !t.c.Objects().Textures().Get(TextureId(x)).IsNil() })) |