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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Rafiz

Pages: [1]
1
General / Re: Vulkan
« on: October 12, 2020, 05:48:20 pm »
I would assume that you care about performance, because OpenGL is well supported, and it isn't outdated. In this case you will be always better(quicker) when wrting in pure OpenGL/Vulkan (assuming you know what you are doing and write code super optimally) instead of using SDL2/SFML/any_other_lib.

Maybe something specific from SDL/SFML that would optimize code for someone is slowing down program in your case, maybe you could optimize something that those libraries doesn't consider, maybe you could (in your case) avoid some boolean checks, because you need more "specialized" solution and don't need those bool checks.

I sometimes look into SFML/SDL implementation files when I use them and I see "oh, this code is something I don't need, but I know for what cases it's here". Heck, sometimes I even rewrite something too, or inherit from this stuff, because why not...

If you are so concerned about performance, than perhaps you should be use neither SDL2 nor SFML? use Vulkan and implement everything yourself. Or use SFML and If you have some performance bottleneck in some specific place, than you can somehow implement this part in OpenGL/Vulkan yourself...

2
General / [solved] Documentation webpage [not]missing methods.
« on: October 05, 2020, 05:59:10 am »
I thought, I had problem with missing entries in documentation page. For just minimal example :
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1RenderWindow.php
has no definition, of sf::RenderWindow.draw(sf::VertexArray,sf::Texture*).

It turned out, that  sf::RenderStates can be created from sf::Texture*
    RenderStates(const Texture* theTexture);

And that sf::VertexArray inherits from sf::Drawable class.
    class VertexArray : public Drawable

So check out not only inheritance tree, but also constructors. If class A is possible to be used, and in documentation there is only defined usage of class B check for those cases :
- if A inherits from B
- if B can be constructed from A (you can check it out in SFML/path_to/B.hpp -> find constructors of B)

It's very possible I'm not knowing everything on this topic, but 2nd "check" was what I learned on this problem, so perhaps someone find this useful.

I heavily compressed original post to save on your reading time if you are here from future google search :) Hope it helped.

Orginal (+first few edits) post :
(click to show/hide)

Pages: [1]