Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does ogre-meshviewer have a way to set the rendersystem and its options #17

Closed
sercero opened this issue Feb 9, 2024 · 5 comments · Fixed by #20
Closed

Does ogre-meshviewer have a way to set the rendersystem and its options #17

sercero opened this issue Feb 9, 2024 · 5 comments · Fixed by #20

Comments

@sercero
Copy link
Contributor

sercero commented Feb 9, 2024

Hello,

I wasnt able to set the Rendersystem and its options from ogre-meshviewer.

I have to manually edit the config file whose location I don't know.

I'm not sure if the default ogre config dialog is shown at some point, but it is not showing for me.

@paroj
Copy link
Member

paroj commented Feb 9, 2024

The config dialog is disabled in ogre-python on linux to avoid pulling in Xaw. This was not an issue so far, as the snap package comes with Xaw enabled.

However, it would be more sane to port the config dialog to ImGui for multiple reasons. I had that on my mind for a while, but took this chance to create an issue for it now: OGRECave/ogre#3025

Anyway, the config file is at ~/.cache/OgreMeshViewer/

@sercero
Copy link
Contributor Author

sercero commented Feb 9, 2024

OK, I'm trying to implement a simple dialog on ImGui to create this.

But I'm stumped on a ver simple thing:

ImGui.Combo("combo", item_current, ["1", "2", "3"], 3)

TypeError: Wrong number or type of arguments for overloaded function 'Combo'.
  Possible C/C++ prototypes are:
    ImGui::Combo(char const *,int *,char const *const [],int,int)
    ImGui::Combo(char const *,int *,char const *const [],int)
    ImGui::Combo(char const *,int *,char const *,int)
    ImGui::Combo(char const *,int *,char const *)
    ImGui::Combo(char const *,int *,bool (*)(void *,int,char const **),void *,int,int)
    ImGui::Combo(char const *,int *,bool (*)(void *,int,char const **),void *,int)

I don't understand how to pass arguments to ImGui::Combo and there aren't any examples of that.

@paroj
Copy link
Member

paroj commented Feb 9, 2024

yeah.. this one is not properly wrapped. List[str] in python does not convert to const char* items[] - it needs a special typemap.
Will fix this in ogre, however this will become available only after the next release.

BeginCombo()/EndCombo() might work for you meanwhile. ocornut/imgui#1658

@paroj
Copy link
Member

paroj commented Feb 10, 2024

actually, wrapping const char* items[] requires some non-trivial, python specific, code:
https://www.swig.org/Doc3.0/Python.html#Python_nn59

while BeginCombo()/EndCombo() already works and seems cleaner too. So I would leave it at that.

@sercero
Copy link
Contributor Author

sercero commented Feb 10, 2024

Yes, I'm using BeginCombo()/EndCombo() and it works.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants