616 |
# fp = GL.Program(foo.getFragmentProgram()) |
# fp = GL.Program(foo.getFragmentProgram()) |
617 |
# --> bind and enable the returned program to emulate the combiners |
# --> bind and enable the returned program to emulate the combiners |
618 |
# |
# |
619 |
# ISSUES: |
# See convCombiner below for a simpler interface. |
620 |
# |
# |
621 |
# - The code is not yet tested and the interface is clumsy. |
# ISSUES: |
622 |
# |
# |
623 |
# - How should the fragment program be attached to the corresponding |
# - How should the fragment program be attached to the corresponding |
624 |
# CallGL code? |
# CallGL code? (convCombiner below creates a hash table of all encountered |
625 |
|
# programs) |
626 |
# |
# |
627 |
# - Creating a new fragment program is much more expensive than |
# - Creating a new fragment program is much more expensive than |
628 |
# modulating some register combiner options. E.g., in libpaper, |
# modulating some register combiner options. In libpaper, |
629 |
# each paper would need its own emulating fragment program |
# a large amount of different programs is needed, because |
630 |
# because, even with the same combiner type, the scaling options |
# the discrete scaling options are modulated, too. |
|
# do change between papers. |
|
631 |
# |
# |
632 |
# - Should we try to create a single fragment program that could |
# - Should we try to create a single fragment program that could |
633 |
# emulate all the "combiner programs"? (Seems impossible |
# emulate all the "combiner programs"? (Seems impossible |
634 |
# withouth indirect register accesses) |
# withouth indirect register accesses) |
635 |
|
# |
636 |
|
# Implementaion details: |
637 |
|
# |
638 |
|
# - only 2D textures can be accessed (no way to know which type is enabled) |
639 |
|
# - fog fraction is not implemented (requires unknown state) |
640 |
|
# - mux operation not yet implemented |
641 |
|
# |
642 |
class fpCombiner: |
class fpCombiner: |
643 |
def __init__(self): |
def __init__(self): |
644 |
|
|