Ignore:
Timestamp:
11/17/15 00:41:57 (9 years ago)
Author:
dlcheng
Message:

CHG: Implementing basic webgl plot_unit functionality for test101.html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/plot_unit.js

    r19727 r19728  
    1 function plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options){
     1function plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options) {
    22        //PLOT_UNIT - unit plot, display data
    33        //
     
    1313        var canvas=document.getElementById(options.getfieldvalue('canvasid'));
    1414
    15         //Initialize the GL context:
     15        // Initialize the GL context:
    1616        var gl=initWebGL(canvas);
    1717
     
    1919
    2020        if (gl) {
    21                 // Set clear color to black, fully opaque
    22                 gl.clearColor(0.0, 0.0, 0.0, 1.0);
    23                 // Enable depth testing
    24                 gl.enable(gl.DEPTH_TEST);
    25                 // Near things obscure far things
    26                 gl.depthFunc(gl.LEQUAL);
    27                 // Clear the color as well as the depth buffer.
    28                 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
     21                loadShaders(gl);
     22                var node=loadModel(gl,x,y,z,elements,data);
     23                drawSceneGraphNode(gl,node);
    2924        }
    3025
Note: See TracChangeset for help on using the changeset viewer.