1
Window / Re: Cannot draw 2D elements with modern OpenGL
« on: June 04, 2015, 11:05:34 pm »
Hi Nexus.
I think that this is a very minimal example that fits to my game structure and shows that 2D elements are not appearing in the screen. There are only three functions to draw a 3D triangle and a 2D shape, and one of them is just to compile shaders, so you can ignore it. Furthermore, as SpeCter said, I think that is not a good idea remove shaders using OpenGL 3.3.
And about resetGlStates(), it doesn't matter if you put or not this function; you will get the same result (in this case). I just put it in one of my tests.
Regards!
I think that this is a very minimal example that fits to my game structure and shows that 2D elements are not appearing in the screen. There are only three functions to draw a 3D triangle and a 2D shape, and one of them is just to compile shaders, so you can ignore it. Furthermore, as SpeCter said, I think that is not a good idea remove shaders using OpenGL 3.3.
And about resetGlStates(), it doesn't matter if you put or not this function; you will get the same result (in this case). I just put it in one of my tests.
Regards!