Ignore:
Timestamp:
Feb 2, 2013, 4:25:31 PM (7 years ago)
Author:
sam
Message:

build: fix all vector/scalar type mismatches such as "vec2 * double"
instead of "vec2 * float".

Location:
trunk/src/easymesh
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/easymesh/easymesh-parser.y

    r2294 r2318  
    110110  | T_COLOR COLOR   { uint32_t x = $2;
    111111                      vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff);
    112                       mc.m_mesh.SetCurColor(vec4(v) * (1. / 255)); }
     112                      mc.m_mesh.SetCurColor(vec4(v) * (1.f / 255)); }
    113113  | T_BGCOLOR args4 { mc.m_mesh.SetCurColor2(vec4($2.f0, $2.f1, $2.f2, $2.f3)); }
    114114  | T_BGCOLOR COLOR { uint32_t x = $2;
    115115                      vec4 v(x >> 24, (x >> 16) & 0xff, (x >> 8) & 0xff, x & 0xff);
    116                       mc.m_mesh.SetCurColor2(vec4(v) * (1. / 255)); }
     116                      mc.m_mesh.SetCurColor2(vec4(v) * (1.f / 255)); }
    117117    ;
    118118
  • trunk/src/easymesh/easymesh.cpp

    r2289 r2318  
    881881        for (int v = 0, x = 0, y = 0; x < ndivisions + 1; v++)
    882882        {
    883             vec3 p[] = { a + x * vb + y * vc,
     883            vec3 p[] = { a + (float)x * vb + (float)y * vc,
    884884                         p[0] + vb,
    885885                         p[0] + vc,
Note: See TracChangeset for help on using the changeset viewer.