I'm more or less curious as to how the normal 2d calls for drawing to a renderwindow work in tandem with just plain openGL calls.
For example im working on doing a dynamic 2D shadow system for my next project and I noticed that if the plain openGL calls are not the last thing to be called they don't appear to render or maybe getting discarded somewhere?
Is there a way to draw openGL primitives ( like in my case a triangle strip ) than draw normal 2D sfml draw calls over it?
Code Ex: This works
for(unsigned int i = 0; i < m_FrontList.size(); ++i)
m_pGameWindow.Draw(*m_FrontList[i].DrawObj.first);
glBegin(GL_TRIANGLE_STRIP);
for(unsigned int i = 0; i < m_TriangleFan.size(); ++i)
{
for(unsigned int k = 0; k < m_TriangleFan[i].m_Points.size(); ++k)
{
glVertex2f(m_TriangleFan[i].m_Points[k].x, m_TriangleFan[i].m_Points[k].y);
}
}
glEnd();
This Does not!
glBegin(GL_TRIANGLE_STRIP);
for(unsigned int i = 0; i < m_TriangleFan.size(); ++i)
{
for(unsigned int k = 0; k < m_TriangleFan[i].m_Points.size(); ++k)
{
glVertex2f(m_TriangleFan[i].m_Points[k].x, m_TriangleFan[i].m_Points[k].y);
}
}
glEnd();
for(unsigned int i = 0; i < m_FrontList.size(); ++i)
m_pGameWindow.Draw(*m_FrontList[i].DrawObj.first);