[Developing]Vulkan API Support

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

xXArthurXx
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Mon Jun 13, 2016 15:06

[Developing]Vulkan API Support

Postby xXArthurXx » Mon Jun 13, 2016 15:18

Moin moin :hammer: ,
I already read the news, that the new Vulkan API will be included in this project waiting for drivers. But now, about a 3/4 year later, there still isn't support and I didn't found anything about a suggest to add it and or other information about the status of vulkan support :cry:.

As I understanded, Vulkan can be faster than OpenGL and Vulkan is more modern, as OpenGL. Please notice, I only read news and information threads about Vulkan, so I cannot prove any of this. I would suggest to start developing a Vulkan API support for CEGUI.
Also I would volunteer for this, because it's interesting and projects like this need people which are interested an motivated to do something. :D

So what do you think?
Last edited by xXArthurXx on Mon Jun 20, 2016 15:27, edited 1 time in total.

YaronCT
CEGUI Team
Posts: 439
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Suggest]Vulkan API Support

Postby YaronCT » Mon Jun 13, 2016 18:07

xXArthurXx : That would b superb! Vulkan support is a must-have.

xXArthurXx
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Mon Jun 13, 2016 15:06

Re: [Suggest]Vulkan API Support

Postby xXArthurXx » Mon Jun 13, 2016 18:23

I'm glad to hear that, but I have to admit, that I'm still a newbie to graphic programming with C++ in such dimensions. Actually I'm a Java programmer, who is now swiching to this library caused of performance problems with java guis (The performance is not as that bad but bad enough for a pentium processor xD).
Also I'm very interested in new technologys like Vulkan :D .

I'm looking forward, to learn more to get something ongoing! :pint:

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Suggest]Vulkan API Support

Postby Ident » Mon Jun 13, 2016 22:26

I plan to go start working on Vulkan support for default branch in the following weeks. I think you would have a very hard time considering you are new to CEGUI (?), Vulkan, graphics programming and C++. I rewrote most of the renderer interfaces we got, for version 1.0 (default branch). This is not final and I will optimise more, so if you do this renderer on default, there might be changes needed soon again.

That said, assistance is definitely valuable so it would be for example useful if you tried out my future branch and tried to check out the code and see potential improvements in it and post performance reports so we got more info from different HW.

Also: Vulkan *can* be faster than OpenGL, but it is not per se. You have to spend a lot more time on it than on OpenGL and only then you will see an advantage (albeit it will most likely be small in most projects, and only potentially large in certain few projects) in performance.

If you want to be really helpful, you could try to backport the Vulkan renderer, which I am going to write for default branch, to v0-8 ( 0.8.x ). This will be useful for the majority of people wanting to use CEGUI and Vulkan because default is still an unstable branch and it is a demanding job to code this even if you got the default branch renderer as reference.

If you think you can do one for default or v0-8 fully on your own you are of course welcome to go for it ! :)
CrazyEddie: "I don't like GUIs"

xXArthurXx
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Mon Jun 13, 2016 15:06

Re: [Suggest]Vulkan API Support

Postby xXArthurXx » Thu Jun 16, 2016 05:10

I think, If I can understand and write on my own a fully working Fast Fourier Transformation, then I shold be able to learn all what is needed to support you :) !

At the moment it's difficult because only my main computer supports vulkan my laptop is too old.

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Suggest]Vulkan API Support

Postby Ident » Thu Jun 16, 2016 07:18

I would suggest starting by looking at the OpenGL 3+ Core Profile Renderer (this should be the closest one to Vulkan) and considering how you could turn the calls there into Vulkan calls.
CrazyEddie: "I don't like GUIs"

YaronCT
CEGUI Team
Posts: 439
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Suggest]Vulkan API Support

Postby YaronCT » Thu Jun 16, 2016 10:24

@Ident: I think the C++ specific experience is less important, more important is the general programming skill and experience. I've very little experience in Java and I think I could develop such a project in Java.

I think letting as many ppl as possible, especially outside the team, try to contribute to an open source project is extremely important - other than the benefit for the proejct itself I think it has a great social and ideological value.

