Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [GUI] SFML backend for ImGui  (Read 18210 times)

0 Members and 1 Guest are viewing this topic.

Verra

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [GUI] SFML backend for ImGui
« Reply #15 on: May 29, 2015, 11:30:58 pm »
The example at the top of the page is outdated as well as the instructions for how to set it up. The repository shows that you've split a lot of stuff into seperate files. I also noticed in imgui-rendering-SFML there is a reference to ImImpl_fontTex which doesn't exist anywhere as far as I can tell. It'd be nice to see you include an example in the repository. :)

Aster

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: [GUI] SFML backend for ImGui
« Reply #16 on: June 28, 2015, 09:46:42 am »
I've updated the repository and main post.
The usage has slightly changed, but everything works now.

Sorry for my absence and lack of response, thanks for your patience.

bock

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [GUI] SFML backend for ImGui
« Reply #17 on: July 06, 2015, 02:13:09 am »
> What isn't implemented:
>  Stencils. If the horizontal ImGui window size is too small, you'll still see transparent rectangles, as SFML does not provide support for clipping, and I haven't gotten around to working on a solution.

Note that you want scissoring and not stencil. Scissoring is a cheaper operation than stenciling which rely on a buffer.

- For some reason it's not supported in sf::RenderStates. It's a rather rarely used feature but it's also trivial to implement so perhaps it could be added to SFML.

- Otherwise you can do the scissoring in a shader (which is possibly what a graphics card driver would do for do when enabling scissoring anyway). Pass the float4 cliprect as a uniform to your shader and do a clipping in the pixel shader/

( - Or last resort you might be able to use sf::View::setViewport() as a workaround for the clipping, but I don't know how SFML behave in term of performance when changing the viewport. but adding it to the shader would be more sane. )
« Last Edit: August 03, 2015, 05:27:35 am by bock »