Esempio n. 1
0
void GlCircle::render()
{
    if(!initalised())
        initGL();

    m_vao_constraints.bind();

    QOpenGLFunctions * f = QOpenGLContext::currentContext()->functions();

    f->glDrawElements(GL_LINE_LOOP, m_indicies.size(), GL_UNSIGNED_INT, (void*)(0)); CE();

    m_vao_constraints.release(); // Unbind
}
Esempio n. 2
0
void DrawableTerrain::render()
{
    if(!initalised())
        initGL();

    QOpenGLFunctions * f = QOpenGLContext::currentContext()->functions();

    m_vao_constraints.bind();

    f->glDrawElements(GL_TRIANGLE_STRIP, m_indicies.size(), GL_UNSIGNED_INT, (void*)(0)); CE();

    m_vao_constraints.release();
}
Esempio n. 3
0
void GLTerrainRect::render()
{
    if(!initalised())
        initGL();

    QOpenGLFunctions * f = QOpenGLContext::currentContext()->functions();

    f->glEnable(GL_BLEND);CE();
    f->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);CE();

    m_vao_constraints.bind();CE();
    f->glDrawElements(GL_TRIANGLE_STRIP, m_indicies.size(), GL_UNSIGNED_INT, (void*)(0)); CE();CE();
    m_vao_constraints.release();CE();

    f->glDisable(GL_BLEND);CE();
}