I've coded a engine which is able of drawing with OpenGL ESv2 or OpenGL 3 Core Profile API. But recently the OpenGL 3 part got broken and I can't remember what I changed nor can I look in the svn commitlog, cause I did host it at bountysource which is down now and I carried it over to Google (but with broken OGL3 port).
With OpenGL ESv2 everything works fine, but with OpenGL 3 everything is stretched and mirrored horizontally. Both even use the same matrices and vertices.
Do not be confused. The OpenGL ESv2 and OpenGL 3 renderers use different ways to render it.
OpenGL ESv2 uses VBO. OpenGL 3 uses VAO and VBO.
My engine is open source, so, you can look into it here: Source Code.
These should be the important parts: Sprite Class, Base Window Class, GL3 Window Class, GL ESv2 Window Class
Shaders:
Here are some example pictures:
I would be really, really glad and thankful if someone would deliver me the solution to this problem and maybe I would give a small reward for it.
edit:
with a 480x800 window, gldebugger shows this matrix:
modviewmat
{1, -0, 0, 0}
{0, 1, 0, 0}
{0, 0, 1, 0}
{5, 770, 0, 1}
projmat
{2, 0, 0, 0}
{0, 2, 0, 0}
{0, 0, -1, 0}
{-1, -1, -0, 1}
I'm so dumb..it was cause I have 2 class. 1 base class and 1 plattform specific implementation which derived from the base class. All variables were created in the base class AND in the other.
So, I had handles for the matrices in the base class and in the other class.
The OpenGL handles were initialized in the base class. In the gl3 class there are handles too but they arent initialized, since its the job of the base class.
tl;dr pseudocode:
base class: glhandle projmatrix
gl3class: glhandle projmatrix
baseclass::init(): (baseclass).promatrix.init
gl3class::update(): (gl3class).projmatrix.update
:/