Advertisement

How to make a text box or button in OpenGL window in c++

Started by July 16, 2020 08:01 PM
39 comments, last by JoeJ 4 years, 6 months ago

dotnka said:

@shaanveer I was surprised to see that you are correct, a lot of those libraries don't allow absolute widget positioning.

Take a look into this one: https://github.com/wjakob/nanogui

On the base Widget class there is a void setPosition(const Vector2i &pos) method to allow precise positioning in the parent container. It should cover your needs.

Thanks a lot. What is the libraries name

@Shaanveer Library

Advertisement

@dotnka Good luck, pal!

@shaanveer - NanoGUI - the code repo is in the gitlab link

@dotnka @SuperVGA Thanks for all your help

@Shaanveer Ohh no. I just noticed a problem. How am I suppose to set this up on code blocks

Advertisement

@Shaanveer And does this gui allow me to place buttons and textboxes on the opengl window

@Shaanveer Ahh are you still there

@Shaanveer How old are you may I ask? Just for reference.

As SuperVGA mentioned, you need to learn things, not just try to copy and paste them. If you want to do C++, you need to understand common build and code distrubution tools - Git and Github, CMake, GCC/clang compilation steps and how to read documentation and API references.

@undefined i am 11

This topic is closed to new replies.

Advertisement