Changeset 1218


Ignore:
Timestamp:
Apr 12, 2012, 12:59:26 AM (8 years ago)
Author:
sam
Message:

tutorial: fix a compilation error and remove now useless vector type casts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/tutorial/tut03.cpp

    r1216 r1218  
    6868        m_size.x = (m_size.x + 15) & ~15;
    6969        m_size.y = (m_size.y + 15) & ~15;
    70         /* FIXME: casts are necessary because of missing operators */
    71         m_texel_settings = vec4(1.0, 1.0, 2.0, 2.0) / (vec4)m_size.xyxy;
    72         m_screen_settings = vec4(1.0, 1.0, 0.5, 0.5) * (vec4)m_size.xyxy;
     70        m_texel_settings = vec4(1.0, 1.0, 2.0, 2.0) / m_size.xyxy;
     71        m_screen_settings = vec4(1.0, 1.0, 0.5, 0.5) * m_size.xyxy;
    7372
    7473        /* Window size decides the world aspect ratio. For instance, 640×480
     
    8483        else
    8584            m_window2world = 0.5 / m_window_size.x;
    86         m_texel2world = (vec2)m_window_size / (vec2)m_size
    87                                             * (vec2)m_window2world;
     85        m_texel2world = (vec2)m_window_size / m_size * m_window2world;
    8886
    8987        m_oldmouse = ivec2(0, 0);
     
    868866int main(int argc, char **argv)
    869867{
    870     Application app("Tutorial 3: Fractal", ivec2(640, 480, 60.0f);
     868    Application app("Tutorial 3: Fractal", ivec2(640, 480), 60.0f);
    871869
    872870#if defined _MSC_VER && !defined _XBOX
Note: See TracChangeset for help on using the changeset viewer.