Month Four : Week Two
By this week Andre and I had decided to work a little more closely together and essentially make his month one code demo and my demo App the same thing. Once Andre got OpenGL initializing and some a multicolored background rendering on screen, he handed it off to me to get the libraries working in it. I soon discovered the method of initialization on Linux is much different that Win32. On Win32, it is possible to create and show a window without and rendering setup, and then initialize OpenGL or DirectX with the already created window. This is impossible with the X11 window system that Linux uses; X11 is old and somewhat less user friendly that Win32, and it just so happens that in X11 it is impossible to edit the Visual of an already created window. The Visual in X11 is an object that holds properties pertaining to the rendering of the window. The real issue with this was that my GWindow was not using any OpenGL libraries or includes during its X11 initialization, so all the work I did trying to link OpenGL to my GWindow was for nothing. By this point I had wasted a decent amount of time and wasn't sure where to go. Fixing this would mean fundamentally changing my GWindow OpenWindow function to allow OpenGl window creation during a month where my GWindow is supposed to be final.
In the end with some guidance from my mentor Lari we decided that it was fine for the demo App to not use my GWindow at this time for the purposes of the postmortem. That task has been pushed off to further down the line after the presentation goes well, and it could possibly even be the basis of a new class. A GWindow3D that derives from GWindow and specializes in OpenGl, DirectX or even Vulkan window creation and rendering could be a worthy project in the future. For now, I've decided to keep the GWindow code commented out in the demo and just implement GInput, GLog, and GFile. I know how the GWindow3D class would work, and even if I don't get to implement it I may be of some help when someone tries it in the future, even if I have since graduated.
No comments:
Post a Comment