Imo we should let @xXArthurXx try to do it if he wants. I c no point in 2 ppl working on the same task each by himself at the same time. We can, of course, supervise his work, e.g. by asking him to regularly commit his partial work to a feature branch in a cegui fork, perhaps even giving us push rights so we can fix/improve things and perhaps even make it a kind of a colaborative project.

Now, we can always come to @xXArthurXx and tell him: "Thanx for your help, but we believe you're not up to the task. You're encouraged to try to contribute to cegui in other ways - e.g. x, y and z".

To tell u the truth, I was also skeptical when @funbescuit offered to add new widgets with splitters - and in no time it's almost ready.. So I think we should believe in ppl and give them a chance..

YaronCT
CEGUI Team
Posts: 439
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Suggest]Vulkan API Support

Postby YaronCT » Thu Jun 16, 2016 11:13

@Ident: In the mean time, this will give u time to work on the really important stuff, like fixing typos in comments in the code.

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Suggest]Vulkan API Support

Postby Ident » Thu Jun 16, 2016 18:30

yaronct wrote:like fixing typos in comments in the code.


:twisted:
CrazyEddie: "I don't like GUIs"

xXArthurXx
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Mon Jun 13, 2016 15:06

Re: [Suggest]Vulkan API Support

Postby xXArthurXx » Fri Jun 17, 2016 08:25

Anyway, I would still like to have someone to talk with, because it could make some learning parts easier. Any Idea for a suitable specialist contact person who has time :) ?

I'll learn some OpenGL3 code and I try to understand how you're building the GUI in the several renderer classes.

I try to make a conclusion how much I understanded so far. It's important for me to understand every little thing right, to do all well and correct.

Okay, CEGUI needs another C++ library which builds the windows, to draw the context on the window. But such a library could be written with OpenGL/Vulkan too, right? I think only system dependent headers would be needed for something like this (e.g. with windows the window headers must be used to create a window, isn't it?).

Furthermore CEGUI has a couple of so called render classes, which are used to draw the context onto the screen. Of course for each API which is used for drawing there is a single render.

For the project that means, that I have to write a completely new renderer for the Support of the Vulkan(TM) API and of course, I have to understand the full gaphic programming. Any additional sources for graphic programming? I didn't find much about graphic programming yet, so I try simple tutorials :D. So far, sources for graphic programming are difficultier to find than sources for signal processing (for me, could be different for you :mrgreen: ).

PS: I'm used to write Assembler code for microcontrollers and I also understand the most of C and C++ code, but I still miss a couple of C++ features compared to Java (Java has less features compared to C++ :( ). I have learned the fundamentals of programming. The real problem still is graphic programming, I know, that shaders, vertex, facing, matrixes exist, but so far I'm only used to create meshes with facing and textures.

YaronCT
CEGUI Team
Posts: 439
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Suggest]Vulkan API Support

Postby YaronCT » Sat Jun 18, 2016 08:15

@xXArthurXx:

As currently Ident does nothing but lie down on his couch watching the norgegian ice hockey leage for girls, he'll have plenty of time for being your personal assistant.

But seriously, feel free to ask as many question as u like in the forum, perhaps even all of them in this thread. I think most posts r only read by me and @Ident anyway.. And the other 3 cegui team members currently spend little or no time on cegui. So I don't think there's a need for a "specialist contact person". Of course, if u really want to, u can also contact us in person.

Creation of a window and "connecting" e.g. an opengl context to that window is indeed platform specific and is achieved through platform specific API, e.g. on Windows there's the Windows API (and specifically, WGL) and on X Window System u have the X Window System API (and specifically GLX) or EGL. Of course, u don't necessarily have to do it yourself - u can use a lib that does it for u, like sdl, glfw, ogre, sfml, qt or gtk. Cegui doesn't care about all that - it's the cegui user's responsibility to take care of it. Cegui just issues e.g. opengl commands. Still, u can find code that takes care of all that in the cegui's samples framework and application templates, both of which are included in the cegui repository.

