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 :
I'm having problem with documentation page. It seems incomplete for me. For just minimal example :
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1RenderWindow.php
has no information, that I can do sf::RenderWindow.draw(sf::VertexArray,sf::Texture*). Am I suposed not to use this draw method? I don't think so, because I've seen it somewhere in tutorial, otherwise I would had no way of knowing it exists.
To be clear I'm using this function and it is working for me, but it's not specified anywhere.
I could understand that maybe VertexArray has some conversion to VertexBuffer, or something, but all "draw" functions from specification don't have anything simmilar to having texture as second parameter.
I'm using Qt Creator and it also cannot detect all functions that are avaiable for me (tho it has no problems with finding symbols in other libraries). It is actually even worse than documentation page, since it finds only 2 draw functions.
Ah, I forgot to mention, that I treversed inheritance tree too and it isn't specified anywhere there too. Perhaps I missed something. That would be most probable explaination..
Edit : Aaaah, I see
RenderStates(const Texture* theTexture);
class SFML_GRAPHICS_API VertexArray : public Drawable
those two lines explain everything for me. Should have watched what VertexArray is and what can RenderStates contain.
It was kind of shady for me that Texture gets converted to RenderStates implicitly, but now I see what RenderStates are and I like it.