[Bf-committers] SDL2-based GUI toolkit for Blender

Felipe Ferreira da Silva felipefsdev at gmail.com
Tue Dec 10 20:44:00 CET 2013


Hello hewi,

Thanks for the advice about SDL2, i'm studying another alternatives,
probably GLFW, and I will make a post on the link you gave me.
About Qt... well, just my personal taste, but I don't like it.

I discovered that the size of FBOs don't need to be ^2, so I don't need the
SDL_Texture anymore (I was using it to give freedom over the widgets'
size). I'll improve this project just a bit more and create a github page
for it. If the guys fell interest on it, I'll open to interested
contributors.


2013/12/9 <hewi at jupama.org>

> Dear Felipe Ferreira da Silva,
>
> Nice to see there's so many people involved in the BUI
> (BlenderUserInterface) seperation.  Your input is appreciated.
>
> Quote:"very integrated with the rest of the program":  This is exactly the
> reason why the BUI needs to be pulled out of the core code.
>
> Main point: quote:"was using Gtk+", - you also have wxwidgets and QT
> creator and others which are doing exactly the same thing as you are
> doing, creating a widget interface.  Before getting too deeply into this,
> did you do a study of all the alternatives out there?  SDL, which you are
> using, is apparently also not the best lib ...
>
> you should definatelly have a look at the BA thread #315530
> (http://blenderartists.org/forum/showthread.php?315530), there is an
> active debate on the OpenGL libs interface to be used.  Bottom line
> basically for now is to stick to the GHOST system ...
>
> Thanks though for your effort and mail.
>
> Kindest regards
>
> hewi
>
> >> Message: 1
> >> Date: Sun, 1 Dec 2013 07:12:13 -0200
> >> From: Felipe Ferreira da Silva <felipefsdev at gmail.com>
> >> Subject: [Bf-committers] SDL2-based GUI toolkit for Blender (just a
> >>      suggestion)
> >> To: bf-committers at blender.org
> >> Message-ID:
> >>      <
> CALcZrxAtYY2_-5qYmKHxjjjcWm-s5M9dBYygzWDtxJr6B+DZnA at mail.gmail.com>
> >> Content-Type: text/plain; charset=ISO-8859-1
> >> Hi!
> >> Since it's the first time I'm posting here, my name is Felipe. I'm a
> Blender user for years, and as a software developer I see a lot of
> posts
> >> asking about which one is the GUI toolkit used by Blender. The answer
> is
> >> that it is a embed library (very integrated with the rest of the
> program),
> >> and it is hard to use as a stand-alone.
> >> Well, I'm working on a personal project, and a need to create a custom
> toolkit has emerged (I was using Gtk+, but it was useless at such
> point,
> >> since integrate Gtk+ with OpenGL is very wearing), and maybe this
> toolkit
> >> could be used in the future of Blender. I'm creating a GUI toolkit in C
> with a simple system of class hierarchy for the widgets. It is very
> easy
> >> to
> >> create new classes of widgets. For now, I have only 4 widget classes,
> but
> >> my plan is to create equivalent classes to those of Gtk+.
> >> I'm using SDL2 for inputs and drawing. The widgets are drawn using the
> SDL_Texture, and I will put support to OpenGL widgets (just converting
> the
> >> SDL_Texture of an widget to a OpenGL rendering and then back to
> SDL_Texture). I'm not even using the hardware accelerated option of
> SDL2,
> >> and the drawing is surprisingly fast.
> >> screenshots:
> >>
> https://lh5.googleusercontent.com/-3vTAPZlQpGY/Upr1izkbv2I/AAAAAAAAAE8/h-Cy7ibJYCQ/s1055/Screen001.png
>
> https://lh3.googleusercontent.com/-cANZBgd_5EQ/Upr1i_UhjmI/AAAAAAAAAFA/rd5_kf-Mmc8/s1055/Screen002.png
> In this second screen, the window has two "client widgets", that are
> top-level widgets. The top widget will be drawn above the others and a
> shadow/hatch effect will be drawn behind to indicate that we are
> dealing
> >> with a widget that acts has a modal window.
> >> And here is the code that takes to create this window and widgets:
>
> https://lh3.googleusercontent.com/-3jrwV6dYbFk/Upr57CyQ1TI/AAAAAAAAAFQ/mgMQ_oBAlj0/s800/Screen003.png
> It is very simple. To create new classes of widget, you just need to
> create
> >> an allocation function and register it in the class manager. To create
> new
> >> properties just need to use a function Widget_AddInt(),
> >> Widget_AddBool(),
> >> Widget_AddPointer()... and so on. The same is to set or get a value.
> Well, it is just it for now, I think that a stand-alone gui toolkit
> could
> >> give to the developers more flexibility over the interface, but I know
> that
> >> it would be something very arduous to change, so I'm just exposing a
> suggestion. I will keep working on this toolkit because I need it, but
> if
> >> anyone show interest, I plan to put it on git as GPL or LGPL when it
> becomes more usable.
> >> --
> >> - Felipe Ferreira da Silva
> >> ------------------------------
> >> _______________________________________________
> >> Bf-committers mailing list
> >> Bf-committers at blender.org
> >> http://lists.blender.org/mailman/listinfo/bf-committers
> >> End of Bf-committers Digest, Vol 113, Issue 1
> >> *********************************************
> >
>
>
>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
- Felipe Ferreira da Silva


More information about the Bf-committers mailing list