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

Pthom/docking fixes #277

Merged
merged 5 commits into from
Apr 21, 2022
Merged

Pthom/docking fixes #277

merged 5 commits into from
Apr 21, 2022

Conversation

pthom
Copy link
Contributor

@pthom pthom commented Apr 20, 2022

  • fb5c692 : sdl example: SDL_GL_MULTISAMPLEBUFFERS=8 instead of 16:

    8 is enough to get antialiasing, and on two of my machines (Ubuntu 20.04- docker, and Ubuntu desktop 20.04),
    the initialization failed with the message (when running SDL_GL_CreateContext(window))

  • ec81800 :
    Correct tests graphics_mem_safety and gui_style: create/destroy context
    As was done in test_begin_end_context_managers, the context is destroyed / recreated for
    each test.

    Note: the tests pass without this modification, but it will soon become required when updating imgui-cpp (it was required for imgui-cpp docking branch, as of may 2022)

  • 1924985 : correct doc/examples/fonts.py

io.fonts.add_font_from_file_ttf now takes 4 params:
the third param (font_config) was missing
As was done in test_begin_end_context_managers, the context is destroyed / recreated for
each test:

````
@pytest.fixture
def context():
    ctx = imgui.get_current_context()
    if ctx is not None:
        imgui.destroy_context(ctx)
    ctx = imgui.create_context()
    return ctx
````

Otherwise, we get this error:

````
>       ctx = imgui.create_context()

test_graphics_mem_safety.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>   ???
E   imgui.core.ImGuiError: ImGui assertion error (FindSettingsHandler(handler->TypeName) == NULL) at imgui-cpp/imgui.cpp:12311

imgui/core.pyx:11676: ImGuiError

````
8 is enough to get antialiasing, and on two of my machines (Ubuntu 20.04- docker, and Ubuntu desktop 20.04),
the initialization failed with the message (when running `SDL_GL_CreateContext(window)`)

  Error: Cannot create OpenGL Context! SDL Error: Invalid window

 gl_context = SDL_GL_CreateContext(window)
@pthom
Copy link
Contributor Author

pthom commented Apr 20, 2022

Note: here also, the CI failure is in the doc generation (which I did not touch)

tmp/tmp.e6QNnsZjPU/venv/lib/python3.7/site-packages/sphinx/jinja2glue.py:16: in <module>
    from jinja2 import FileSystemLoader, BaseLoader, TemplateNotFound, \
E   ImportError: cannot import name 'contextfunction' from 'jinja2' (/tmp/tmp.e6QNnsZjPU/venv/lib/python3.7/site-packages/jinja2/__init__.py)

@KinoxKlark KinoxKlark mentioned this pull request Apr 21, 2022
@KinoxKlark KinoxKlark merged commit 39c4b46 into pyimgui:docking Apr 21, 2022
@KinoxKlark
Copy link
Member

Ok for me, thanks!

@KinoxKlark KinoxKlark added the release pending Merged but still needs official release label Apr 21, 2022
@KinoxKlark KinoxKlark removed the release pending Merged but still needs official release label Apr 19, 2023
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 this pull request may close these issues.

None yet

2 participants