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

Author Topic: Draw text with OpenGL?  (Read 5105 times)

0 Members and 1 Guest are viewing this topic.

oOhttpOo

  • Newbie
  • *
  • Posts: 40
    • View Profile
Draw text with OpenGL?
« on: May 25, 2015, 09:39:49 pm »
I'm trying to draw 2D text in a sf::window so that I can use OpenGL in it too, but you (correct me if i'm wrong) can only draw with render windows. Is it possible to draw stuff in 2D (text etc.) with OpenGL in sf::Window class? Or should I use a different library?  ???

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Draw text with OpenGL?
« Reply #1 on: May 25, 2015, 10:19:20 pm »
Reading your past posts it's evidently clear that you're missing a lot of basic programming and C++ knowledge, so I strongly recommend you don't try to do anything OpenGL, but instead learn some basics and get a simple game or similar done.

And yes you need the graphics module with render window to draw text with SFML.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

oOhttpOo

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Draw text with OpenGL?
« Reply #2 on: May 25, 2015, 10:25:32 pm »
Reading your past posts it's evidently clear that you're missing a lot of basic programming and C++ knowledge, so I strongly recommend you don't try to do anything OpenGL, but instead learn some basics and get a simple game or similar done.

And yes you need the graphics module with render window to draw text with SFML.

Well that's where you're very wrong. I have far more experience than you think. Why post at all if you are not even going to attempt to help about the issue?
« Last Edit: May 25, 2015, 10:28:14 pm by oOhttpOo »

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Draw text with OpenGL?
« Reply #3 on: May 25, 2015, 10:44:39 pm »
Is it possible to draw stuff in 2D (text etc.) with OpenGL in sf::Window class? Or should I use a different library?
Nope... this is impossible with SFML, you'll just have to use a different library, like SDL, GLFW, allegro, GLUT or similar. They allow you this flexibility and are probably better for someone like yourself with OpenGL experience anyway.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

SeriousITGuy

  • Full Member
  • ***
  • Posts: 123
  • Still learning...
    • View Profile
Re: Draw text with OpenGL?
« Reply #4 on: May 26, 2015, 11:21:58 am »
Is it possible to draw stuff in 2D (text etc.) with OpenGL in sf::Window class?
Seriously, RTFM: Read the f**king manual.

zmertens

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: Draw text with OpenGL?
« Reply #5 on: May 30, 2015, 09:13:21 am »
@oOhttpOo, if you need help using OpenGL directly to draw text then I would recommend this tutorial. It shows you how to get started using the FreeType libraries directly.
The truth will set you free but first it will piss you off.

 

anything