I don't think the vulkan renderer has to b written from scratch. True, it's a new api with a different name, but even though I'm not familiar with it I guess the general principles r similar to opengl. So, as @Ident has suggested, I'd start by cloning the opengl renderer and start making changes as needed.

I don't think a deep knowledge of 3D graphics programming is essential. After all, it's a GUI lib that works mostly in 2D.. I'd suggest u to just take a vulkan book; only problem there doesn't seem to b such a book yet ;) So u can try an online tutorial, and if that's not enough there r plenty of tutorials and books, about opengl, which I guess is essentially the same.

It would b really cool if u wrote it in Assembly.. Just to make sure, Assembly does already support things like templates, multiple inheritance and lamba functions, does it? ;)

xXArthurXx
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Mon Jun 13, 2016 15:06

Re: [Suggest]Vulkan API Support

Postby xXArthurXx » Sat Jun 18, 2016 14:24

Haha, the first sentences of this post were funny :D!
Irrespective of Ident's suggest, I tought of the same idea to look into OpenGL3_Render. You said, that OpenGL3 should be the nearest to Vulkan, so that's why I thought so.

Yes I allready talked to Ident, it's quite funny, we can even speak to each other in our mother language, so he definitely is the right person to speak to :D!

Yeah a problem is really, that there isn't any book or something like that for Vulkan, that's why I think it's good to learn some basics about graphic programming, should make everything easier!
I think I have to look how all is build in CEGUI because it's needed, so that the new renderer fits in the complete CEGUI API.


Small notice at margin:
If you're looking to OpenHub you will see that CEGUI is updated often and they say about it, that's good, because that means long term support ;D!

PS:
Ehr.... What did my Informatic teacher not long ago said after I asked him about whether you are a bad programmer if you don't programm in Assembler.
"Nobody programms in Assembler anymore, because it takes toooooo much time. If I rewrite Windows XP in assembler it would be twice than fast than before, but it would be already old school after I'm done with that!"

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Suggest]Vulkan API Support

Postby Ident » Sun Jun 19, 2016 07:33

Timotei spent time on CEGUI lately, mostly regarding the automatic build setup. Martin (Kulik), I am sure, will soon get back to it too, once his work requires less time from him ;)

We discussed some details already on IRC. I now created this wiki page: http://cegui.org.uk/wiki/Vulkan_Renderer_Development
Everything relevant should go into there, after it has been discussed here or in IRC or elsewhere.

Regarding knowledge about how CEGUI does stuff: It is all really quite irrelevant for you as a pure VulkanRenderer developer. All you need to know is that after CEGUI processes the data, it sends quads to the Renderer. In v0-8, these quads always have a texture and a matrix transform associated with it, and each corner of the quad has a multiplicative colour associated with it. The shaders are very simply and we can, afaik, directly use the glsl shader in Vulkan. What we wanna focus on is setting up the right states for the command buffer, properly accumulate the data in the most efficient way, and then fire it onto the GPU.
CrazyEddie: "I don't like GUIs"

YaronCT
CEGUI Team
Posts: 439
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Suggest]Vulkan API Support

Postby YaronCT » Sun Jun 19, 2016 08:41

xXArthurXx wrote:Yes I allready talked to Ident, it's quite funny, we can even speak to each other in our mother language, so he definitely is the right person to speak to :D!


That's cool! As long as u don't start giving identifiers german names, with 30-letter words. :wink:

Ident wrote:Timotei spent time on CEGUI lately, mostly regarding the automatic build setup. Martin (Kulik), I am sure, will soon get back to it too, once his work requires less time from him ;)


I by no means meant to undermine other cegui team members' past, current or future contribution to cegui. I just don't think @xXArthurXx should count too much on any of them being his personal assistant :D

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Suggest]Vulkan API Support

Postby Ident » Sun Jun 19, 2016 14:28

None of us are personal assistants to anyone :D

But if he makes a contribution to the Renderers I will closely inspect it, so that is what I have to offer ;) and also I will be there for CEGUI-specific questions about this topic.

Back to topic: I am in the process of collecting some relevant stuff and will add most of it to that wiki page during the day.
CrazyEddie: "I don't like GUIs"


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest