GLES2

Check-in [825fb5bc38]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:commented out some debug output
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:825fb5bc38ee145581f91eddaecc7dcde95edc33
User & Date: arnulf 2013-08-23 07:30:58
Context
2013-08-23
10:38
fixes check-in: 1c10186c17 user: arnulf tags: trunk
07:30
commented out some debug output check-in: 825fb5bc38 user: arnulf tags: trunk
2013-08-22
21:21
code for diamond bevels check-in: 44bf939a3d user: arnulf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/gles2Base.c.

253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
...
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
    }

    nsPtr = Tcl_CreateNamespace(interp, GLES2_NAMESPACE, NULL, NULL);
    if (nsPtr == NULL) {
        Tcl_Panic("Gles2: cannot create namespace: \"%s\" \n", GLES2_NAMESPACE);
    }

fprintf(stderr, "call Gles2_BiInit:\n");
    if (Gles2_BiInit(interp) != TCL_OK) {
        Tcl_Panic("Gles2: cannot call Gles2_BiInit: %s \n", "");
    }
    if (Gles2_InitFreeType(interp, NULL) != TCL_OK) {
        Tcl_Panic("Gles2: cannot call Gles2_InitFreeType: %s \n", "");
    }

................................................................................
    Tcl_CreateObjCommand(interp, GLES2_NAMESPACE"::swapbuffers", SwapBuffers,
		                NULL, NULL);
    Tcl_CreateObjCommand(interp, GLES2_NAMESPACE"::x11eventloop", X11EventLoop,
		                NULL, NULL);

    SDL_SetVideoMode(800, 480, 16, 0);
    ret = InitOpenGL(interp);
    fprintf(stderr, "ret!%d!\n", ret);
    /* reset the gl* error !! */
    glGetError();

    /*
     *  Set up the variables containing version info.
     */








|







 







|







253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
...
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
    }

    nsPtr = Tcl_CreateNamespace(interp, GLES2_NAMESPACE, NULL, NULL);
    if (nsPtr == NULL) {
        Tcl_Panic("Gles2: cannot create namespace: \"%s\" \n", GLES2_NAMESPACE);
    }

//fprintf(stderr, "call Gles2_BiInit:\n");
    if (Gles2_BiInit(interp) != TCL_OK) {
        Tcl_Panic("Gles2: cannot call Gles2_BiInit: %s \n", "");
    }
    if (Gles2_InitFreeType(interp, NULL) != TCL_OK) {
        Tcl_Panic("Gles2: cannot call Gles2_InitFreeType: %s \n", "");
    }

................................................................................
    Tcl_CreateObjCommand(interp, GLES2_NAMESPACE"::swapbuffers", SwapBuffers,
		                NULL, NULL);
    Tcl_CreateObjCommand(interp, GLES2_NAMESPACE"::x11eventloop", X11EventLoop,
		                NULL, NULL);

    SDL_SetVideoMode(800, 480, 16, 0);
    ret = InitOpenGL(interp);
//fprintf(stderr, "ret!%d!\n", ret);
    /* reset the gl* error !! */
    glGetError();

    /*
     *  Set up the variables containing version info.
     */

Changes to generic/gles2Builtin.c.

1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
....
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
....
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
    rectangle_indices[0] = 0;
    rectangle_indices[1] = 1;
    rectangle_indices[2] = 2;
    rectangle_indices[3] = 2;
    rectangle_indices[4] = 3;
    rectangle_indices[5] = 0;

fprintf(stderr, "FILLRECT!%f!%f!%f %f!%f!%f\n", rectangle_vertices[0].Position[0], rectangle_vertices[0].Position[1], rectangle_vertices[0].Position[2], rectangle_vertices[1].Position[0], rectangle_vertices[1].Position[1], rectangle_vertices[1].Position[2]);

    GL_CHECK(glVertexAttribPointer(_positionSlot, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), 0));
    GL_CHECK(glVertexAttribPointer(_colorSlot, 4, GL_FLOAT, GL_FALSE, 
        sizeof(Vertex), (GLvoid*) (sizeof(float) * 3)));

    handleMatrices(0, 0);

................................................................................
    shadowColors shadow_colors;

    Gles2ShowArgs(1, "Gles2_BiDrawDiamondBorderCmd", objc, objv);
    if (objc != 6) {
        Tcl_WrongNumArgs(interp, 1, objv, "box borderWidth relief diameter shadowColors");
        return TCL_ERROR;
    }
fprintf(stderr, "11\n");
    if (Tcl_ListObjGetElements(interp, objv[1], &box_objc, &boxObjv) != TCL_OK) {
fprintf(stderr, "Gles2_BiDrawDiamondBorderCmd1: bad input format: %s\n", Tcl_GetString(objv[1]));
        return TCL_ERROR;
    }
    if (box_objc != 4) {
fprintf(stderr, "Gles2_BiDrawDiamondBorderCmd2: bad input format: %s %d\n", Tcl_GetString(objv[1]), box_objc);
        return TCL_ERROR;
................................................................................
    relief = Tcl_GetString(objv[3]);
    /* diameter */
    if (Tcl_GetIntFromObj(interp, objv[4], &diameter) != TCL_OK) {
fprintf(stderr, "bad value for diameter!%s!\n", Tcl_GetString(objv[4]));
        return TCL_ERROR;
    }

fprintf(stderr, "22\n");
    if (Tcl_ListObjGetElements(interp, objv[5], &shadow_objc, &shadowObjv) != TCL_OK) {
fprintf(stderr, "Gles2_BiDrawDiamondBorderCmd3: bad input format: %s\n", Tcl_GetString(objv[5]));
        return TCL_ERROR;
    }
    if (shadow_objc != 2) {
fprintf(stderr, "Gles2_BiDrawDiamondBorderCmd4: bad input format: %s %d\n", Tcl_GetString(objv[4]), shadow_objc);
        return TCL_ERROR;







|







 







<







 







<







1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
....
1691
1692
1693
1694
1695
1696
1697

1698
1699
1700
1701
1702
1703
1704
....
1732
1733
1734
1735
1736
1737
1738

1739
1740
1741
1742
1743
1744
1745
    rectangle_indices[0] = 0;
    rectangle_indices[1] = 1;
    rectangle_indices[2] = 2;
    rectangle_indices[3] = 2;
    rectangle_indices[4] = 3;
    rectangle_indices[5] = 0;

//fprintf(stderr, "FILLRECT!%f!%f!%f %f!%f!%f\n", rectangle_vertices[0].Position[0], rectangle_vertices[0].Position[1], rectangle_vertices[0].Position[2], rectangle_vertices[1].Position[0], rectangle_vertices[1].Position[1], rectangle_vertices[1].Position[2]);

    GL_CHECK(glVertexAttribPointer(_positionSlot, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), 0));
    GL_CHECK(glVertexAttribPointer(_colorSlot, 4, GL_FLOAT, GL_FALSE, 
        sizeof(Vertex), (GLvoid*) (sizeof(float) * 3)));

    handleMatrices(0, 0);

................................................................................
    shadowColors shadow_colors;

    Gles2ShowArgs(1, "Gles2_BiDrawDiamondBorderCmd", objc, objv);
    if (objc != 6) {
        Tcl_WrongNumArgs(interp, 1, objv, "box borderWidth relief diameter shadowColors");
        return TCL_ERROR;
    }

    if (Tcl_ListObjGetElements(interp, objv[1], &box_objc, &boxObjv) != TCL_OK) {
fprintf(stderr, "Gles2_BiDrawDiamondBorderCmd1: bad input format: %s\n", Tcl_GetString(objv[1]));
        return TCL_ERROR;
    }
    if (box_objc != 4) {
fprintf(stderr, "Gles2_BiDrawDiamondBorderCmd2: bad input format: %s %d\n", Tcl_GetString(objv[1]), box_objc);
        return TCL_ERROR;
................................................................................
    relief = Tcl_GetString(objv[3]);
    /* diameter */
    if (Tcl_GetIntFromObj(interp, objv[4], &diameter) != TCL_OK) {
fprintf(stderr, "bad value for diameter!%s!\n", Tcl_GetString(objv[4]));
        return TCL_ERROR;
    }


    if (Tcl_ListObjGetElements(interp, objv[5], &shadow_objc, &shadowObjv) != TCL_OK) {
fprintf(stderr, "Gles2_BiDrawDiamondBorderCmd3: bad input format: %s\n", Tcl_GetString(objv[5]));
        return TCL_ERROR;
    }
    if (shadow_objc != 2) {
fprintf(stderr, "Gles2_BiDrawDiamondBorderCmd4: bad input format: %s %d\n", Tcl_GetString(objv[4]), shadow_objc);
        return TCL_ERROR;