SFML community forums
General => Feature requests => Topic started by: MrDoomMaster on January 25, 2008, 11:22:36 pm
-
For the platform implementation classes, is there any reason why you're not using CRTP? The virtual functions seem unnecessary.
The name sf::RenderWindow::Display() seems a bit weird to me, how about something like FlipBuffers() or SwapBuffers()?
The latter suggestion isn't as important as the first. I'd appreciate any feedback. Thank you!
::EDIT::
I have more suggestions after having looked through the source a bit more:
- Provide the user the ability to specify depth and stencil bit depths, preferably through the VideoMode object. Currently these values are hard-coded.
-
For the platform implementation classes, is there any reason why you're not using CRTP? The virtual functions seem unnecessary.
Are you talking about sf::WindowImpl ? It's the only class using virtual functions to implement system-specific code.
The name sf::RenderWindow::Display() seems a bit weird to me, how about something like FlipBuffers() or SwapBuffers()?
To me, FlipBuffers() is the weird one. Why would a beginner have to know that there are internally two buffers, and that to display its drawing on screen he has to flip them, and so call a FlipBuffers() function ?
When you want to display, call Display(). Simple. I think FlipBuffers() is only meaningful for us, low-level graphics programmers.
- Provide the user the ability to specify depth and stencil bit depths, preferably through the VideoMode object. Currently these values are hard-coded.
Yep, that will be part of a more generic configuration option when creating windows.
-
Yes, I am talking about sf::WindowImpl. Was there a reason to use virtual functions instead of CRTP?
I do agree with your statement on the Display() function. I tend to think of backbuffers as 'swappable', however this may not always be the case. Now that I understand your intended meaning behind the function name, I have no problem with it :)
Thank you for your feedback. You have a great library! I was looking for an alternative to SDL for a long time.
Keep up the great work.
-
Yes, I am talking about sf::WindowImpl. Was there a reason to use virtual functions instead of CRTP?
I decided to use a base class in this case, mainly to gather all the common code. So.. yes, maybe CRTP could do the job as well :)
Thanks for the hint.