Can I use GLUT and GLFW in same OpengGL window?

GLUT is was simple and easy to use, such as, to render Font onto the window, GLUT provides the direct function

glutBitmapCharacter(void *font, int character);

, but in GLFW, we have to create each character as a texture to display on the window.

So, is there any method to use GLUT’s functions in GLFW program?

Or is there any easy way to render fonts in GLFW?

Let me know if you need more information.

Thanks,
Pramay

[QUOTE=pramaykaruley;1291183]GLUT is was simple and easy to use, such as, to render Font onto the window, GLUT provides the direct function

glutBitmapCharacter(void *font, int character);

, but in GLFW, we have to create each character as a texture to display on the window.

So, is there any method to use GLUT’s functions in GLFW program?
[/QUOTE]
The utility functions (text, geometric solids) will probably work so long as glutInit() has been called and you don’t have a core profile context.

glutBitmapCharacter() is just a wrapper around glBitmap(). It’s a fairly inefficient way to render text, and won’t work with a core profile context.

[QUOTE=GClements;1291186]The utility functions (text, geometric solids) will probably work so long as glutInit() has been called and you don’t have a core profile context.

glutBitmapCharacter() is just a wrapper around glBitmap(). It’s a fairly inefficient way to render text, and won’t work with a core profile context.[/QUOTE]

Thanks for the reply. :slight_smile:

So, rather than rendering each character as a texture, is there any easy way to render fonts in GLFW?

use a library for that:
https://www.freetype.org/freetype2/docs/index.html
https://learnopengl.com/In-Practice/Text-Rendering