Changeset 309 for trunk/thune/gl

Show
Ignore:
Timestamp:
11/09/06 02:31:27 (2 years ago)
Author:
krobillard
Message:

Thune - set-select works on coord!. GL ortho camera now puts origin at
lower left.

Location:
trunk/thune/gl
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/gl/draw_list.c

    r306 r309  
    352352        else 
    353353        { 
    354             w *= 0.5;   // * aspect 
    355             h *= 0.5; 
    356             glOrtho( -w, w, -h, h, 
     354            glOrtho( 0, w, 0, h, 
    357355                     number_d( ctxCells + CAM_CTX_NEAR ), 
    358356                     number_d( ctxCells + CAM_CTX_FAR ) ); 
     
    692690                break; 
    693691 
     692            case DOP_TRANSLATE: 
     693                ++pc; 
     694                VAL_WORD_OR_PC 
     695                if( ur_is(val, UT_VEC3) ) 
     696                { 
     697                    glTranslatef( val->vec3.xyz[0], 
     698                                  val->vec3.xyz[1], 
     699                                  val->vec3.xyz[2] ); 
     700                } 
     701                break; 
     702 
     703            case DOP_ROTATE: 
     704                break; 
     705 
    694706            case DOP_SCALE: 
    695707            { 
  • trunk/thune/gl/test.t

    r306 r309  
    99 
    101010.0 :zoom 
     11 
     120.0,0.0,0.0 :center 
    1113 
    1214[ 
     
    155157 
    156158        dup :.t 
    157         .t/3 2 div :.t/3 
    158         .t/4 2 div :.t/4 
     159        .t/3 2 div  dup :center/x  :.t/3 
     160        .t/4 2 div  dup :center/y  :.t/4 
    159161        .t :visual-cam/viewport 
    160162    ] 
     
    194196        lighting off 
    195197        push 
     198            translate center 
    196199            scale zoom 
    197200            call bg-list 
     
    199202 
    200203        font fontA  color $ffffff 
    201         text "Hello^/There" 
     204        text 0,400 "Line 1^/Line 2" 
    202205        text "More" 
    203         text -200,-200 "-200,-200" 
     206        text 200,200 "200,200" 
    204207        text mouse-pos mouse-pos 
    205208 
    206209        font fontF 
    207         text 0,40 "Ceti Alpha III" 
     210        text 0,0 "ZERO" 
    208211 
    209212        ;children ['draw get do] iter