D
D
Denis Koveshnikov2018-10-01 19:46:59
3D
Denis Koveshnikov, 2018-10-01 19:46:59

How to create something like canvas for opengl using winapi?

For educational purposes, I am writing a parody of a 3d engine, I look at the architecture a little from CryEngine, here I am trying to develop window and control classes. I know how to create an object-oriented window wrapper, everything is OK, but when I try to add, for example, a button, after trying to make the viewport smaller than the window on which opengl draws, trouble happens, opengl overwrites the button, then without hesitation, I decided to create the root window on which to stick the controls and the opengl window. When creating a child window into which opengl draws, the main window stops receiving messages, it is impossible to drag it and do nothing with it, and when you try to drag it by the title, the child window (OPENGL) moves. How to properly create a child window, which will be something similar to canvas like in some graphics libraries? When creating a window, of course, I add the WS_CHILD style, but this is clearly not enough for everything to work as it should.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2018-10-01
@GavriKos

Canvases and everything else in popular engines draw buttons through OpenGL or another lib just like 3D objects. There are no child windows at the winAPI level (if I understand you correctly) - only a bare context.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question