~raof/mir/fix-two-clang-analyse-results

« back to all changes in this revision

Viewing changes to examples/egltriangle.c

  • Committer: Tarmac
  • Author(s): Daniel van Vugt
  • Date: 2013-07-05 02:41:55 UTC
  • mfrom: (807.1.1 eglapp-unsync)
  • Revision ID: tarmac-20130705024155-54ldu4y8d0ca74b1
mir_demo_client_egl*: Add a "-n" option to disable syncing to vblank (hence to
use swap interval == 0).

Approved by Alan Griffiths, Alexandros Frantzis, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#define MID_AUBERGINE 0.368627451f, 0.152941176f, 0.31372549f
48
48
#define ORANGE        0.866666667f, 0.282352941f, 0.141414141f
49
49
 
50
 
int main(void)
 
50
int main(int argc, char *argv[])
51
51
{
52
52
    const char vshadersrc[] =
53
53
        "attribute vec4 vPosition;            \n"
82
82
    unsigned int width = 512, height = 512;
83
83
    GLfloat angle = 0.0f;
84
84
 
85
 
    if (!mir_eglapp_init(&width, &height))
86
 
    {
87
 
        printf("Can't initialize EGL\n");
 
85
    if (!mir_eglapp_init(argc, argv, &width, &height))
88
86
        return 1;
89
 
    }
90
87
 
91
88
    vshader = load_shader(vshadersrc, GL_VERTEX_SHADER);
92
89
    assert(vshader);