Skip to content

The correct way to use 'set_view_order' ? #16

@cache-tlb

Description

@cache-tlb

Hi, I'm using the interface set_view_order as follows:

view_order = np.array([ 3, 1, 2, 0 ], dtype=np.uint16)
bgfx.set_view_order(0, 4, as_void_ptr(view_order))

and get a trace:

TypeError: set_view_order(): incompatible function arguments. The following argument types are supported:
    1. () -> None
    2. (_id: int) -> None
    3. (_id: int, _num: int) -> None
    4. (_id: int, _num: int, _remap: int) -> None

Invoked with: 0, 4, <capsule object NULL at 0x1ec75f090>

It seems that I should pass an int for the last parameter. But how could an int represent the remap table?

I also notice other interfaces like set_view_transform declare the parameter for an array as const void*. However in the case of set_view_interface, that parameter is declared as const unsigned short *. See bgfx_python.cpp, line 1339. May it be a bug here?

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions