(String p, Object o)
| 489 | e.printStackTrace(); |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | @Override |
| 494 | @HiddenInAutocomplete |
| 495 | public Object asMap_set(String p, Object o) { |
| 496 | Object fo = Conversions.convert(o, Supplier.class); |
| 497 | if (fo instanceof Supplier) return getDefaultBundle().set(p, (Supplier) fo); |
| 498 | if (fo instanceof InvocationHandler) { |
| 499 | return getDefaultBundle().set(p, () -> { |
| 500 | try { |
| 501 | return ((InvocationHandler) fo).invoke(fo, supplier_get, nothing); |
| 502 | } catch (Throwable throwable) { |
| 503 | throwable.printStackTrace(); |
| 504 | } |
| 505 | return null; |
| 506 | }); |
| 507 | } |
| 508 | if (Uniform.isAccepableInstance(fo)) return getDefaultBundle().set(p, () -> fo); |
| 509 | |
| 510 | if (o instanceof OffersUniform) { |
| 511 | getDefaultBundle().set(p, () -> ((OffersUniform) o).getUniform()); |
| 512 | // fall through -- connect things as well as set them as uniforms |
| 513 | } |
| 514 | |
| 515 | if (o instanceof TransformFeedback) // needs relinking |
| 516 | GraphicsContext.allGraphicsContexts.stream().map(x -> x.lookup(this)).filter(x -> x != null).forEach(x -> ((State) x).work = true); |
| 517 | |
| 518 | return super.asMap_set(p, o); |
| 519 | } |
| 520 |
nothing calls this directly
no test coverage detected