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

Author Topic: Does sf::Text works in a OpenGL Core profile example?  (Read 11504 times)

0 Members and 2 Guests are viewing this topic.

nicoraf

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Does sf::Text works in a OpenGL Core profile example?
« Reply #15 on: August 22, 2013, 03:04:30 am »
Thank you for your answer, I will read it more carefully in these days. I understand your point in several aspects you mention.

nicoraf

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Does sf::Text works in a OpenGL Core profile example?
« Reply #16 on: September 01, 2013, 07:37:00 pm »
I am back. I would like to take some conclusions together.

If we use raw VAO y VBO it is not possible to display texts as intendend?

I have read more articles and the way to render texts in opengl is loading a texture image with all the characterers, then the texts are generated using that texture and opengl primitives.

I have one question, if I would like to use opengl core to avoid incompatibilities dependent of platform maybe it would be better that SFML provides a Window this is opengl core, I know that currently it isn't available. Does it make senses that SFML has some kind of OPENGL core mode? (without any of the 2d features available), I think that will be great for developers as me, that also use de i/o and other SFML stuff.

Thanks in advance,
Nicolas.



binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Does sf::Text works in a OpenGL Core profile example?
« Reply #17 on: September 01, 2013, 08:19:52 pm »
If we use raw VAO y VBO it is not possible to display texts as intendend?
It is still possible, you just need to do it properly. Like I said, learn how SFML text rendering is implemented and if you are capable in OpenGL you should have no problem figuring out how to get it to work with VAOs and VBOs.

I have read more articles and the way to render texts in opengl is loading a texture image with all the characterers, then the texts are generated using that texture and opengl primitives.
There really isn't any other way to do it... which is why everybody does it like that...

I have one question, if I would like to use opengl core to avoid incompatibilities dependent of platform maybe it would be better that SFML provides a Window this is opengl core, I know that currently it isn't available. Does it make senses that SFML has some kind of OPENGL core mode? (without any of the 2d features available), I think that will be great for developers as me, that also use de i/o and other SFML stuff.
? ? ?
OK... I am slowly doubting that you understand what you are saying...

1. There is a difference between "core functionality" and a "core profile". Core functionality is basically OpenGL itself without any of its extensions such as GLU. This core functionality is basically a set of functions that are part of an interface you use to communicate with your GPU. That interface can change depending on the version and the context type you request. In OpenGL 3.0 certain functions were marked as deprecated and were removed from the "core profile" interface in OpenGL 3.1. However from OpenGL 3.2 onwards, in addition to the "core profile" you could also request a "compatibility profile" which lets you use most parts of the old interface again. As such any modern hardware that supports OpenGL 3.2 and above should let SFML create a compatibility context for its purposes. In this sense, SFML is still supported on modern graphics hardware.

2. If you want to support older hardware as well, it makes no sense to use all these fancy features. VAOs will not work if the GPU does not support them. SFML is built to support as much hardware as possible while assuring that it stays relatively future-proof regarding OpenGL. Your code in fact is more "incompatible" than SFML code regarding platform portability.

3. If you want to support the majority of modern devices that are available nowadays (including tablets, mobile devices etc.) you want OpenGL ES support. OpenGL ES is a subset of the OpenGL interface. SFML with OpenGL ES support is being (or will be) worked on.

4. OpenGL does not differentiate between 2D or 3D objects, they are all just data to it. The notion of "removing 2D features" does not make any sense.

5. If you don't use any OpenGL resources in SFML that require a context it will not create one. You can use everything unrelated to graphics and windows and it will not have the slightest to do with OpenGL.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

nicoraf

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Does sf::Text works in a OpenGL Core profile example?
« Reply #18 on: September 01, 2013, 09:14:47 pm »
Hi,

Thanks for you answer. I will try to figure out how it is implemented.


 

anything