Normalize the line endings in the project files.

BUG=
ANGLEBUG=476
R=geofflang@chromium.org

Review URL: https://codereview.appspot.com/14438063
diff --git a/codereview.settings b/codereview.settings
index de224f3..6b8615d 100644
--- a/codereview.settings
+++ b/codereview.settings
@@ -1,4 +1,4 @@
-# This file is used by gcl to get repository specific information.

-CODE_REVIEW_SERVER: codereview.appspot.com

-CC_LIST: angleproject-review@googlegroups.com

-VIEW_VC: http://code.google.com/p/angleproject/source/detail?r=

+# This file is used by gcl to get repository specific information.
+CODE_REVIEW_SERVER: codereview.appspot.com
+CC_LIST: angleproject-review@googlegroups.com
+VIEW_VC: http://code.google.com/p/angleproject/source/detail?r=
diff --git a/extensions/ANGLE_timer_query.txt b/extensions/ANGLE_timer_query.txt
index 3cc3858..c1371ad 100644
--- a/extensions/ANGLE_timer_query.txt
+++ b/extensions/ANGLE_timer_query.txt
@@ -1,591 +1,591 @@
-Name

-

-    ANGLE_timer_query

-

-Name Strings

-

-    GL_ANGLE_timer_query

-

-Contributors

-

-    Contributors to ARB_occlusion_query

-    Contributors to EXT_timer_query

-    Contributors to ARB_timer_query

-    Ben Vanik, Google Inc.

-    Daniel Koch, TransGaming Inc.

-

-Contact

-

-    Ben Vanik, Google Inc. (benvanik 'at' google 'dot' com)

-

-Status

-

-    Draft

-

-Version

-

-    Last Modified Date: Apr 28, 2011

-    Author Revision: 1

-

-Number

-

-    OpenGL ES Extension #??

-

-Dependencies

-

-    OpenGL ES 2.0 is required.

-

-    The extension is written against the OpenGL ES 2.0 specification.

-

-Overview

-

-    Applications can benefit from accurate timing information in a number of

-    different ways.  During application development, timing information can

-    help identify application or driver bottlenecks.  At run time,

-    applications can use timing information to dynamically adjust the amount

-    of detail in a scene to achieve constant frame rates.  OpenGL

-    implementations have historically provided little to no useful timing

-    information.  Applications can get some idea of timing by reading timers

-    on the CPU, but these timers are not synchronized with the graphics

-    rendering pipeline.  Reading a CPU timer does not guarantee the completion

-    of a potentially large amount of graphics work accumulated before the

-    timer is read, and will thus produce wildly inaccurate results.

-    glFinish() can be used to determine when previous rendering commands have

-    been completed, but will idle the graphics pipeline and adversely affect

-    application performance.

-

-    This extension provides a query mechanism that can be used to determine

-    the amount of time it takes to fully complete a set of GL commands, and

-    without stalling the rendering pipeline.  It uses the query object

-    mechanisms first introduced in the occlusion query extension, which allow

-    time intervals to be polled asynchronously by the application.

-

-IP Status

-

-    No known IP claims.

-

-New Procedures and Functions

-

-    void GenQueriesANGLE(sizei n, uint *ids);

-    void DeleteQueriesANGLE(sizei n, const uint *ids);

-    boolean IsQueryANGLE(uint id);

-    void BeginQueryANGLE(enum target, uint id);

-    void EndQueryANGLE(enum target);

-    void QueryCounterANGLE(uint id, enum target);

-    void GetQueryivANGLE(enum target, enum pname, int *params);

-    void GetQueryObjectivANGLE(uint id, enum pname, int *params);

-    void GetQueryObjectuivANGLE(uint id, enum pname, uint *params);

-    void GetQueryObjecti64vANGLE(uint id, enum pname, int64 *params);

-    void GetQueryObjectui64vANGLE(uint id, enum pname, uint64 *params);

-

-New Tokens

-

-    Accepted by the <pname> parameter of GetQueryivANGLE:

-

-        QUERY_COUNTER_BITS_ANGLE                       0x8864

-        CURRENT_QUERY_ANGLE                            0x8865

-

-    Accepted by the <pname> parameter of GetQueryObjectivANGLE,

-    GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, and

-    GetQueryObjectui64vANGLE:

-

-        QUERY_RESULT_ANGLE                             0x8866

-        QUERY_RESULT_AVAILABLE_ANGLE                   0x8867

-        

-    Accepted by the <target> parameter of BeginQueryANGLE, EndQueryANGLE, and

-    GetQueryivANGLE:

-

-        TIME_ELAPSED_ANGLE                             0x88BF

-

-    Accepted by the <target> parameter of GetQueryivANGLE and

-    QueryCounterANGLE:

-

-        TIMESTAMP_ANGLE                                0x8E28

-

-Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation)

-

-    (Modify table 2.1, Correspondence of command suffix letters to GL argument)

-    Add two new types:

-    

-    Letter Corresponding GL Type

-    ------ ---------------------

-    i64    int64ANGLE

-    ui64   uint64ANGLE

-

-    (Modify table 2.2, GL data types) Add two new types:

-    

-    GL Type       Minimum Bit Width   Description

-    -------       -----------------   -----------------------------

-    int64ANGLE    64                  Signed 2's complement integer

-    uint64ANGLE   64                  Unsigned binary integer

-

-Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)

-

-    Add a new section 5.3 "Timer Queries":

-

-    "5.3  Timer Queries

-

-    Timer queries use query objects to track the amount of time needed to

-    fully complete a set of GL commands, or to determine the current time

-    of the GL.

-    

-    Timer queries are associated with query objects.  The command

-

-      void GenQueriesANGLE(sizei n, uint *ids);

-

-    returns <n> previously unused query object names in <ids>.  These

-    names are marked as used, but no object is associated with them until

-    the first time they are used by BeginQueryANGLE.  Query objects contain

-    one piece of state, an integer result value.  This result value is

-    initialized to zero when the object is created.  Any positive integer

-    except for zero (which is reserved for the GL) is a valid query

-    object name.

-

-    Query objects are deleted by calling

-

-      void DeleteQueriesANGLE(sizei n, const uint *ids);

-

-    <ids> contains <n> names of query objects to be deleted.  After a

-    query object is deleted, its name is again unused.  Unused names in

-    <ids> are silently ignored.

-    If an active query object is deleted its name immediately becomes unused,

-    but the underlying object is not deleted until it is no longer active.

-

-    A timer query can be started and finished by calling

-

-      void BeginQueryANGLE(enum target, uint id);

-      void EndQueryANGLE(enum target);

-

-    where <target> is TIME_ELAPSED_ANGLE.  If BeginQueryANGLE is called

-    with an unused <id>, that name is marked as used and associated with

-    a new query object.

-    

-    If BeginQueryANGLE is called with an <id> of zero, if the active query

-    object name for <target> is non-zero, if <id> is the name of an existing

-    query object whose type does not match <target>, or if <id> is the active

-    query object name for any query type, the error INVALID_OPERATION is

-    generated.  If EndQueryANGLE is called while no query with the same target

-    is in progress, an INVALID_OPERATION error is generated.

-

-    When BeginQueryANGLE and EndQueryANGLE are called with a <target> of

-    TIME_ELAPSED_ANGLE, the GL prepares to start and stop the timer used for

-    timer queries.  The timer is started or stopped when the effects from all

-    previous commands on the GL client and server state and the framebuffer

-    have been fully realized.  The BeginQueryANGLE and EndQueryANGLE commands

-    may return before the timer is actually started or stopped.  When the timer

-    query timer is finally stopped, the elapsed time (in nanoseconds) is

-    written to the corresponding query object as the query result value, and

-    the query result for that object is marked as available.

-

-    If the elapsed time overflows the number of bits, <n>, available to hold

-    elapsed time, its value becomes undefined.  It is recommended, but not

-    required, that implementations handle this overflow case by saturating at

-    2^n - 1.

-

-    The necessary state is a single bit indicating whether an timer

-    query is active, the identifier of the currently active timer

-    query, and a counter keeping track of the time that has passed.

-

-    When the command

-

-         void QueryCounterANGLE(uint id, enum target);

-

-    is called with <target> TIMESTAMP_ANGLE, the GL records the current time

-    into the corresponding query object. The time is recorded after all

-    previous commands on the GL client and server state and the framebuffer

-    have been fully realized. When the time is recorded, the query result for

-    that object is marked available. QueryCounterANGLE timer queries can be

-    used within a BeginQueryANGLE / EndQueryANGLE block where the <target> is

-    TIME_ELAPSED_ANGLE and it does not affect the result of that query object.

-    The error INVALID_OPERATION is generated if the <id> is already in use

-    within a BeginQueryANGLE/EndQueryANGLE block."

-

-Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State

-Requests)

-

-    Add a new section 6.1.9 "Timer Queries":

-

-    "The command

-

-      boolean IsQueryANGLE(uint id);

-

-    returns TRUE if <id> is the name of a query object.  If <id> is zero,

-    or if <id> is a non-zero value that is not the name of a query

-    object, IsQueryANGLE returns FALSE.

-

-    Information about a query target can be queried with the command

-

-      void GetQueryivANGLE(enum target, enum pname, int *params);

-

-    <target> identifies the query target and can be TIME_ELAPSED_ANGLE or

-    TIMESTAMP_ANGLE for timer queries.

-

-    If <pname> is CURRENT_QUERY_ANGLE, the name of the currently active query

-    for <target>, or zero if no query is active, will be placed in <params>.

-

-    If <pname> is QUERY_COUNTER_BITS_ANGLE, the implementation-dependent number

-    of bits used to hold the query result for <target> will be placed in

-    <params>.  The number of query counter bits may be zero, in which case

-    the counter contains no useful information.

-

-    For timer queries (TIME_ELAPSED_ANGLE and TIMESTAMP_ANGLE), if the number

-    of bits is non-zero, the minimum number of bits allowed is 30 which

-    will allow at least 1 second of timing.

-

-    The state of a query object can be queried with the commands

-

-      void GetQueryObjectivANGLE(uint id, enum pname, int *params);

-      void GetQueryObjectuivANGLE(uint id, enum pname, uint *params);

-      void GetQueryObjecti64vANGLE(uint id, enum pname, int64 *params);

-      void GetQueryObjectui64vANGLE(uint id, enum pname, uint64 *params);

-

-    If <id> is not the name of a query object, or if the query object

-    named by <id> is currently active, then an INVALID_OPERATION error is

-    generated.

-

-    If <pname> is QUERY_RESULT_ANGLE, then the query object's result

-    value is returned as a single integer in <params>. If the value is so

-    large in magnitude that it cannot be represented with the requested type,

-    then the nearest value representable using the requested type is

-    returned. If the number of query counter bits for target is zero, then

-    the result is returned as a single integer with the value zero.

-    

-    There may be an indeterminate delay before the above query returns. If

-    <pname> is QUERY_RESULT_AVAILABLE_ANGLE, FALSE is returned if such a delay

-    would be required; otherwise TRUE is returned. It must always be true

-    that if any query object returns a result available of TRUE, all queries

-    of the same type issued prior to that query must also return TRUE.

-

-    Querying the state for a given timer query forces that timer query to

-    complete within a finite amount of time.

-

-    If multiple queries are issued on the same target and id prior to 

-    calling GetQueryObject[u]i[64]vANGLE, the result returned will always be

-    from the last query issued.  The results from any queries before the

-    last one will be lost if the results are not retrieved before starting

-    a new query on the same <target> and <id>."

-

-Errors

-

-    The error INVALID_VALUE is generated if GenQueriesANGLE is called where

-    <n> is negative.

-

-    The error INVALID_VALUE is generated if DeleteQueriesANGLE is called

-    where <n> is negative.

-

-    The error INVALID_OPERATION is generated if BeginQueryANGLE is called

-    when a query of the given <target> is already active.

-

-    The error INVALID_OPERATION is generated if EndQueryANGLE is called

-    when a query of the given <target> is not active.

-

-    The error INVALID_OPERATION is generated if BeginQueryANGLE is called

-    where <id> is zero.

-

-    The error INVALID_OPERATION is generated if BeginQueryANGLE is called

-    where <id> is the name of a query currently in progress.

-    

-    The error INVALID_OPERATION is generated if BeginQueryANGLE is called

-    where <id> is the name of an existing query object whose type does not

-    match <target>.

-

-    The error INVALID_ENUM is generated if BeginQueryANGLE or EndQueryANGLE

-    is called where <target> is not TIME_ELAPSED_ANGLE.

-

-    The error INVALID_ENUM is generated if GetQueryivANGLE is called where

-    <target> is not TIME_ELAPSED_ANGLE or TIMESTAMP_ANGLE.

-

-    The error INVALID_ENUM is generated if GetQueryivANGLE is called where

-    <pname> is not QUERY_COUNTER_BITS_ANGLE or CURRENT_QUERY_ANGLE.

-

-    The error INVALID_ENUM is generated if QueryCounterANGLE is called where

-    <target> is not TIMESTAMP_ANGLE.

-

-    The error INVALID_OPERATION is generated if QueryCounterANGLE is called

-    on a query object that is already in use inside a

-    BeginQueryANGLE/EndQueryANGLE.

-

-    The error INVALID_OPERATION is generated if GetQueryObjectivANGLE,

-    GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or

-    GetQueryObjectui64vANGLE is called where <id> is not the name of a query

-    object.

-

-    The error INVALID_OPERATION is generated if GetQueryObjectivANGLE,

-    GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or

-    GetQueryObjectui64vANGLE is called where <id> is the name of a currently

-    active query object.

-

-    The error INVALID_ENUM is generated if GetQueryObjectivANGLE,

-    GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or

-    GetQueryObjectui64vANGLE is called where <pname> is not

-    QUERY_RESULT_ANGLE or QUERY_RESULT_AVAILABLE_ANGLE.

-

-New State

-

-    (Add a new table 6.xx, "Query Operations")

-    

-    Get Value                      Type    Get Command              Initial Value   Description              Sec

-    ---------                      ----    -----------              -------------   -----------              ------

-    -                              B       -                        FALSE           query active             5.3

-    CURRENT_QUERY_ANGLE            Z+      GetQueryivANGLE          0               active query ID          5.3

-    QUERY_RESULT_ANGLE             Z+      GetQueryObjectuivANGLE,  0               samples-passed count     5.3

-                                           GetQueryObjectui64vANGLE

-    QUERY_RESULT_AVAILABLE_ANGLE   B       GetQueryObjectivANGLE    FALSE           query result available   5.3

-

-New Implementation Dependent State

-

-    (Add the following entry to table 6.18):

-

-    Get Value                      Type    Get Command      Minimum Value      Description           Sec

-    --------------------------     ----    -----------      -------------      ----------------      ------

-    QUERY_COUNTER_BITS_ANGLE       Z+      GetQueryivANGLE  see 6.1.9          Number of bits in     6.1.9

-                                                                               query counter

-

-Examples

-

-    (1) Here is some rough sample code that demonstrates the intended usage

-        of this extension.

-

-        GLint queries[N];

-        GLint available = 0;

-        // timer queries can contain more than 32 bits of data, so always

-        // query them using the 64 bit types to avoid overflow

-        GLuint64ANGLE timeElapsed = 0;

-

-        // Create a query object.

-        glGenQueriesANGLE(N, queries);

-

-        // Start query 1

-        glBeginQueryANGLE(GL_TIME_ELAPSED_ANGLE, queries[0]);

-

-        // Draw object 1

-        ....

-

-        // End query 1

-        glEndQueryANGLE(GL_TIME_ELAPSED_ANGLE);

-

-        ...

-

-        // Start query N

-        glBeginQueryANGLE(GL_TIME_ELAPSED_ANGLE, queries[N-1]);

-

-        // Draw object N

-        ....

-

-        // End query N

-        glEndQueryANGLE(GL_TIME_ELAPSED_ANGLE);

-

-        // Wait for all results to become available

-        while (!available) {

-            glGetQueryObjectivANGLE(queries[N-1], GL_QUERY_RESULT_AVAILABLE_ANGLE, &available);

-        }

-

-        for (i = 0; i < N; i++) {

-            // See how much time the rendering of object i took in nanoseconds.

-            glGetQueryObjectui64vANGLE(queries[i], GL_QUERY_RESULT_ANGLE, &timeElapsed);

-

-            // Do something useful with the time.  Note that care should be

-            // taken to use all significant bits of the result, not just the

-            // least significant 32 bits.

-            AdjustObjectLODBasedOnDrawTime(i, timeElapsed);

-        }

-

-        This example is sub-optimal in that it stalls at the end of every

-        frame to wait for query results.  Ideally, the collection of results

-        would be delayed one frame to minimize the amount of time spent

-        waiting for the GPU to finish rendering.

-        

-    (2) This example is basically the same as the example above but uses

-        QueryCounter instead.

-    

-        GLint queries[N+1];

-        GLint available = 0;

-        // timer queries can contain more than 32 bits of data, so always

-        // query them using the 64 bit types to avoid overflow

-        GLuint64ANGLE timeStart, timeEnd, timeElapsed = 0;

-

-        // Create a query object.

-        glGenQueriesANGLE(N+1, queries);

-

-        // Query current timestamp 1

-        glQueryCounterANGLE(queries[0], GL_TIMESTAMP_ANGLE);

-

-        // Draw object 1

-        ....

-

-        // Query current timestamp N

-        glQueryCounterANGLE(queries[N-1], GL_TIMESTAMP_ANGLE);

-

-        // Draw object N

-        ....

-

-        // Query current timestamp N+1

-        glQueryCounterANGLE(queries[N], GL_TIMESTAMP_ANGLE);

-

-        // Wait for all results to become available

-        while (!available) {

-            glGetQueryObjectivANGLE(queries[N], GL_QUERY_RESULT_AVAILABLE_ANGLE, &available);

-        }

-

-        for (i = 0; i < N; i++) {

-            // See how much time the rendering of object i took in nanoseconds.

-            glGetQueryObjectui64vANGLE(queries[i], GL_QUERY_RESULT_ANGLE, &timeStart);

-            glGetQueryObjectui64vANGLE(queries[i+1], GL_QUERY_RESULT_ANGLE, &timeEnd);

-            timeElapsed = timeEnd - timeStart;

-

-            // Do something useful with the time.  Note that care should be

-            // taken to use all significant bits of the result, not just the

-            // least significant 32 bits.

-            AdjustObjectLODBasedOnDrawTime(i, timeElapsed);

-        }

-

-Issues from EXT_timer_query

-

-    (1) What time interval is being measured?

-

-    RESOLVED:  The timer starts when all commands prior to BeginQuery() have

-    been fully executed.  At that point, everything that should be drawn by

-    those commands has been written to the framebuffer.  The timer stops

-    when all commands prior to EndQuery() have been fully executed.

-

-    (2) What unit of time will time intervals be returned in?

-

-    RESOLVED:  Nanoseconds (10^-9 seconds).  This unit of measurement allows

-    for reasonably accurate timing of even small blocks of rendering

-    commands.  The granularity of the timer is implementation-dependent.  A

-    32-bit query counter can express intervals of up to approximately 4

-    seconds.

-

-    (3) What should be the minimum number of counter bits for timer queries?

-

-    RESOLVED:  30 bits, which will allow timing sections that take up to 1

-    second to render.

-

-    (4) How are counter results of more than 32 bits returned?

-

-    RESOLVED:  Via two new datatypes, int64ANGLE and uint64ANGLE, and their

-    corresponding GetQueryObject entry points.  These types hold integer

-    values and have a minimum bit width of 64.

-

-    (5) Should the extension measure total time elapsed between the full

-        completion of the BeginQuery and EndQuery commands, or just time

-        spent in the graphics library?

-

-    RESOLVED:  This extension will measure the total time elapsed between

-    the full completion of these commands.  Future extensions may implement

-    a query to determine time elapsed at different stages of the graphics

-    pipeline.

-

-    (6) If multiple query types are supported, can multiple query types be

-        active simultaneously?

-

-    RESOLVED:  Yes; an application may perform a timer query and another

-    type of query simultaneously.  An application can not perform multiple

-    timer queries or multiple queries of other types simultaneously.  An

-    application also can not use the same query object for another query

-    and a timer query simultaneously.

-

-    (7) Do query objects have a query type permanently associated with them?

-

-    RESOLVED:  No.  A single query object can be used to perform different

-    types of queries, but not at the same time.

-

-    Having a fixed type for each query object simplifies some aspects of the

-    implementation -- not having to deal with queries with different result

-    sizes, for example.  It would also mean that BeginQuery() with a query

-    object of the "wrong" type would result in an INVALID_OPERATION error.

-

-    UPDATE: This resolution was relevant for EXT_timer_query and OpenGL 2.0.

-    Since EXT_transform_feedback has since been incorporated into the core,

-    the resolution is that BeginQuery will generate error INVALID_OPERATION

-    if <id> represents a query object of a different type.

-

-    (8) How predictable/repeatable are the results returned by the timer

-        query?

-

-    RESOLVED:  In general, the amount of time needed to render the same

-    primitives should be fairly constant.  But there may be many other

-    system issues (e.g., context switching on the CPU and GPU, virtual

-    memory page faults, memory cache behavior on the CPU and GPU) that can

-    cause times to vary wildly.

-

-    Note that modern GPUs are generally highly pipelined, and may be

-    processing different primitives in different pipeline stages

-    simultaneously.  In this extension, the timers start and stop when the

-    BeginQuery/EndQuery commands reach the bottom of the rendering pipeline.

-    What that means is that by the time the timer starts, the GL driver on

-    the CPU may have started work on GL commands issued after BeginQuery,

-    and the higher pipeline stages (e.g., vertex transformation) may have

-    started as well.

-

-   (9) What should the new 64 bit integer type be called?

-

-    RESOLVED: The new types will be called GLint64ANGLE/GLuint64ANGLE.  The new

-    command suffixes will be i64 and ui64.  These names clearly convey the

-    minimum size of the types.  These types are similar to the C99 standard

-    type int_least64_t, but we use names similar to the C99 optional type

-    int64_t for simplicity.

-

-Issues from ARB_timer_query

-

-   (10) What about tile-based implementations? The effects of a command are

-        not complete until the frame is completely rendered. Timing recorded

-        before the frame is complete may not be what developers expect. Also

-        the amount of time needed to render the same primitives is not

-        consistent, which conflicts with issue (8) above. The time depends on

-        how early or late in the scene it is placed.

-

-    RESOLVED: The current language supports tile-based rendering okay as it

-    is written. Developers are warned that using timers on tile-based

-    implementation may not produce results they expect since rendering is not

-    done in a linear order. Timing results are calculated when the frame is

-    completed and may depend on how early or late in the scene it is placed.

-    

-   (11) Can the GL implementation use different clocks to implement the

-        TIME_ELAPSED and TIMESTAMP queries?

-

-   RESOLVED: Yes, the implemenation can use different internal clocks to

-   implement TIME_ELAPSED and TIMESTAMP. If different clocks are

-   used it is possible there is a slight discrepancy when comparing queries

-   made from TIME_ELAPSED and TIMESTAMP; they may have slight

-   differences when both are used to measure the same sequence. However, this

-   is unlikely to affect real applications since comparing the two queries is

-   not expected to be useful.

-

-Issues

-

-    (12) What should we call this extension?

-

-    RESOLVED: ANGLE_timer_query

-

-    (13) Why is this done as a separate extension instead of just supporting

-         ARB_timer_query?

-

-    ARB_timer_query is written against OpenGL 3.2, which includes a lot of

-    the required support for dealing with query objects. None of these

-    functions or tokens exist in OpenGL ES, and as such have to be added in

-    this specification.

-

-    (14) How does this extension differ from ARB_timer_query?

-

-    This extension contains most ARB_timer_query behavior unchanged as well

-    as a subset of the query support required to use it from the core

-    OpenGL 3.2 spec. It omits the glGetInteger(TIMESTAMP) functionality used to

-    query the current time on the GPU, but the behavior for all remaining

-    functionality taken from ARB_timer_query is the same.

-    

-    (15) Are query objects shareable between multiple contexts?

-

-    RESOLVED: No.  Query objects are lightweight and we normally share 

-    large data across contexts.  Also, being able to share query objects

-    across contexts is not particularly useful.  In order to do the async 

-    query across contexts, a query on one context would have to be finished 

-    before the other context could query it. 

-

-Revision History

-

-    Revision 1, 2011/04/28

-      - copied from revision 9 of ARB_timer_query and revision 7 of

-        ARB_occlusion_query

-      - removed language that was clearly not relevant to ES2

-      - rebased changes against the OpenGL ES 2.0 specification

+Name
+
+    ANGLE_timer_query
+
+Name Strings
+
+    GL_ANGLE_timer_query
+
+Contributors
+
+    Contributors to ARB_occlusion_query
+    Contributors to EXT_timer_query
+    Contributors to ARB_timer_query
+    Ben Vanik, Google Inc.
+    Daniel Koch, TransGaming Inc.
+
+Contact
+
+    Ben Vanik, Google Inc. (benvanik 'at' google 'dot' com)
+
+Status
+
+    Draft
+
+Version
+
+    Last Modified Date: Apr 28, 2011
+    Author Revision: 1
+
+Number
+
+    OpenGL ES Extension #??
+
+Dependencies
+
+    OpenGL ES 2.0 is required.
+
+    The extension is written against the OpenGL ES 2.0 specification.
+
+Overview
+
+    Applications can benefit from accurate timing information in a number of
+    different ways.  During application development, timing information can
+    help identify application or driver bottlenecks.  At run time,
+    applications can use timing information to dynamically adjust the amount
+    of detail in a scene to achieve constant frame rates.  OpenGL
+    implementations have historically provided little to no useful timing
+    information.  Applications can get some idea of timing by reading timers
+    on the CPU, but these timers are not synchronized with the graphics
+    rendering pipeline.  Reading a CPU timer does not guarantee the completion
+    of a potentially large amount of graphics work accumulated before the
+    timer is read, and will thus produce wildly inaccurate results.
+    glFinish() can be used to determine when previous rendering commands have
+    been completed, but will idle the graphics pipeline and adversely affect
+    application performance.
+
+    This extension provides a query mechanism that can be used to determine
+    the amount of time it takes to fully complete a set of GL commands, and
+    without stalling the rendering pipeline.  It uses the query object
+    mechanisms first introduced in the occlusion query extension, which allow
+    time intervals to be polled asynchronously by the application.
+
+IP Status
+
+    No known IP claims.
+
+New Procedures and Functions
+
+    void GenQueriesANGLE(sizei n, uint *ids);
+    void DeleteQueriesANGLE(sizei n, const uint *ids);
+    boolean IsQueryANGLE(uint id);
+    void BeginQueryANGLE(enum target, uint id);
+    void EndQueryANGLE(enum target);
+    void QueryCounterANGLE(uint id, enum target);
+    void GetQueryivANGLE(enum target, enum pname, int *params);
+    void GetQueryObjectivANGLE(uint id, enum pname, int *params);
+    void GetQueryObjectuivANGLE(uint id, enum pname, uint *params);
+    void GetQueryObjecti64vANGLE(uint id, enum pname, int64 *params);
+    void GetQueryObjectui64vANGLE(uint id, enum pname, uint64 *params);
+
+New Tokens
+
+    Accepted by the <pname> parameter of GetQueryivANGLE:
+
+        QUERY_COUNTER_BITS_ANGLE                       0x8864
+        CURRENT_QUERY_ANGLE                            0x8865
+
+    Accepted by the <pname> parameter of GetQueryObjectivANGLE,
+    GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, and
+    GetQueryObjectui64vANGLE:
+
+        QUERY_RESULT_ANGLE                             0x8866
+        QUERY_RESULT_AVAILABLE_ANGLE                   0x8867
+        
+    Accepted by the <target> parameter of BeginQueryANGLE, EndQueryANGLE, and
+    GetQueryivANGLE:
+
+        TIME_ELAPSED_ANGLE                             0x88BF
+
+    Accepted by the <target> parameter of GetQueryivANGLE and
+    QueryCounterANGLE:
+
+        TIMESTAMP_ANGLE                                0x8E28
+
+Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation)
+
+    (Modify table 2.1, Correspondence of command suffix letters to GL argument)
+    Add two new types:
+    
+    Letter Corresponding GL Type
+    ------ ---------------------
+    i64    int64ANGLE
+    ui64   uint64ANGLE
+
+    (Modify table 2.2, GL data types) Add two new types:
+    
+    GL Type       Minimum Bit Width   Description
+    -------       -----------------   -----------------------------
+    int64ANGLE    64                  Signed 2's complement integer
+    uint64ANGLE   64                  Unsigned binary integer
+
+Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions)
+
+    Add a new section 5.3 "Timer Queries":
+
+    "5.3  Timer Queries
+
+    Timer queries use query objects to track the amount of time needed to
+    fully complete a set of GL commands, or to determine the current time
+    of the GL.
+    
+    Timer queries are associated with query objects.  The command
+
+      void GenQueriesANGLE(sizei n, uint *ids);
+
+    returns <n> previously unused query object names in <ids>.  These
+    names are marked as used, but no object is associated with them until
+    the first time they are used by BeginQueryANGLE.  Query objects contain
+    one piece of state, an integer result value.  This result value is
+    initialized to zero when the object is created.  Any positive integer
+    except for zero (which is reserved for the GL) is a valid query
+    object name.
+
+    Query objects are deleted by calling
+
+      void DeleteQueriesANGLE(sizei n, const uint *ids);
+
+    <ids> contains <n> names of query objects to be deleted.  After a
+    query object is deleted, its name is again unused.  Unused names in
+    <ids> are silently ignored.
+    If an active query object is deleted its name immediately becomes unused,
+    but the underlying object is not deleted until it is no longer active.
+
+    A timer query can be started and finished by calling
+
+      void BeginQueryANGLE(enum target, uint id);
+      void EndQueryANGLE(enum target);
+
+    where <target> is TIME_ELAPSED_ANGLE.  If BeginQueryANGLE is called
+    with an unused <id>, that name is marked as used and associated with
+    a new query object.
+    
+    If BeginQueryANGLE is called with an <id> of zero, if the active query
+    object name for <target> is non-zero, if <id> is the name of an existing
+    query object whose type does not match <target>, or if <id> is the active
+    query object name for any query type, the error INVALID_OPERATION is
+    generated.  If EndQueryANGLE is called while no query with the same target
+    is in progress, an INVALID_OPERATION error is generated.
+
+    When BeginQueryANGLE and EndQueryANGLE are called with a <target> of
+    TIME_ELAPSED_ANGLE, the GL prepares to start and stop the timer used for
+    timer queries.  The timer is started or stopped when the effects from all
+    previous commands on the GL client and server state and the framebuffer
+    have been fully realized.  The BeginQueryANGLE and EndQueryANGLE commands
+    may return before the timer is actually started or stopped.  When the timer
+    query timer is finally stopped, the elapsed time (in nanoseconds) is
+    written to the corresponding query object as the query result value, and
+    the query result for that object is marked as available.
+
+    If the elapsed time overflows the number of bits, <n>, available to hold
+    elapsed time, its value becomes undefined.  It is recommended, but not
+    required, that implementations handle this overflow case by saturating at
+    2^n - 1.
+
+    The necessary state is a single bit indicating whether an timer
+    query is active, the identifier of the currently active timer
+    query, and a counter keeping track of the time that has passed.
+
+    When the command
+
+         void QueryCounterANGLE(uint id, enum target);
+
+    is called with <target> TIMESTAMP_ANGLE, the GL records the current time
+    into the corresponding query object. The time is recorded after all
+    previous commands on the GL client and server state and the framebuffer
+    have been fully realized. When the time is recorded, the query result for
+    that object is marked available. QueryCounterANGLE timer queries can be
+    used within a BeginQueryANGLE / EndQueryANGLE block where the <target> is
+    TIME_ELAPSED_ANGLE and it does not affect the result of that query object.
+    The error INVALID_OPERATION is generated if the <id> is already in use
+    within a BeginQueryANGLE/EndQueryANGLE block."
+
+Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
+Requests)
+
+    Add a new section 6.1.9 "Timer Queries":
+
+    "The command
+
+      boolean IsQueryANGLE(uint id);
+
+    returns TRUE if <id> is the name of a query object.  If <id> is zero,
+    or if <id> is a non-zero value that is not the name of a query
+    object, IsQueryANGLE returns FALSE.
+
+    Information about a query target can be queried with the command
+
+      void GetQueryivANGLE(enum target, enum pname, int *params);
+
+    <target> identifies the query target and can be TIME_ELAPSED_ANGLE or
+    TIMESTAMP_ANGLE for timer queries.
+
+    If <pname> is CURRENT_QUERY_ANGLE, the name of the currently active query
+    for <target>, or zero if no query is active, will be placed in <params>.
+
+    If <pname> is QUERY_COUNTER_BITS_ANGLE, the implementation-dependent number
+    of bits used to hold the query result for <target> will be placed in
+    <params>.  The number of query counter bits may be zero, in which case
+    the counter contains no useful information.
+
+    For timer queries (TIME_ELAPSED_ANGLE and TIMESTAMP_ANGLE), if the number
+    of bits is non-zero, the minimum number of bits allowed is 30 which
+    will allow at least 1 second of timing.
+
+    The state of a query object can be queried with the commands
+
+      void GetQueryObjectivANGLE(uint id, enum pname, int *params);
+      void GetQueryObjectuivANGLE(uint id, enum pname, uint *params);
+      void GetQueryObjecti64vANGLE(uint id, enum pname, int64 *params);
+      void GetQueryObjectui64vANGLE(uint id, enum pname, uint64 *params);
+
+    If <id> is not the name of a query object, or if the query object
+    named by <id> is currently active, then an INVALID_OPERATION error is
+    generated.
+
+    If <pname> is QUERY_RESULT_ANGLE, then the query object's result
+    value is returned as a single integer in <params>. If the value is so
+    large in magnitude that it cannot be represented with the requested type,
+    then the nearest value representable using the requested type is
+    returned. If the number of query counter bits for target is zero, then
+    the result is returned as a single integer with the value zero.
+    
+    There may be an indeterminate delay before the above query returns. If
+    <pname> is QUERY_RESULT_AVAILABLE_ANGLE, FALSE is returned if such a delay
+    would be required; otherwise TRUE is returned. It must always be true
+    that if any query object returns a result available of TRUE, all queries
+    of the same type issued prior to that query must also return TRUE.
+
+    Querying the state for a given timer query forces that timer query to
+    complete within a finite amount of time.
+
+    If multiple queries are issued on the same target and id prior to 
+    calling GetQueryObject[u]i[64]vANGLE, the result returned will always be
+    from the last query issued.  The results from any queries before the
+    last one will be lost if the results are not retrieved before starting
+    a new query on the same <target> and <id>."
+
+Errors
+
+    The error INVALID_VALUE is generated if GenQueriesANGLE is called where
+    <n> is negative.
+
+    The error INVALID_VALUE is generated if DeleteQueriesANGLE is called
+    where <n> is negative.
+
+    The error INVALID_OPERATION is generated if BeginQueryANGLE is called
+    when a query of the given <target> is already active.
+
+    The error INVALID_OPERATION is generated if EndQueryANGLE is called
+    when a query of the given <target> is not active.
+
+    The error INVALID_OPERATION is generated if BeginQueryANGLE is called
+    where <id> is zero.
+
+    The error INVALID_OPERATION is generated if BeginQueryANGLE is called
+    where <id> is the name of a query currently in progress.
+    
+    The error INVALID_OPERATION is generated if BeginQueryANGLE is called
+    where <id> is the name of an existing query object whose type does not
+    match <target>.
+
+    The error INVALID_ENUM is generated if BeginQueryANGLE or EndQueryANGLE
+    is called where <target> is not TIME_ELAPSED_ANGLE.
+
+    The error INVALID_ENUM is generated if GetQueryivANGLE is called where
+    <target> is not TIME_ELAPSED_ANGLE or TIMESTAMP_ANGLE.
+
+    The error INVALID_ENUM is generated if GetQueryivANGLE is called where
+    <pname> is not QUERY_COUNTER_BITS_ANGLE or CURRENT_QUERY_ANGLE.
+
+    The error INVALID_ENUM is generated if QueryCounterANGLE is called where
+    <target> is not TIMESTAMP_ANGLE.
+
+    The error INVALID_OPERATION is generated if QueryCounterANGLE is called
+    on a query object that is already in use inside a
+    BeginQueryANGLE/EndQueryANGLE.
+
+    The error INVALID_OPERATION is generated if GetQueryObjectivANGLE,
+    GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or
+    GetQueryObjectui64vANGLE is called where <id> is not the name of a query
+    object.
+
+    The error INVALID_OPERATION is generated if GetQueryObjectivANGLE,
+    GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or
+    GetQueryObjectui64vANGLE is called where <id> is the name of a currently
+    active query object.
+
+    The error INVALID_ENUM is generated if GetQueryObjectivANGLE,
+    GetQueryObjectuivANGLE, GetQueryObjecti64vANGLE, or
+    GetQueryObjectui64vANGLE is called where <pname> is not
+    QUERY_RESULT_ANGLE or QUERY_RESULT_AVAILABLE_ANGLE.
+
+New State
+
+    (Add a new table 6.xx, "Query Operations")
+    
+    Get Value                      Type    Get Command              Initial Value   Description              Sec
+    ---------                      ----    -----------              -------------   -----------              ------
+    -                              B       -                        FALSE           query active             5.3
+    CURRENT_QUERY_ANGLE            Z+      GetQueryivANGLE          0               active query ID          5.3
+    QUERY_RESULT_ANGLE             Z+      GetQueryObjectuivANGLE,  0               samples-passed count     5.3
+                                           GetQueryObjectui64vANGLE
+    QUERY_RESULT_AVAILABLE_ANGLE   B       GetQueryObjectivANGLE    FALSE           query result available   5.3
+
+New Implementation Dependent State
+
+    (Add the following entry to table 6.18):
+
+    Get Value                      Type    Get Command      Minimum Value      Description           Sec
+    --------------------------     ----    -----------      -------------      ----------------      ------
+    QUERY_COUNTER_BITS_ANGLE       Z+      GetQueryivANGLE  see 6.1.9          Number of bits in     6.1.9
+                                                                               query counter
+
+Examples
+
+    (1) Here is some rough sample code that demonstrates the intended usage
+        of this extension.
+
+        GLint queries[N];
+        GLint available = 0;
+        // timer queries can contain more than 32 bits of data, so always
+        // query them using the 64 bit types to avoid overflow
+        GLuint64ANGLE timeElapsed = 0;
+
+        // Create a query object.
+        glGenQueriesANGLE(N, queries);
+
+        // Start query 1
+        glBeginQueryANGLE(GL_TIME_ELAPSED_ANGLE, queries[0]);
+
+        // Draw object 1
+        ....
+
+        // End query 1
+        glEndQueryANGLE(GL_TIME_ELAPSED_ANGLE);
+
+        ...
+
+        // Start query N
+        glBeginQueryANGLE(GL_TIME_ELAPSED_ANGLE, queries[N-1]);
+
+        // Draw object N
+        ....
+
+        // End query N
+        glEndQueryANGLE(GL_TIME_ELAPSED_ANGLE);
+
+        // Wait for all results to become available
+        while (!available) {
+            glGetQueryObjectivANGLE(queries[N-1], GL_QUERY_RESULT_AVAILABLE_ANGLE, &available);
+        }
+
+        for (i = 0; i < N; i++) {
+            // See how much time the rendering of object i took in nanoseconds.
+            glGetQueryObjectui64vANGLE(queries[i], GL_QUERY_RESULT_ANGLE, &timeElapsed);
+
+            // Do something useful with the time.  Note that care should be
+            // taken to use all significant bits of the result, not just the
+            // least significant 32 bits.
+            AdjustObjectLODBasedOnDrawTime(i, timeElapsed);
+        }
+
+        This example is sub-optimal in that it stalls at the end of every
+        frame to wait for query results.  Ideally, the collection of results
+        would be delayed one frame to minimize the amount of time spent
+        waiting for the GPU to finish rendering.
+        
+    (2) This example is basically the same as the example above but uses
+        QueryCounter instead.
+    
+        GLint queries[N+1];
+        GLint available = 0;
+        // timer queries can contain more than 32 bits of data, so always
+        // query them using the 64 bit types to avoid overflow
+        GLuint64ANGLE timeStart, timeEnd, timeElapsed = 0;
+
+        // Create a query object.
+        glGenQueriesANGLE(N+1, queries);
+
+        // Query current timestamp 1
+        glQueryCounterANGLE(queries[0], GL_TIMESTAMP_ANGLE);
+
+        // Draw object 1
+        ....
+
+        // Query current timestamp N
+        glQueryCounterANGLE(queries[N-1], GL_TIMESTAMP_ANGLE);
+
+        // Draw object N
+        ....
+
+        // Query current timestamp N+1
+        glQueryCounterANGLE(queries[N], GL_TIMESTAMP_ANGLE);
+
+        // Wait for all results to become available
+        while (!available) {
+            glGetQueryObjectivANGLE(queries[N], GL_QUERY_RESULT_AVAILABLE_ANGLE, &available);
+        }
+
+        for (i = 0; i < N; i++) {
+            // See how much time the rendering of object i took in nanoseconds.
+            glGetQueryObjectui64vANGLE(queries[i], GL_QUERY_RESULT_ANGLE, &timeStart);
+            glGetQueryObjectui64vANGLE(queries[i+1], GL_QUERY_RESULT_ANGLE, &timeEnd);
+            timeElapsed = timeEnd - timeStart;
+
+            // Do something useful with the time.  Note that care should be
+            // taken to use all significant bits of the result, not just the
+            // least significant 32 bits.
+            AdjustObjectLODBasedOnDrawTime(i, timeElapsed);
+        }
+
+Issues from EXT_timer_query
+
+    (1) What time interval is being measured?
+
+    RESOLVED:  The timer starts when all commands prior to BeginQuery() have
+    been fully executed.  At that point, everything that should be drawn by
+    those commands has been written to the framebuffer.  The timer stops
+    when all commands prior to EndQuery() have been fully executed.
+
+    (2) What unit of time will time intervals be returned in?
+
+    RESOLVED:  Nanoseconds (10^-9 seconds).  This unit of measurement allows
+    for reasonably accurate timing of even small blocks of rendering
+    commands.  The granularity of the timer is implementation-dependent.  A
+    32-bit query counter can express intervals of up to approximately 4
+    seconds.
+
+    (3) What should be the minimum number of counter bits for timer queries?
+
+    RESOLVED:  30 bits, which will allow timing sections that take up to 1
+    second to render.
+
+    (4) How are counter results of more than 32 bits returned?
+
+    RESOLVED:  Via two new datatypes, int64ANGLE and uint64ANGLE, and their
+    corresponding GetQueryObject entry points.  These types hold integer
+    values and have a minimum bit width of 64.
+
+    (5) Should the extension measure total time elapsed between the full
+        completion of the BeginQuery and EndQuery commands, or just time
+        spent in the graphics library?
+
+    RESOLVED:  This extension will measure the total time elapsed between
+    the full completion of these commands.  Future extensions may implement
+    a query to determine time elapsed at different stages of the graphics
+    pipeline.
+
+    (6) If multiple query types are supported, can multiple query types be
+        active simultaneously?
+
+    RESOLVED:  Yes; an application may perform a timer query and another
+    type of query simultaneously.  An application can not perform multiple
+    timer queries or multiple queries of other types simultaneously.  An
+    application also can not use the same query object for another query
+    and a timer query simultaneously.
+
+    (7) Do query objects have a query type permanently associated with them?
+
+    RESOLVED:  No.  A single query object can be used to perform different
+    types of queries, but not at the same time.
+
+    Having a fixed type for each query object simplifies some aspects of the
+    implementation -- not having to deal with queries with different result
+    sizes, for example.  It would also mean that BeginQuery() with a query
+    object of the "wrong" type would result in an INVALID_OPERATION error.
+
+    UPDATE: This resolution was relevant for EXT_timer_query and OpenGL 2.0.
+    Since EXT_transform_feedback has since been incorporated into the core,
+    the resolution is that BeginQuery will generate error INVALID_OPERATION
+    if <id> represents a query object of a different type.
+
+    (8) How predictable/repeatable are the results returned by the timer
+        query?
+
+    RESOLVED:  In general, the amount of time needed to render the same
+    primitives should be fairly constant.  But there may be many other
+    system issues (e.g., context switching on the CPU and GPU, virtual
+    memory page faults, memory cache behavior on the CPU and GPU) that can
+    cause times to vary wildly.
+
+    Note that modern GPUs are generally highly pipelined, and may be
+    processing different primitives in different pipeline stages
+    simultaneously.  In this extension, the timers start and stop when the
+    BeginQuery/EndQuery commands reach the bottom of the rendering pipeline.
+    What that means is that by the time the timer starts, the GL driver on
+    the CPU may have started work on GL commands issued after BeginQuery,
+    and the higher pipeline stages (e.g., vertex transformation) may have
+    started as well.
+
+   (9) What should the new 64 bit integer type be called?
+
+    RESOLVED: The new types will be called GLint64ANGLE/GLuint64ANGLE.  The new
+    command suffixes will be i64 and ui64.  These names clearly convey the
+    minimum size of the types.  These types are similar to the C99 standard
+    type int_least64_t, but we use names similar to the C99 optional type
+    int64_t for simplicity.
+
+Issues from ARB_timer_query
+
+   (10) What about tile-based implementations? The effects of a command are
+        not complete until the frame is completely rendered. Timing recorded
+        before the frame is complete may not be what developers expect. Also
+        the amount of time needed to render the same primitives is not
+        consistent, which conflicts with issue (8) above. The time depends on
+        how early or late in the scene it is placed.
+
+    RESOLVED: The current language supports tile-based rendering okay as it
+    is written. Developers are warned that using timers on tile-based
+    implementation may not produce results they expect since rendering is not
+    done in a linear order. Timing results are calculated when the frame is
+    completed and may depend on how early or late in the scene it is placed.
+    
+   (11) Can the GL implementation use different clocks to implement the
+        TIME_ELAPSED and TIMESTAMP queries?
+
+   RESOLVED: Yes, the implemenation can use different internal clocks to
+   implement TIME_ELAPSED and TIMESTAMP. If different clocks are
+   used it is possible there is a slight discrepancy when comparing queries
+   made from TIME_ELAPSED and TIMESTAMP; they may have slight
+   differences when both are used to measure the same sequence. However, this
+   is unlikely to affect real applications since comparing the two queries is
+   not expected to be useful.
+
+Issues
+
+    (12) What should we call this extension?
+
+    RESOLVED: ANGLE_timer_query
+
+    (13) Why is this done as a separate extension instead of just supporting
+         ARB_timer_query?
+
+    ARB_timer_query is written against OpenGL 3.2, which includes a lot of
+    the required support for dealing with query objects. None of these
+    functions or tokens exist in OpenGL ES, and as such have to be added in
+    this specification.
+
+    (14) How does this extension differ from ARB_timer_query?
+
+    This extension contains most ARB_timer_query behavior unchanged as well
+    as a subset of the query support required to use it from the core
+    OpenGL 3.2 spec. It omits the glGetInteger(TIMESTAMP) functionality used to
+    query the current time on the GPU, but the behavior for all remaining
+    functionality taken from ARB_timer_query is the same.
+    
+    (15) Are query objects shareable between multiple contexts?
+
+    RESOLVED: No.  Query objects are lightweight and we normally share 
+    large data across contexts.  Also, being able to share query objects
+    across contexts is not particularly useful.  In order to do the async 
+    query across contexts, a query on one context would have to be finished 
+    before the other context could query it. 
+
+Revision History
+
+    Revision 1, 2011/04/28
+      - copied from revision 9 of ARB_timer_query and revision 7 of
+        ARB_occlusion_query
+      - removed language that was clearly not relevant to ES2
+      - rebased changes against the OpenGL ES 2.0 specification
diff --git a/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj b/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj
index 35ffe80..38786f7 100644
--- a/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj
+++ b/samples/angle/Simple_Instancing/Simple_Instancing.vcxproj
@@ -1,105 +1,105 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{EB6E138B-9DE5-41E8-A127-3675AA2BA607}</ProjectGuid>

-    <RootNamespace>Simple_Texture2D</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-    <ProjectName>Simple_Instancing</ProjectName>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../../gles2_book/Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../../gles2_book/Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="Simple_Instancing.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\..\gles2_book\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{EB6E138B-9DE5-41E8-A127-3675AA2BA607}</ProjectGuid>
+    <RootNamespace>Simple_Texture2D</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+    <ProjectName>Simple_Instancing</ProjectName>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../../gles2_book/Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../../gles2_book/Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Simple_Instancing.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\gles2_book\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/Common/esUtil.vcxproj b/samples/gles2_book/Common/esUtil.vcxproj
index 8619f2c..9f05804 100644
--- a/samples/gles2_book/Common/esUtil.vcxproj
+++ b/samples/gles2_book/Common/esUtil.vcxproj
@@ -1,103 +1,103 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}</ProjectGuid>

-    <RootNamespace>esUtil</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>StaticLibrary</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>StaticLibrary</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>./;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>./;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="Win32\esUtil_TGA.c" />

-    <ClCompile Include="Win32\esUtil_win32.c" />

-    <ClCompile Include="esShader.c" />

-    <ClCompile Include="esShapes.c" />

-    <ClCompile Include="esTransform.c" />

-    <ClCompile Include="esUtil.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ClInclude Include="esUtil_win.h" />

-    <ClInclude Include="esUtil.h" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\..\..\src\libEGL\libEGL.vcxproj">

-      <Project>{e746fca9-64c3-433e-85e8-9a5a67ab7ed6}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-      <Private>true</Private>

-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>

-      <LinkLibraryDependencies>true</LinkLibraryDependencies>

-      <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>

-    </ProjectReference>

-    <ProjectReference Include="..\..\..\src\libGLESv2\libGLESv2.vcxproj">

-      <Project>{b5871a7a-968c-42e3-a33b-981e6f448e78}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-      <Private>true</Private>

-      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>

-      <LinkLibraryDependencies>true</LinkLibraryDependencies>

-      <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}</ProjectGuid>
+    <RootNamespace>esUtil</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>./;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>./;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Win32\esUtil_TGA.c" />
+    <ClCompile Include="Win32\esUtil_win32.c" />
+    <ClCompile Include="esShader.c" />
+    <ClCompile Include="esShapes.c" />
+    <ClCompile Include="esTransform.c" />
+    <ClCompile Include="esUtil.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="esUtil_win.h" />
+    <ClInclude Include="esUtil.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\src\libEGL\libEGL.vcxproj">
+      <Project>{e746fca9-64c3-433e-85e8-9a5a67ab7ed6}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+      <Private>true</Private>
+      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+      <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\src\libGLESv2\libGLESv2.vcxproj">
+      <Project>{b5871a7a-968c-42e3-a33b-981e6f448e78}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+      <Private>true</Private>
+      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+      <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/Common/esUtil.vcxproj.filters b/samples/gles2_book/Common/esUtil.vcxproj.filters
index b2eb584..0b81a0a 100644
--- a/samples/gles2_book/Common/esUtil.vcxproj.filters
+++ b/samples/gles2_book/Common/esUtil.vcxproj.filters
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup>

-    <Filter Include="Win32">

-      <UniqueIdentifier>{8b3de51d-fe0c-4a62-aa51-feb196406ff8}</UniqueIdentifier>

-    </Filter>

-    <Filter Include="Common">

-      <UniqueIdentifier>{cdf112d8-e32a-47f8-8095-2b433bc4fc0f}</UniqueIdentifier>

-    </Filter>

-  </ItemGroup>

-  <ItemGroup>

-    <ClCompile Include="Win32\esUtil_TGA.c">

-      <Filter>Win32</Filter>

-    </ClCompile>

-    <ClCompile Include="Win32\esUtil_win32.c">

-      <Filter>Win32</Filter>

-    </ClCompile>

-    <ClCompile Include="esShader.c">

-      <Filter>Common</Filter>

-    </ClCompile>

-    <ClCompile Include="esShapes.c">

-      <Filter>Common</Filter>

-    </ClCompile>

-    <ClCompile Include="esTransform.c">

-      <Filter>Common</Filter>

-    </ClCompile>

-    <ClCompile Include="esUtil.c">

-      <Filter>Common</Filter>

-    </ClCompile>

-  </ItemGroup>

-  <ItemGroup>

-    <ClInclude Include="esUtil_win.h">

-      <Filter>Win32</Filter>

-    </ClInclude>

-    <ClInclude Include="esUtil.h">

-      <Filter>Common</Filter>

-    </ClInclude>

-  </ItemGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Win32">
+      <UniqueIdentifier>{8b3de51d-fe0c-4a62-aa51-feb196406ff8}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Common">
+      <UniqueIdentifier>{cdf112d8-e32a-47f8-8095-2b433bc4fc0f}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="Win32\esUtil_TGA.c">
+      <Filter>Win32</Filter>
+    </ClCompile>
+    <ClCompile Include="Win32\esUtil_win32.c">
+      <Filter>Win32</Filter>
+    </ClCompile>
+    <ClCompile Include="esShader.c">
+      <Filter>Common</Filter>
+    </ClCompile>
+    <ClCompile Include="esShapes.c">
+      <Filter>Common</Filter>
+    </ClCompile>
+    <ClCompile Include="esTransform.c">
+      <Filter>Common</Filter>
+    </ClCompile>
+    <ClCompile Include="esUtil.c">
+      <Filter>Common</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="esUtil_win.h">
+      <Filter>Win32</Filter>
+    </ClInclude>
+    <ClInclude Include="esUtil.h">
+      <Filter>Common</Filter>
+    </ClInclude>
+  </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj b/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj
index 2267d93..9de5715 100644
--- a/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj
+++ b/samples/gles2_book/Hello_Triangle/Hello_Triangle.vcxproj
@@ -1,105 +1,105 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{8278251F-6C1F-4D80-8499-FA7B590FAFE6}</ProjectGuid>

-    <RootNamespace>Hello_Triangle</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="Hello_Triangle.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{8278251F-6C1F-4D80-8499-FA7B590FAFE6}</ProjectGuid>
+    <RootNamespace>Hello_Triangle</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Hello_Triangle.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/MipMap2D/MipMap2D.vcxproj b/samples/gles2_book/MipMap2D/MipMap2D.vcxproj
index bc9dc4d..da116d4 100644
--- a/samples/gles2_book/MipMap2D/MipMap2D.vcxproj
+++ b/samples/gles2_book/MipMap2D/MipMap2D.vcxproj
@@ -1,105 +1,105 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}</ProjectGuid>

-    <RootNamespace>MipMap2D</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="MipMap2D.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}</ProjectGuid>
+    <RootNamespace>MipMap2D</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="MipMap2D.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/MultiTexture/MultiTexture.vcxproj b/samples/gles2_book/MultiTexture/MultiTexture.vcxproj
index b0ee09c..0edf522 100644
--- a/samples/gles2_book/MultiTexture/MultiTexture.vcxproj
+++ b/samples/gles2_book/MultiTexture/MultiTexture.vcxproj
@@ -1,115 +1,115 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{120CFF94-ED4B-4C5B-9587-9E40889F15F7}</ProjectGuid>

-    <RootNamespace>MultiTexture</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-    <PostBuildEvent>

-      <Command>xcopy /D /Y basemap.tga "$(OutDir)"

-xcopy /D /Y lightmap.tga "$(OutDir)"

-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-    <PostBuildEvent>

-      <Command>xcopy /D /Y basemap.tga "$(OutDir)"

-xcopy /D /Y lightmap.tga "$(OutDir)"

-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="MultiTexture.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{120CFF94-ED4B-4C5B-9587-9E40889F15F7}</ProjectGuid>
+    <RootNamespace>MultiTexture</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <PostBuildEvent>
+      <Command>xcopy /D /Y basemap.tga "$(OutDir)"
+xcopy /D /Y lightmap.tga "$(OutDir)"
+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <PostBuildEvent>
+      <Command>xcopy /D /Y basemap.tga "$(OutDir)"
+xcopy /D /Y lightmap.tga "$(OutDir)"
+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="MultiTexture.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj b/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj
index 58ea280..234512b 100644
--- a/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj
+++ b/samples/gles2_book/MultipleRenderTargets/MultipleRenderTargets.vcxproj
@@ -1,105 +1,105 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}</ProjectGuid>

-    <RootNamespace>MultipleRenderTargets</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="MultipleRenderTargets.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}</ProjectGuid>
+    <RootNamespace>MultipleRenderTargets</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="MultipleRenderTargets.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj b/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj
index 3e07a05..60a6d6a 100644
--- a/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj
+++ b/samples/gles2_book/ParticleSystem/ParticleSystem.vcxproj
@@ -1,111 +1,111 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{B9E5BFFC-D843-4E0E-9D3E-23913A613473}</ProjectGuid>

-    <RootNamespace>ParticleSystem</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-    <PostBuildEvent>

-      <Command>xcopy /D /Y smoke.tga "$(outDir)"</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-    <PostBuildEvent>

-      <Command>xcopy /D /Y smoke.tga "$(outDir)"</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="ParticleSystem.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B9E5BFFC-D843-4E0E-9D3E-23913A613473}</ProjectGuid>
+    <RootNamespace>ParticleSystem</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <PostBuildEvent>
+      <Command>xcopy /D /Y smoke.tga "$(outDir)"</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <PostBuildEvent>
+      <Command>xcopy /D /Y smoke.tga "$(outDir)"</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="ParticleSystem.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj b/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj
index 488034b..875d163 100644
--- a/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj
+++ b/samples/gles2_book/PostSubBuffer/PostSubBuffer.vcxproj
@@ -1,105 +1,105 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{667CE95F-5DD8-4495-8C18-5CA8A175B12D}</ProjectGuid>

-    <RootNamespace>Simple_VertexShader</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="PostSubBuffer.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{667CE95F-5DD8-4495-8C18-5CA8A175B12D}</ProjectGuid>
+    <RootNamespace>Simple_VertexShader</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="PostSubBuffer.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj b/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj
index 2e755bb..d6210a3 100644
--- a/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj
+++ b/samples/gles2_book/Simple_Texture2D/Simple_Texture2D.vcxproj
@@ -1,105 +1,105 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{2E54D748-781B-4DF2-A1DD-B9384A821810}</ProjectGuid>

-    <RootNamespace>Simple_Texture2D</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="Simple_Texture2D.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2E54D748-781B-4DF2-A1DD-B9384A821810}</ProjectGuid>
+    <RootNamespace>Simple_Texture2D</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Simple_Texture2D.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj b/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj
index df2bc01..84e9be0 100644
--- a/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj
+++ b/samples/gles2_book/Simple_TextureCubemap/Simple_TextureCubemap.vcxproj
@@ -1,108 +1,108 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{5EE56061-643D-406E-B42D-4299D2411056}</ProjectGuid>

-    <RootNamespace>Simple_TextureCubemap</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <ProjectReference>

-      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>

-    </ProjectReference>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="Simple_TextureCubemap.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{5EE56061-643D-406E-B42D-4299D2411056}</ProjectGuid>
+    <RootNamespace>Simple_TextureCubemap</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <ProjectReference>
+      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+    </ProjectReference>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Simple_TextureCubemap.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj b/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj
index b3a2928..ed71676 100644
--- a/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj
+++ b/samples/gles2_book/Simple_VertexShader/Simple_VertexShader.vcxproj
@@ -1,105 +1,105 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{667CE95F-5DD8-4395-8C18-5CA8A175B12D}</ProjectGuid>

-    <RootNamespace>Simple_VertexShader</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="Simple_VertexShader.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{667CE95F-5DD8-4395-8C18-5CA8A175B12D}</ProjectGuid>
+    <RootNamespace>Simple_VertexShader</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Simple_VertexShader.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj b/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj
index 2b829a9..8891553 100644
--- a/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj
+++ b/samples/gles2_book/Stencil_Test/Stencil_Test.vcxproj
@@ -1,97 +1,97 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}</ProjectGuid>

-    <RootNamespace>Stencil_Test</RootNamespace>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>MultiByte</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>MultiByte</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="Stencil_Test.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}</ProjectGuid>
+    <RootNamespace>Stencil_Test</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Stencil_Test.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/gles2_book/TextureWrap/TextureWrap.vcxproj b/samples/gles2_book/TextureWrap/TextureWrap.vcxproj
index 076b8b6..eff3e11 100644
--- a/samples/gles2_book/TextureWrap/TextureWrap.vcxproj
+++ b/samples/gles2_book/TextureWrap/TextureWrap.vcxproj
@@ -1,105 +1,105 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{CC1DE9A2-B456-4565-9C21-932253E969B9}</ProjectGuid>

-    <RootNamespace>TextureWrap</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>NotSet</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <RandomizedBaseAddress>false</RandomizedBaseAddress>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="TextureWrap.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\Common\esUtil.vcxproj">

-      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>

-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{CC1DE9A2-B456-4565-9C21-932253E969B9}</ProjectGuid>
+    <RootNamespace>TextureWrap</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../Common;../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="TextureWrap.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Common\esUtil.vcxproj">
+      <Project>{47c93f52-ab4e-4ff9-8d4f-b38cd60a183f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/samples.sln b/samples/samples.sln
index cbb2013..9e0ab1f 100644
--- a/samples/samples.sln
+++ b/samples/samples.sln
@@ -1,167 +1,167 @@
-Microsoft Visual Studio Solution File, Format Version 11.00

-# Visual C++ Express 2010

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esUtil", "gles2_book\Common\esUtil.vcxproj", "{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hello_Triangle", "gles2_book\Hello_Triangle\Hello_Triangle.vcxproj", "{8278251F-6C1F-4D80-8499-FA7B590FAFE6}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MipMap2D", "gles2_book\MipMap2D\MipMap2D.vcxproj", "{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultiTexture", "gles2_book\MultiTexture\MultiTexture.vcxproj", "{120CFF94-ED4B-4C5B-9587-9E40889F15F7}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ParticleSystem", "gles2_book\ParticleSystem\ParticleSystem.vcxproj", "{B9E5BFFC-D843-4E0E-9D3E-23913A613473}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_Texture2D", "gles2_book\Simple_Texture2D\Simple_Texture2D.vcxproj", "{2E54D748-781B-4DF2-A1DD-B9384A821810}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_TextureCubemap", "gles2_book\Simple_TextureCubemap\Simple_TextureCubemap.vcxproj", "{5EE56061-643D-406E-B42D-4299D2411056}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_VertexShader", "gles2_book\Simple_VertexShader\Simple_VertexShader.vcxproj", "{667CE95F-5DD8-4395-8C18-5CA8A175B12D}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stencil_Test", "gles2_book\Stencil_Test\Stencil_Test.vcxproj", "{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TextureWrap", "gles2_book\TextureWrap\TextureWrap.vcxproj", "{CC1DE9A2-B456-4565-9C21-932253E969B9}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "..\src\libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "..\src\libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "essl_to_hlsl", "translator\essl_to_hlsl.vcxproj", "{E12EA115-EBC7-47C2-B651-30A0CE986025}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostSubBuffer", "gles2_book\PostSubBuffer\PostSubBuffer.vcxproj", "{667CE95F-5DD8-4495-8C18-5CA8A175B12D}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "..\src\compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_Instancing", "angle\Simple_Instancing\Simple_Instancing.vcxproj", "{EB6E138B-9DE5-41E8-A127-3675AA2BA607}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultipleRenderTargets", "gles2_book\MultipleRenderTargets\MultipleRenderTargets.vcxproj", "{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator", "..\src\compiler\translator.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}"

-EndProject

-Global

-	GlobalSection(SolutionConfigurationPlatforms) = preSolution

-		Debug|Win32 = Debug|Win32

-		Debug|x64 = Debug|x64

-		Release|Win32 = Release|Win32

-		Release|x64 = Release|x64

-	EndGlobalSection

-	GlobalSection(ProjectConfigurationPlatforms) = postSolution

-		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|Win32.ActiveCfg = Debug|Win32

-		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|Win32.Build.0 = Debug|Win32

-		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|x64.ActiveCfg = Debug|Win32

-		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|Win32.ActiveCfg = Release|Win32

-		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|Win32.Build.0 = Release|Win32

-		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|x64.ActiveCfg = Release|Win32

-		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|Win32.ActiveCfg = Debug|Win32

-		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|Win32.Build.0 = Debug|Win32

-		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|x64.ActiveCfg = Debug|Win32

-		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|Win32.ActiveCfg = Release|Win32

-		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|Win32.Build.0 = Release|Win32

-		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|x64.ActiveCfg = Release|Win32

-		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|Win32.ActiveCfg = Debug|Win32

-		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|Win32.Build.0 = Debug|Win32

-		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|x64.ActiveCfg = Debug|Win32

-		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|Win32.ActiveCfg = Release|Win32

-		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|Win32.Build.0 = Release|Win32

-		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|x64.ActiveCfg = Release|Win32

-		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|Win32.ActiveCfg = Debug|Win32

-		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|Win32.Build.0 = Debug|Win32

-		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|x64.ActiveCfg = Debug|Win32

-		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|Win32.ActiveCfg = Release|Win32

-		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|Win32.Build.0 = Release|Win32

-		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|x64.ActiveCfg = Release|Win32

-		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|Win32.ActiveCfg = Debug|Win32

-		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|Win32.Build.0 = Debug|Win32

-		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|x64.ActiveCfg = Debug|Win32

-		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|Win32.ActiveCfg = Release|Win32

-		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|Win32.Build.0 = Release|Win32

-		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|x64.ActiveCfg = Release|Win32

-		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|Win32.ActiveCfg = Debug|Win32

-		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|Win32.Build.0 = Debug|Win32

-		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|x64.ActiveCfg = Debug|Win32

-		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|Win32.ActiveCfg = Release|Win32

-		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|Win32.Build.0 = Release|Win32

-		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|x64.ActiveCfg = Release|Win32

-		{5EE56061-643D-406E-B42D-4299D2411056}.Debug|Win32.ActiveCfg = Debug|Win32

-		{5EE56061-643D-406E-B42D-4299D2411056}.Debug|Win32.Build.0 = Debug|Win32

-		{5EE56061-643D-406E-B42D-4299D2411056}.Debug|x64.ActiveCfg = Debug|Win32

-		{5EE56061-643D-406E-B42D-4299D2411056}.Release|Win32.ActiveCfg = Release|Win32

-		{5EE56061-643D-406E-B42D-4299D2411056}.Release|Win32.Build.0 = Release|Win32

-		{5EE56061-643D-406E-B42D-4299D2411056}.Release|x64.ActiveCfg = Release|Win32

-		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|Win32.ActiveCfg = Debug|Win32

-		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|Win32.Build.0 = Debug|Win32

-		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|x64.ActiveCfg = Debug|Win32

-		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|Win32.ActiveCfg = Release|Win32

-		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|Win32.Build.0 = Release|Win32

-		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|x64.ActiveCfg = Release|Win32

-		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|Win32.ActiveCfg = Debug|Win32

-		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|Win32.Build.0 = Debug|Win32

-		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|x64.ActiveCfg = Debug|Win32

-		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|Win32.ActiveCfg = Release|Win32

-		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|Win32.Build.0 = Release|Win32

-		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|x64.ActiveCfg = Release|Win32

-		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|Win32.ActiveCfg = Debug|Win32

-		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|Win32.Build.0 = Debug|Win32

-		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|x64.ActiveCfg = Debug|Win32

-		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|Win32.ActiveCfg = Release|Win32

-		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|Win32.Build.0 = Release|Win32

-		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|x64.ActiveCfg = Release|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64

-		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|Win32.ActiveCfg = Debug|Win32

-		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|Win32.Build.0 = Debug|Win32

-		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|x64.ActiveCfg = Debug|Win32

-		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|Win32.ActiveCfg = Release|Win32

-		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|Win32.Build.0 = Release|Win32

-		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|x64.ActiveCfg = Release|Win32

-		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|Win32.ActiveCfg = Debug|Win32

-		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|Win32.Build.0 = Debug|Win32

-		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|x64.ActiveCfg = Debug|Win32

-		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|Win32.ActiveCfg = Release|Win32

-		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|Win32.Build.0 = Release|Win32

-		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|x64.ActiveCfg = Release|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64

-		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|Win32.ActiveCfg = Debug|Win32

-		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|Win32.Build.0 = Debug|Win32

-		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|x64.ActiveCfg = Debug|Win32

-		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|Win32.ActiveCfg = Release|Win32

-		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|Win32.Build.0 = Release|Win32

-		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|x64.ActiveCfg = Release|Win32

-		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|Win32.ActiveCfg = Debug|Win32

-		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|Win32.Build.0 = Debug|Win32

-		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|x64.ActiveCfg = Debug|Win32

-		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|Win32.ActiveCfg = Release|Win32

-		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|Win32.Build.0 = Release|Win32

-		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|x64.ActiveCfg = Release|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64

-	EndGlobalSection

-	GlobalSection(SolutionProperties) = preSolution

-		HideSolutionNode = FALSE

-	EndGlobalSection

-EndGlobal

+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esUtil", "gles2_book\Common\esUtil.vcxproj", "{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hello_Triangle", "gles2_book\Hello_Triangle\Hello_Triangle.vcxproj", "{8278251F-6C1F-4D80-8499-FA7B590FAFE6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MipMap2D", "gles2_book\MipMap2D\MipMap2D.vcxproj", "{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultiTexture", "gles2_book\MultiTexture\MultiTexture.vcxproj", "{120CFF94-ED4B-4C5B-9587-9E40889F15F7}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ParticleSystem", "gles2_book\ParticleSystem\ParticleSystem.vcxproj", "{B9E5BFFC-D843-4E0E-9D3E-23913A613473}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_Texture2D", "gles2_book\Simple_Texture2D\Simple_Texture2D.vcxproj", "{2E54D748-781B-4DF2-A1DD-B9384A821810}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_TextureCubemap", "gles2_book\Simple_TextureCubemap\Simple_TextureCubemap.vcxproj", "{5EE56061-643D-406E-B42D-4299D2411056}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_VertexShader", "gles2_book\Simple_VertexShader\Simple_VertexShader.vcxproj", "{667CE95F-5DD8-4395-8C18-5CA8A175B12D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stencil_Test", "gles2_book\Stencil_Test\Stencil_Test.vcxproj", "{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TextureWrap", "gles2_book\TextureWrap\TextureWrap.vcxproj", "{CC1DE9A2-B456-4565-9C21-932253E969B9}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "..\src\libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "..\src\libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "essl_to_hlsl", "translator\essl_to_hlsl.vcxproj", "{E12EA115-EBC7-47C2-B651-30A0CE986025}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PostSubBuffer", "gles2_book\PostSubBuffer\PostSubBuffer.vcxproj", "{667CE95F-5DD8-4495-8C18-5CA8A175B12D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "..\src\compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_Instancing", "angle\Simple_Instancing\Simple_Instancing.vcxproj", "{EB6E138B-9DE5-41E8-A127-3675AA2BA607}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MultipleRenderTargets", "gles2_book\MultipleRenderTargets\MultipleRenderTargets.vcxproj", "{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator", "..\src\compiler\translator.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|Win32.Build.0 = Debug|Win32
+		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Debug|x64.ActiveCfg = Debug|Win32
+		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|Win32.ActiveCfg = Release|Win32
+		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|Win32.Build.0 = Release|Win32
+		{47C93F52-AB4E-4FF9-8D4F-B38CD60A183F}.Release|x64.ActiveCfg = Release|Win32
+		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|Win32.Build.0 = Debug|Win32
+		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Debug|x64.ActiveCfg = Debug|Win32
+		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|Win32.ActiveCfg = Release|Win32
+		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|Win32.Build.0 = Release|Win32
+		{8278251F-6C1F-4D80-8499-FA7B590FAFE6}.Release|x64.ActiveCfg = Release|Win32
+		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|Win32.Build.0 = Debug|Win32
+		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Debug|x64.ActiveCfg = Debug|Win32
+		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|Win32.ActiveCfg = Release|Win32
+		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|Win32.Build.0 = Release|Win32
+		{4E69AC1F-1C7A-4D58-917C-E764FBEB489A}.Release|x64.ActiveCfg = Release|Win32
+		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|Win32.ActiveCfg = Debug|Win32
+		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|Win32.Build.0 = Debug|Win32
+		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Debug|x64.ActiveCfg = Debug|Win32
+		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|Win32.ActiveCfg = Release|Win32
+		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|Win32.Build.0 = Release|Win32
+		{120CFF94-ED4B-4C5B-9587-9E40889F15F7}.Release|x64.ActiveCfg = Release|Win32
+		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|Win32.Build.0 = Debug|Win32
+		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Debug|x64.ActiveCfg = Debug|Win32
+		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|Win32.ActiveCfg = Release|Win32
+		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|Win32.Build.0 = Release|Win32
+		{B9E5BFFC-D843-4E0E-9D3E-23913A613473}.Release|x64.ActiveCfg = Release|Win32
+		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|Win32.Build.0 = Debug|Win32
+		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Debug|x64.ActiveCfg = Debug|Win32
+		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|Win32.ActiveCfg = Release|Win32
+		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|Win32.Build.0 = Release|Win32
+		{2E54D748-781B-4DF2-A1DD-B9384A821810}.Release|x64.ActiveCfg = Release|Win32
+		{5EE56061-643D-406E-B42D-4299D2411056}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5EE56061-643D-406E-B42D-4299D2411056}.Debug|Win32.Build.0 = Debug|Win32
+		{5EE56061-643D-406E-B42D-4299D2411056}.Debug|x64.ActiveCfg = Debug|Win32
+		{5EE56061-643D-406E-B42D-4299D2411056}.Release|Win32.ActiveCfg = Release|Win32
+		{5EE56061-643D-406E-B42D-4299D2411056}.Release|Win32.Build.0 = Release|Win32
+		{5EE56061-643D-406E-B42D-4299D2411056}.Release|x64.ActiveCfg = Release|Win32
+		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|Win32.Build.0 = Debug|Win32
+		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Debug|x64.ActiveCfg = Debug|Win32
+		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|Win32.ActiveCfg = Release|Win32
+		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|Win32.Build.0 = Release|Win32
+		{667CE95F-5DD8-4395-8C18-5CA8A175B12D}.Release|x64.ActiveCfg = Release|Win32
+		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|Win32.ActiveCfg = Debug|Win32
+		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|Win32.Build.0 = Debug|Win32
+		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Debug|x64.ActiveCfg = Debug|Win32
+		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|Win32.ActiveCfg = Release|Win32
+		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|Win32.Build.0 = Release|Win32
+		{EEACE995-26BC-4D56-A8B3-3E7A9AB3EB26}.Release|x64.ActiveCfg = Release|Win32
+		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|Win32.Build.0 = Debug|Win32
+		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Debug|x64.ActiveCfg = Debug|Win32
+		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|Win32.ActiveCfg = Release|Win32
+		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|Win32.Build.0 = Release|Win32
+		{CC1DE9A2-B456-4565-9C21-932253E969B9}.Release|x64.ActiveCfg = Release|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64
+		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|Win32.Build.0 = Debug|Win32
+		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Debug|x64.ActiveCfg = Debug|Win32
+		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|Win32.ActiveCfg = Release|Win32
+		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|Win32.Build.0 = Release|Win32
+		{E12EA115-EBC7-47C2-B651-30A0CE986025}.Release|x64.ActiveCfg = Release|Win32
+		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|Win32.Build.0 = Debug|Win32
+		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Debug|x64.ActiveCfg = Debug|Win32
+		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|Win32.ActiveCfg = Release|Win32
+		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|Win32.Build.0 = Release|Win32
+		{667CE95F-5DD8-4495-8C18-5CA8A175B12D}.Release|x64.ActiveCfg = Release|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64
+		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|Win32.ActiveCfg = Debug|Win32
+		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|Win32.Build.0 = Debug|Win32
+		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Debug|x64.ActiveCfg = Debug|Win32
+		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|Win32.ActiveCfg = Release|Win32
+		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|Win32.Build.0 = Release|Win32
+		{EB6E138B-9DE5-41E8-A127-3675AA2BA607}.Release|x64.ActiveCfg = Release|Win32
+		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|Win32.Build.0 = Debug|Win32
+		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Debug|x64.ActiveCfg = Debug|Win32
+		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|Win32.ActiveCfg = Release|Win32
+		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|Win32.Build.0 = Release|Win32
+		{DD670DCB-2554-4FAE-B7C9-D7F0C3087C10}.Release|x64.ActiveCfg = Release|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/samples/translator/essl_to_glsl.vcproj b/samples/translator/essl_to_glsl.vcproj
index 0a0c097..027632c 100644
--- a/samples/translator/essl_to_glsl.vcproj
+++ b/samples/translator/essl_to_glsl.vcproj
@@ -1,193 +1,193 @@
-<?xml version="1.0" encoding="Windows-1252"?>

-<VisualStudioProject

-	ProjectType="Visual C++"

-	Version="9.00"

-	Name="essl_to_glsl"

-	ProjectGUID="{EADEBCCD-65ED-45D1-9E06-949A21EBAB9E}"

-	RootNamespace="essl_to_glsl"

-	Keyword="Win32Proj"

-	TargetFrameworkVersion="196613"

-	>

-	<Platforms>

-		<Platform

-			Name="Win32"

-		/>

-	</Platforms>

-	<ToolFiles>

-	</ToolFiles>

-	<Configurations>

-		<Configuration

-			Name="Debug|Win32"

-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"

-			IntermediateDirectory="$(ConfigurationName)"

-			ConfigurationType="1"

-			CharacterSet="1"

-			>

-			<Tool

-				Name="VCPreBuildEventTool"

-			/>

-			<Tool

-				Name="VCCustomBuildTool"

-			/>

-			<Tool

-				Name="VCXMLDataGeneratorTool"

-			/>

-			<Tool

-				Name="VCWebServiceProxyGeneratorTool"

-			/>

-			<Tool

-				Name="VCMIDLTool"

-			/>

-			<Tool

-				Name="VCCLCompilerTool"

-				Optimization="0"

-				AdditionalIncludeDirectories="../../include"

-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"

-				MinimalRebuild="true"

-				BasicRuntimeChecks="3"

-				RuntimeLibrary="1"

-				UsePrecompiledHeader="0"

-				WarningLevel="3"

-				DebugInformationFormat="4"

-			/>

-			<Tool

-				Name="VCManagedResourceCompilerTool"

-			/>

-			<Tool

-				Name="VCResourceCompilerTool"

-			/>

-			<Tool

-				Name="VCPreLinkEventTool"

-			/>

-			<Tool

-				Name="VCLinkerTool"

-				LinkIncremental="2"

-				GenerateDebugInformation="true"

-				SubSystem="1"

-				TargetMachine="1"

-			/>

-			<Tool

-				Name="VCALinkTool"

-			/>

-			<Tool

-				Name="VCManifestTool"

-			/>

-			<Tool

-				Name="VCXDCMakeTool"

-			/>

-			<Tool

-				Name="VCBscMakeTool"

-			/>

-			<Tool

-				Name="VCFxCopTool"

-			/>

-			<Tool

-				Name="VCAppVerifierTool"

-			/>

-			<Tool

-				Name="VCPostBuildEventTool"

-			/>

-		</Configuration>

-		<Configuration

-			Name="Release|Win32"

-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"

-			IntermediateDirectory="$(ConfigurationName)"

-			ConfigurationType="1"

-			CharacterSet="1"

-			WholeProgramOptimization="1"

-			>

-			<Tool

-				Name="VCPreBuildEventTool"

-			/>

-			<Tool

-				Name="VCCustomBuildTool"

-			/>

-			<Tool

-				Name="VCXMLDataGeneratorTool"

-			/>

-			<Tool

-				Name="VCWebServiceProxyGeneratorTool"

-			/>

-			<Tool

-				Name="VCMIDLTool"

-			/>

-			<Tool

-				Name="VCCLCompilerTool"

-				Optimization="2"

-				EnableIntrinsicFunctions="true"

-				AdditionalIncludeDirectories="../../include"

-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"

-				RuntimeLibrary="0"

-				EnableFunctionLevelLinking="true"

-				UsePrecompiledHeader="0"

-				WarningLevel="3"

-				DebugInformationFormat="3"

-			/>

-			<Tool

-				Name="VCManagedResourceCompilerTool"

-			/>

-			<Tool

-				Name="VCResourceCompilerTool"

-			/>

-			<Tool

-				Name="VCPreLinkEventTool"

-			/>

-			<Tool

-				Name="VCLinkerTool"

-				LinkIncremental="1"

-				GenerateDebugInformation="true"

-				SubSystem="1"

-				OptimizeReferences="2"

-				EnableCOMDATFolding="2"

-				TargetMachine="1"

-			/>

-			<Tool

-				Name="VCALinkTool"

-			/>

-			<Tool

-				Name="VCManifestTool"

-			/>

-			<Tool

-				Name="VCXDCMakeTool"

-			/>

-			<Tool

-				Name="VCBscMakeTool"

-			/>

-			<Tool

-				Name="VCFxCopTool"

-			/>

-			<Tool

-				Name="VCAppVerifierTool"

-			/>

-			<Tool

-				Name="VCPostBuildEventTool"

-			/>

-		</Configuration>

-	</Configurations>

-	<References>

-	</References>

-	<Files>

-		<Filter

-			Name="Source Files"

-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"

-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

-			>

-			<File

-				RelativePath="..\..\src\common\debug.cpp"

-				>

-			</File>

-			<File

-				RelativePath=".\translator.cpp"

-				>

-			</File>

-		</Filter>

-		<Filter

-			Name="Header Files"

-			Filter="h;hpp;hxx;hm;inl;inc;xsd"

-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

-			>

-		</Filter>

-	</Files>

-	<Globals>

-	</Globals>

-</VisualStudioProject>

+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="essl_to_glsl"
+	ProjectGUID="{EADEBCCD-65ED-45D1-9E06-949A21EBAB9E}"
+	RootNamespace="essl_to_glsl"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../../include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				AdditionalIncludeDirectories="../../include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\common\debug.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\translator.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/samples/translator/essl_to_hlsl.vcxproj b/samples/translator/essl_to_hlsl.vcxproj
index 9569d3a..de6a6a7 100644
--- a/samples/translator/essl_to_hlsl.vcxproj
+++ b/samples/translator/essl_to_hlsl.vcxproj
@@ -1,104 +1,104 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{E12EA115-EBC7-47C2-B651-30A0CE986025}</ProjectGuid>

-    <RootNamespace>essl_to_hlsl</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>Application</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>../../include;../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <Optimization>MaxSpeed</Optimization>

-      <IntrinsicFunctions>true</IntrinsicFunctions>

-      <AdditionalIncludeDirectories>../../include;../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <FunctionLevelLinking>true</FunctionLevelLinking>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level3</WarningLevel>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Console</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="..\..\src\common\debug.cpp" />

-    <ClCompile Include="translator.cpp" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\..\src\compiler\preprocessor\preprocessor.vcxproj">

-      <Project>{fbe32df3-0fb0-4f2f-a424-2c21bd7bc325}</Project>

-    </ProjectReference>

-    <ProjectReference Include="..\..\src\compiler\translator.vcxproj">

-      <Project>{5b3a6db8-1e7e-40d7-92b9-da8aae619fad}</Project>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E12EA115-EBC7-47C2-B651-30A0CE986025}</ProjectGuid>
+    <RootNamespace>essl_to_hlsl</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>../../include;../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <AdditionalIncludeDirectories>../../include;../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\common\debug.cpp" />
+    <ClCompile Include="translator.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\src\compiler\preprocessor\preprocessor.vcxproj">
+      <Project>{fbe32df3-0fb0-4f2f-a424-2c21bd7bc325}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\src\compiler\translator.vcxproj">
+      <Project>{5b3a6db8-1e7e-40d7-92b9-da8aae619fad}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/samples/translator/essl_to_hlsl.vcxproj.filters b/samples/translator/essl_to_hlsl.vcxproj.filters
index b8a21af..ddfed9f 100644
--- a/samples/translator/essl_to_hlsl.vcxproj.filters
+++ b/samples/translator/essl_to_hlsl.vcxproj.filters
@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup>

-    <Filter Include="Source Files">

-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>

-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>

-    </Filter>

-    <Filter Include="Header Files">

-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>

-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>

-    </Filter>

-  </ItemGroup>

-  <ItemGroup>

-    <ClCompile Include="..\..\src\common\debug.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="translator.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-  </ItemGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\common\debug.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="translator.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/src/ANGLE.sln b/src/ANGLE.sln
index 76ff9cb..af932ac 100644
--- a/src/ANGLE.sln
+++ b/src/ANGLE.sln
@@ -1,56 +1,56 @@
-

-Microsoft Visual Studio Solution File, Format Version 11.00

-# Visual C++ Express 2010

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator", "compiler\translator.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}"

-EndProject

-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}"

-EndProject

-Global

-	GlobalSection(SolutionConfigurationPlatforms) = preSolution

-		Debug|Win32 = Debug|Win32

-		Debug|x64 = Debug|x64

-		Release|Win32 = Release|Win32

-		Release|x64 = Release|x64

-	EndGlobalSection

-	GlobalSection(ProjectConfigurationPlatforms) = postSolution

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64

-		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64

-		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64

-		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64

-		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64

-	EndGlobalSection

-	GlobalSection(SolutionProperties) = preSolution

-		HideSolutionNode = FALSE

-	EndGlobalSection

-EndGlobal

+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator", "compiler\translator.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64
+		{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64
+		{B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64
+		{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64
+		{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp
index 2f777d6..1f8538e 100644
--- a/src/compiler/ParseHelper.cpp
+++ b/src/compiler/ParseHelper.cpp
@@ -1,1602 +1,1602 @@
-//

-// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-#include "compiler/ParseHelper.h"

-

-#include <stdarg.h>

-#include <stdio.h>

-

-#include "compiler/glslang.h"

-#include "compiler/preprocessor/SourceLocation.h"

-

-///////////////////////////////////////////////////////////////////////

-//

-// Sub- vector and matrix fields

-//

-////////////////////////////////////////////////////////////////////////

-

-//

-// Look at a '.' field selector string and change it into offsets

-// for a vector.

-//

-bool TParseContext::parseVectorFields(const TString& compString, int vecSize, TVectorFields& fields, const TSourceLoc& line)

-{

-    fields.num = (int) compString.size();

-    if (fields.num > 4) {

-        error(line, "illegal vector field selection", compString.c_str());

-        return false;

-    }

-

-    enum {

-        exyzw,

-        ergba,

-        estpq

-    } fieldSet[4];

-

-    for (int i = 0; i < fields.num; ++i) {

-        switch (compString[i])  {

-        case 'x': 

-            fields.offsets[i] = 0;

-            fieldSet[i] = exyzw;

-            break;

-        case 'r': 

-            fields.offsets[i] = 0;

-            fieldSet[i] = ergba;

-            break;

-        case 's':

-            fields.offsets[i] = 0;

-            fieldSet[i] = estpq;

-            break;

-        case 'y': 

-            fields.offsets[i] = 1;

-            fieldSet[i] = exyzw;

-            break;

-        case 'g': 

-            fields.offsets[i] = 1;

-            fieldSet[i] = ergba;

-            break;

-        case 't':

-            fields.offsets[i] = 1;

-            fieldSet[i] = estpq;

-            break;

-        case 'z': 

-            fields.offsets[i] = 2;

-            fieldSet[i] = exyzw;

-            break;

-        case 'b': 

-            fields.offsets[i] = 2;

-            fieldSet[i] = ergba;

-            break;

-        case 'p':

-            fields.offsets[i] = 2;

-            fieldSet[i] = estpq;

-            break;

-        

-        case 'w': 

-            fields.offsets[i] = 3;

-            fieldSet[i] = exyzw;

-            break;

-        case 'a': 

-            fields.offsets[i] = 3;

-            fieldSet[i] = ergba;

-            break;

-        case 'q':

-            fields.offsets[i] = 3;

-            fieldSet[i] = estpq;

-            break;

-        default:

-            error(line, "illegal vector field selection", compString.c_str());

-            return false;

-        }

-    }

-

-    for (int i = 0; i < fields.num; ++i) {

-        if (fields.offsets[i] >= vecSize) {

-            error(line, "vector field selection out of range",  compString.c_str());

-            return false;

-        }

-

-        if (i > 0) {

-            if (fieldSet[i] != fieldSet[i-1]) {

-                error(line, "illegal - vector component fields not from the same set", compString.c_str());

-                return false;

-            }

-        }

-    }

-

-    return true;

-}

-

-

-//

-// Look at a '.' field selector string and change it into offsets

-// for a matrix.

-//

-bool TParseContext::parseMatrixFields(const TString& compString, int matSize, TMatrixFields& fields, const TSourceLoc& line)

-{

-    fields.wholeRow = false;

-    fields.wholeCol = false;

-    fields.row = -1;

-    fields.col = -1;

-

-    if (compString.size() != 2) {

-        error(line, "illegal length of matrix field selection", compString.c_str());

-        return false;

-    }

-

-    if (compString[0] == '_') {

-        if (compString[1] < '0' || compString[1] > '3') {

-            error(line, "illegal matrix field selection", compString.c_str());

-            return false;

-        }

-        fields.wholeCol = true;

-        fields.col = compString[1] - '0';

-    } else if (compString[1] == '_') {

-        if (compString[0] < '0' || compString[0] > '3') {

-            error(line, "illegal matrix field selection", compString.c_str());

-            return false;

-        }

-        fields.wholeRow = true;

-        fields.row = compString[0] - '0';

-    } else {

-        if (compString[0] < '0' || compString[0] > '3' ||

-            compString[1] < '0' || compString[1] > '3') {

-            error(line, "illegal matrix field selection", compString.c_str());

-            return false;

-        }

-        fields.row = compString[0] - '0';

-        fields.col = compString[1] - '0';

-    }

-

-    if (fields.row >= matSize || fields.col >= matSize) {

-        error(line, "matrix field selection out of range", compString.c_str());

-        return false;

-    }

-

-    return true;

-}

-

-///////////////////////////////////////////////////////////////////////

-//

-// Errors

-//

-////////////////////////////////////////////////////////////////////////

-

-//

-// Track whether errors have occurred.

-//

-void TParseContext::recover()

-{

-}

-

-//

-// Used by flex/bison to output all syntax and parsing errors.

-//

-void TParseContext::error(const TSourceLoc& loc,

-                          const char* reason, const char* token, 

-                          const char* extraInfo)

-{

-    pp::SourceLocation srcLoc;

-    srcLoc.file = loc.first_file;

-    srcLoc.line = loc.first_line;

-    diagnostics.writeInfo(pp::Diagnostics::ERROR,

-                          srcLoc, reason, token, extraInfo);

-

-}

-

-void TParseContext::warning(const TSourceLoc& loc,

-                            const char* reason, const char* token,

-                            const char* extraInfo) {

-    pp::SourceLocation srcLoc;

-    srcLoc.file = loc.first_file;

-    srcLoc.line = loc.first_line;

-    diagnostics.writeInfo(pp::Diagnostics::WARNING,

-                          srcLoc, reason, token, extraInfo);

-}

-

-void TParseContext::trace(const char* str)

-{

-    diagnostics.writeDebug(str);

-}

-

-//

-// Same error message for all places assignments don't work.

-//

-void TParseContext::assignError(const TSourceLoc& line, const char* op, TString left, TString right)

-{

-    std::stringstream extraInfoStream;

-    extraInfoStream << "cannot convert from '" << right << "' to '" << left << "'";

-    std::string extraInfo = extraInfoStream.str();

-    error(line, "", op, extraInfo.c_str());

-}

-

-//

-// Same error message for all places unary operations don't work.

-//

-void TParseContext::unaryOpError(const TSourceLoc& line, const char* op, TString operand)

-{

-    std::stringstream extraInfoStream;

-    extraInfoStream << "no operation '" << op << "' exists that takes an operand of type " << operand 

-                    << " (or there is no acceptable conversion)";

-    std::string extraInfo = extraInfoStream.str();

-    error(line, " wrong operand type", op, extraInfo.c_str());

-}

-

-//

-// Same error message for all binary operations don't work.

-//

-void TParseContext::binaryOpError(const TSourceLoc& line, const char* op, TString left, TString right)

-{

-    std::stringstream extraInfoStream;

-    extraInfoStream << "no operation '" << op << "' exists that takes a left-hand operand of type '" << left 

-                    << "' and a right operand of type '" << right << "' (or there is no acceptable conversion)";

-    std::string extraInfo = extraInfoStream.str();

-    error(line, " wrong operand types ", op, extraInfo.c_str()); 

-}

-

-bool TParseContext::precisionErrorCheck(const TSourceLoc& line, TPrecision precision, TBasicType type){

-    if (!checksPrecisionErrors)

-        return false;

-    switch( type ){

-    case EbtFloat:

-        if( precision == EbpUndefined ){

-            error( line, "No precision specified for (float)", "" );

-            return true;

-        }

-        break;

-    case EbtInt:

-        if( precision == EbpUndefined ){

-            error( line, "No precision specified (int)", "" );

-            return true;

-        }

-        break;

-    default:

-        return false;

-    }

-    return false;

-}

-

-//

-// Both test and if necessary, spit out an error, to see if the node is really

-// an l-value that can be operated on this way.

-//

-// Returns true if the was an error.

-//

-bool TParseContext::lValueErrorCheck(const TSourceLoc& line, const char* op, TIntermTyped* node)

-{

-    TIntermSymbol* symNode = node->getAsSymbolNode();

-    TIntermBinary* binaryNode = node->getAsBinaryNode();

-

-    if (binaryNode) {

-        bool errorReturn;

-

-        switch(binaryNode->getOp()) {

-        case EOpIndexDirect:

-        case EOpIndexIndirect:

-        case EOpIndexDirectStruct:

-            return lValueErrorCheck(line, op, binaryNode->getLeft());

-        case EOpVectorSwizzle:

-            errorReturn = lValueErrorCheck(line, op, binaryNode->getLeft());

-            if (!errorReturn) {

-                int offset[4] = {0,0,0,0};

-

-                TIntermTyped* rightNode = binaryNode->getRight();

-                TIntermAggregate *aggrNode = rightNode->getAsAggregate();

-                

-                for (TIntermSequence::iterator p = aggrNode->getSequence().begin(); 

-                                               p != aggrNode->getSequence().end(); p++) {

-                    int value = (*p)->getAsTyped()->getAsConstantUnion()->getIConst(0);

-                    offset[value]++;     

-                    if (offset[value] > 1) {

-                        error(line, " l-value of swizzle cannot have duplicate components", op);

-

-                        return true;

-                    }

-                }

-            } 

-

-            return errorReturn;

-        default: 

-            break;

-        }

-        error(line, " l-value required", op);

-

-        return true;

-    }

-

-

-    const char* symbol = 0;

-    if (symNode != 0)

-        symbol = symNode->getSymbol().c_str();

-

-    const char* message = 0;

-    switch (node->getQualifier()) {

-    case EvqConst:          message = "can't modify a const";        break;

-    case EvqConstReadOnly:  message = "can't modify a const";        break;

-    case EvqAttribute:      message = "can't modify an attribute";   break;

-    case EvqUniform:        message = "can't modify a uniform";      break;

-    case EvqVaryingIn:      message = "can't modify a varying";      break;

-    case EvqFragCoord:      message = "can't modify gl_FragCoord";   break;

-    case EvqFrontFacing:    message = "can't modify gl_FrontFacing"; break;

-    case EvqPointCoord:     message = "can't modify gl_PointCoord";  break;

-    default:

-

-        //

-        // Type that can't be written to?

-        //

-        switch (node->getBasicType()) {

-        case EbtSampler2D:

-        case EbtSamplerCube:

-            message = "can't modify a sampler";

-            break;

-        case EbtVoid:

-            message = "can't modify void";

-            break;

-        default: 

-            break;

-        }

-    }

-

-    if (message == 0 && binaryNode == 0 && symNode == 0) {

-        error(line, " l-value required", op);

-

-        return true;

-    }

-

-

-    //

-    // Everything else is okay, no error.

-    //

-    if (message == 0)

-        return false;

-

-    //

-    // If we get here, we have an error and a message.

-    //

-    if (symNode) {

-        std::stringstream extraInfoStream;

-        extraInfoStream << "\"" << symbol << "\" (" << message << ")";

-        std::string extraInfo = extraInfoStream.str();

-        error(line, " l-value required", op, extraInfo.c_str());

-    }

-    else {

-        std::stringstream extraInfoStream;

-        extraInfoStream << "(" << message << ")";

-        std::string extraInfo = extraInfoStream.str();

-        error(line, " l-value required", op, extraInfo.c_str());

-    }

-

-    return true;

-}

-

-//

-// Both test, and if necessary spit out an error, to see if the node is really

-// a constant.

-//

-// Returns true if the was an error.

-//

-bool TParseContext::constErrorCheck(TIntermTyped* node)

-{

-    if (node->getQualifier() == EvqConst)

-        return false;

-

-    error(node->getLine(), "constant expression required", "");

-

-    return true;

-}

-

-//

-// Both test, and if necessary spit out an error, to see if the node is really

-// an integer.

-//

-// Returns true if the was an error.

-//

-bool TParseContext::integerErrorCheck(TIntermTyped* node, const char* token)

-{

-    if (node->getBasicType() == EbtInt && node->getNominalSize() == 1)

-        return false;

-

-    error(node->getLine(), "integer expression required", token);

-

-    return true;

-}

-

-//

-// Both test, and if necessary spit out an error, to see if we are currently

-// globally scoped.

-//

-// Returns true if the was an error.

-//

-bool TParseContext::globalErrorCheck(const TSourceLoc& line, bool global, const char* token)

-{

-    if (global)

-        return false;

-

-    error(line, "only allowed at global scope", token);

-

-    return true;

-}

-

-//

-// For now, keep it simple:  if it starts "gl_", it's reserved, independent

-// of scope.  Except, if the symbol table is at the built-in push-level,

-// which is when we are parsing built-ins.

-// Also checks for "webgl_" and "_webgl_" reserved identifiers if parsing a

-// webgl shader.

-//

-// Returns true if there was an error.

-//

-bool TParseContext::reservedErrorCheck(const TSourceLoc& line, const TString& identifier)

-{

-    static const char* reservedErrMsg = "reserved built-in name";

-    if (!symbolTable.atBuiltInLevel()) {

-        if (identifier.compare(0, 3, "gl_") == 0) {

-            error(line, reservedErrMsg, "gl_");

-            return true;

-        }

-        if (isWebGLBasedSpec(shaderSpec)) {

-            if (identifier.compare(0, 6, "webgl_") == 0) {

-                error(line, reservedErrMsg, "webgl_");

-                return true;

-            }

-            if (identifier.compare(0, 7, "_webgl_") == 0) {

-                error(line, reservedErrMsg, "_webgl_");

-                return true;

-            }

-            if (shaderSpec == SH_CSS_SHADERS_SPEC && identifier.compare(0, 4, "css_") == 0) {

-                error(line, reservedErrMsg, "css_");

-                return true;

-            }

-        }

-        if (identifier.find("__") != TString::npos) {

-            error(line, "identifiers containing two consecutive underscores (__) are reserved as possible future keywords", identifier.c_str());

-            return true;

-        }

-    }

-

-    return false;

-}

-

-//

-// Make sure there is enough data provided to the constructor to build

-// something of the type of the constructor.  Also returns the type of

-// the constructor.

-//

-// Returns true if there was an error in construction.

-//

-bool TParseContext::constructorErrorCheck(const TSourceLoc& line, TIntermNode* node, TFunction& function, TOperator op, TType* type)

-{

-    *type = function.getReturnType();

-

-    bool constructingMatrix = false;

-    switch(op) {

-    case EOpConstructMat2:

-    case EOpConstructMat3:

-    case EOpConstructMat4:

-        constructingMatrix = true;

-        break;

-    default: 

-        break;

-    }

-

-    //

-    // Note: It's okay to have too many components available, but not okay to have unused

-    // arguments.  'full' will go to true when enough args have been seen.  If we loop

-    // again, there is an extra argument, so 'overfull' will become true.

-    //

-

-    size_t size = 0;

-    bool constType = true;

-    bool full = false;

-    bool overFull = false;

-    bool matrixInMatrix = false;

-    bool arrayArg = false;

-    for (size_t i = 0; i < function.getParamCount(); ++i) {

-        const TParameter& param = function.getParam(i);

-        size += param.type->getObjectSize();

-        

-        if (constructingMatrix && param.type->isMatrix())

-            matrixInMatrix = true;

-        if (full)

-            overFull = true;

-        if (op != EOpConstructStruct && !type->isArray() && size >= type->getObjectSize())

-            full = true;

-        if (param.type->getQualifier() != EvqConst)

-            constType = false;

-        if (param.type->isArray())

-            arrayArg = true;

-    }

-    

-    if (constType)

-        type->setQualifier(EvqConst);

-

-    if (type->isArray() && static_cast<size_t>(type->getArraySize()) != function.getParamCount()) {

-        error(line, "array constructor needs one argument per array element", "constructor");

-        return true;

-    }

-

-    if (arrayArg && op != EOpConstructStruct) {

-        error(line, "constructing from a non-dereferenced array", "constructor");

-        return true;

-    }

-

-    if (matrixInMatrix && !type->isArray()) {

-        if (function.getParamCount() != 1) {

-          error(line, "constructing matrix from matrix can only take one argument", "constructor");

-          return true;

-        }

-    }

-

-    if (overFull) {

-        error(line, "too many arguments", "constructor");

-        return true;

-    }

-    

-    if (op == EOpConstructStruct && !type->isArray() && int(type->getStruct()->fields().size()) != function.getParamCount()) {

-        error(line, "Number of constructor parameters does not match the number of structure fields", "constructor");

-        return true;

-    }

-

-    if (!type->isMatrix() || !matrixInMatrix) {

-        if ((op != EOpConstructStruct && size != 1 && size < type->getObjectSize()) ||

-            (op == EOpConstructStruct && size < type->getObjectSize())) {

-            error(line, "not enough data provided for construction", "constructor");

-            return true;

-        }

-    }

-

-    TIntermTyped *typed = node ? node->getAsTyped() : 0;

-    if (typed == 0) {

-        error(line, "constructor argument does not have a type", "constructor");

-        return true;

-    }

-    if (op != EOpConstructStruct && IsSampler(typed->getBasicType())) {

-        error(line, "cannot convert a sampler", "constructor");

-        return true;

-    }

-    if (typed->getBasicType() == EbtVoid) {

-        error(line, "cannot convert a void", "constructor");

-        return true;

-    }

-

-    return false;

-}

-

-// This function checks to see if a void variable has been declared and raise an error message for such a case

-//

-// returns true in case of an error

-//

-bool TParseContext::voidErrorCheck(const TSourceLoc& line, const TString& identifier, const TPublicType& pubType)

-{

-    if (pubType.type == EbtVoid) {

-        error(line, "illegal use of type 'void'", identifier.c_str());

-        return true;

-    } 

-

-    return false;

-}

-

-// This function checks to see if the node (for the expression) contains a scalar boolean expression or not

-//

-// returns true in case of an error

-//

-bool TParseContext::boolErrorCheck(const TSourceLoc& line, const TIntermTyped* type)

-{

-    if (type->getBasicType() != EbtBool || type->isArray() || type->isMatrix() || type->isVector()) {

-        error(line, "boolean expression expected", "");

-        return true;

-    } 

-

-    return false;

-}

-

-// This function checks to see if the node (for the expression) contains a scalar boolean expression or not

-//

-// returns true in case of an error

-//

-bool TParseContext::boolErrorCheck(const TSourceLoc& line, const TPublicType& pType)

-{

-    if (pType.type != EbtBool || pType.array || pType.matrix || (pType.size > 1)) {

-        error(line, "boolean expression expected", "");

-        return true;

-    } 

-

-    return false;

-}

-

-bool TParseContext::samplerErrorCheck(const TSourceLoc& line, const TPublicType& pType, const char* reason)

-{

-    if (pType.type == EbtStruct) {

-        if (containsSampler(*pType.userDef)) {

-            error(line, reason, getBasicString(pType.type), "(structure contains a sampler)");

-        

-            return true;

-        }

-        

-        return false;

-    } else if (IsSampler(pType.type)) {

-        error(line, reason, getBasicString(pType.type));

-

-        return true;

-    }

-

-    return false;

-}

-

-bool TParseContext::structQualifierErrorCheck(const TSourceLoc& line, const TPublicType& pType)

-{

-    if ((pType.qualifier == EvqVaryingIn || pType.qualifier == EvqVaryingOut || pType.qualifier == EvqAttribute) &&

-        pType.type == EbtStruct) {

-        error(line, "cannot be used with a structure", getQualifierString(pType.qualifier));

-        

-        return true;

-    }

-

-    if (pType.qualifier != EvqUniform && samplerErrorCheck(line, pType, "samplers must be uniform"))

-        return true;

-

-    return false;

-}

-

-bool TParseContext::parameterSamplerErrorCheck(const TSourceLoc& line, TQualifier qualifier, const TType& type)

-{

-    if ((qualifier == EvqOut || qualifier == EvqInOut) && 

-             type.getBasicType() != EbtStruct && IsSampler(type.getBasicType())) {

-        error(line, "samplers cannot be output parameters", type.getBasicString());

-        return true;

-    }

-

-    return false;

-}

-

-bool TParseContext::containsSampler(TType& type)

-{

-    if (IsSampler(type.getBasicType()))

-        return true;

-

-    if (type.getBasicType() == EbtStruct) {

-        const TFieldList& fields = type.getStruct()->fields();

-        for (unsigned int i = 0; i < fields.size(); ++i) {

-            if (containsSampler(*fields[i]->type()))

-                return true;

-        }

-    }

-

-    return false;

-}

-

-//

-// Do size checking for an array type's size.

-//

-// Returns true if there was an error.

-//

-bool TParseContext::arraySizeErrorCheck(const TSourceLoc& line, TIntermTyped* expr, int& size)

-{

-    TIntermConstantUnion* constant = expr->getAsConstantUnion();

-    if (constant == 0 || constant->getBasicType() != EbtInt) {

-        error(line, "array size must be a constant integer expression", "");

-        return true;

-    }

-

-    size = constant->getIConst(0);

-

-    if (size <= 0) {

-        error(line, "array size must be a positive integer", "");

-        size = 1;

-        return true;

-    }

-

-    return false;

-}

-

-//

-// See if this qualifier can be an array.

-//

-// Returns true if there is an error.

-//

-bool TParseContext::arrayQualifierErrorCheck(const TSourceLoc& line, TPublicType type)

-{

-    if ((type.qualifier == EvqAttribute) || (type.qualifier == EvqConst)) {

-        error(line, "cannot declare arrays of this qualifier", TType(type).getCompleteString().c_str());

-        return true;

-    }

-

-    return false;

-}

-

-//

-// See if this type can be an array.

-//

-// Returns true if there is an error.

-//

-bool TParseContext::arrayTypeErrorCheck(const TSourceLoc& line, TPublicType type)

-{

-    //

-    // Can the type be an array?

-    //

-    if (type.array) {

-        error(line, "cannot declare arrays of arrays", TType(type).getCompleteString().c_str());

-        return true;

-    }

-

-    return false;

-}

-

-//

-// Do all the semantic checking for declaring an array, with and 

-// without a size, and make the right changes to the symbol table.

-//

-// size == 0 means no specified size.

-//

-// Returns true if there was an error.

-//

-bool TParseContext::arrayErrorCheck(const TSourceLoc& line, TString& identifier, TPublicType type, TVariable*& variable)

-{

-    //

-    // Don't check for reserved word use until after we know it's not in the symbol table,

-    // because reserved arrays can be redeclared.

-    //

-

-    bool builtIn = false; 

-    bool sameScope = false;

-    TSymbol* symbol = symbolTable.find(identifier, &builtIn, &sameScope);

-    if (symbol == 0 || !sameScope) {

-        if (reservedErrorCheck(line, identifier))

-            return true;

-        

-        variable = new TVariable(&identifier, TType(type));

-

-        if (type.arraySize)

-            variable->getType().setArraySize(type.arraySize);

-

-        if (! symbolTable.insert(*variable)) {

-            delete variable;

-            error(line, "INTERNAL ERROR inserting new symbol", identifier.c_str());

-            return true;

-        }

-    } else {

-        if (! symbol->isVariable()) {

-            error(line, "variable expected", identifier.c_str());

-            return true;

-        }

-

-        variable = static_cast<TVariable*>(symbol);

-        if (! variable->getType().isArray()) {

-            error(line, "redeclaring non-array as array", identifier.c_str());

-            return true;

-        }

-        if (variable->getType().getArraySize() > 0) {

-            error(line, "redeclaration of array with size", identifier.c_str());

-            return true;

-        }

-        

-        if (! variable->getType().sameElementType(TType(type))) {

-            error(line, "redeclaration of array with a different type", identifier.c_str());

-            return true;

-        }

-

-        if (type.arraySize)

-            variable->getType().setArraySize(type.arraySize);

-    } 

-

-    if (voidErrorCheck(line, identifier, type))

-        return true;

-

-    return false;

-}

-

-//

-// Enforce non-initializer type/qualifier rules.

-//

-// Returns true if there was an error.

-//

-bool TParseContext::nonInitConstErrorCheck(const TSourceLoc& line, TString& identifier, TPublicType& type, bool array)

-{

-    if (type.qualifier == EvqConst)

-    {

-        // Make the qualifier make sense.

-        type.qualifier = EvqTemporary;

-        

-        if (array)

-        {

-            error(line, "arrays may not be declared constant since they cannot be initialized", identifier.c_str());

-        }

-        else if (type.isStructureContainingArrays())

-        {

-            error(line, "structures containing arrays may not be declared constant since they cannot be initialized", identifier.c_str());

-        }

-        else

-        {

-            error(line, "variables with qualifier 'const' must be initialized", identifier.c_str());

-        }

-

-        return true;

-    }

-

-    return false;

-}

-

-//

-// Do semantic checking for a variable declaration that has no initializer,

-// and update the symbol table.

-//

-// Returns true if there was an error.

-//

-bool TParseContext::nonInitErrorCheck(const TSourceLoc& line, TString& identifier, TPublicType& type, TVariable*& variable)

-{

-    if (reservedErrorCheck(line, identifier))

-        recover();

-

-    variable = new TVariable(&identifier, TType(type));

-

-    if (! symbolTable.insert(*variable)) {

-        error(line, "redefinition", variable->getName().c_str());

-        delete variable;

-        variable = 0;

-        return true;

-    }

-

-    if (voidErrorCheck(line, identifier, type))

-        return true;

-

-    return false;

-}

-

-bool TParseContext::paramErrorCheck(const TSourceLoc& line, TQualifier qualifier, TQualifier paramQualifier, TType* type)

-{    

-    if (qualifier != EvqConst && qualifier != EvqTemporary) {

-        error(line, "qualifier not allowed on function parameter", getQualifierString(qualifier));

-        return true;

-    }

-    if (qualifier == EvqConst && paramQualifier != EvqIn) {

-        error(line, "qualifier not allowed with ", getQualifierString(qualifier), getQualifierString(paramQualifier));

-        return true;

-    }

-

-    if (qualifier == EvqConst)

-        type->setQualifier(EvqConstReadOnly);

-    else

-        type->setQualifier(paramQualifier);

-

-    return false;

-}

-

-bool TParseContext::extensionErrorCheck(const TSourceLoc& line, const TString& extension)

-{

-    const TExtensionBehavior& extBehavior = extensionBehavior();

-    TExtensionBehavior::const_iterator iter = extBehavior.find(extension.c_str());

-    if (iter == extBehavior.end()) {

-        error(line, "extension", extension.c_str(), "is not supported");

-        return true;

-    }

-    // In GLSL ES, an extension's default behavior is "disable".

-    if (iter->second == EBhDisable || iter->second == EBhUndefined) {

-        error(line, "extension", extension.c_str(), "is disabled");

-        return true;

-    }

-    if (iter->second == EBhWarn) {

-        warning(line, "extension", extension.c_str(), "is being used");

-        return false;

-    }

-

-    return false;

-}

-

-bool TParseContext::supportsExtension(const char* extension)

-{

-    const TExtensionBehavior& extbehavior = extensionBehavior();

-    TExtensionBehavior::const_iterator iter = extbehavior.find(extension);

-    return (iter != extbehavior.end());

-}

-

-bool TParseContext::isExtensionEnabled(const char* extension) const

-{

-    const TExtensionBehavior& extbehavior = extensionBehavior();

-    TExtensionBehavior::const_iterator iter = extbehavior.find(extension);

-

-    if (iter == extbehavior.end())

-    {

-        return false;

-    }

-

-    return (iter->second == EBhEnable || iter->second == EBhRequire);

-}

-

-/////////////////////////////////////////////////////////////////////////////////

-//

-// Non-Errors.

-//

-/////////////////////////////////////////////////////////////////////////////////

-

-//

-// Look up a function name in the symbol table, and make sure it is a function.

-//

-// Return the function symbol if found, otherwise 0.

-//

-const TFunction* TParseContext::findFunction(const TSourceLoc& line, TFunction* call, bool *builtIn)

-{

-    // First find by unmangled name to check whether the function name has been

-    // hidden by a variable name or struct typename.

-    // If a function is found, check for one with a matching argument list.

-    const TSymbol* symbol = symbolTable.find(call->getName(), builtIn);

-    if (symbol == 0 || symbol->isFunction()) {

-        symbol = symbolTable.find(call->getMangledName(), builtIn);

-    }

-

-    if (symbol == 0) {

-        error(line, "no matching overloaded function found", call->getName().c_str());

-        return 0;

-    }

-

-    if (!symbol->isFunction()) {

-        error(line, "function name expected", call->getName().c_str());

-        return 0;

-    }

-

-    return static_cast<const TFunction*>(symbol);

-}

-

-//

-// Initializers show up in several places in the grammar.  Have one set of

-// code to handle them here.

-//

-bool TParseContext::executeInitializer(const TSourceLoc& line, TString& identifier, TPublicType& pType, 

-                                       TIntermTyped* initializer, TIntermNode*& intermNode, TVariable* variable)

-{

-    TType type = TType(pType);

-

-    if (variable == 0) {

-        if (reservedErrorCheck(line, identifier))

-            return true;

-

-        if (voidErrorCheck(line, identifier, pType))

-            return true;

-

-        //

-        // add variable to symbol table

-        //

-        variable = new TVariable(&identifier, type);

-        if (! symbolTable.insert(*variable)) {

-            error(line, "redefinition", variable->getName().c_str());

-            return true;

-            // don't delete variable, it's used by error recovery, and the pool 

-            // pop will take care of the memory

-        }

-    }

-

-    //

-    // identifier must be of type constant, a global, or a temporary

-    //

-    TQualifier qualifier = variable->getType().getQualifier();

-    if ((qualifier != EvqTemporary) && (qualifier != EvqGlobal) && (qualifier != EvqConst)) {

-        error(line, " cannot initialize this type of qualifier ", variable->getType().getQualifierString());

-        return true;

-    }

-    //

-    // test for and propagate constant

-    //

-

-    if (qualifier == EvqConst) {

-        if (qualifier != initializer->getType().getQualifier()) {

-            std::stringstream extraInfoStream;

-            extraInfoStream << "'" << variable->getType().getCompleteString() << "'";

-            std::string extraInfo = extraInfoStream.str();

-            error(line, " assigning non-constant to", "=", extraInfo.c_str());

-            variable->getType().setQualifier(EvqTemporary);

-            return true;

-        }

-        if (type != initializer->getType()) {

-            error(line, " non-matching types for const initializer ", 

-                variable->getType().getQualifierString());

-            variable->getType().setQualifier(EvqTemporary);

-            return true;

-        }

-        if (initializer->getAsConstantUnion()) { 

-            variable->shareConstPointer(initializer->getAsConstantUnion()->getUnionArrayPointer());

-        } else if (initializer->getAsSymbolNode()) {

-            const TSymbol* symbol = symbolTable.find(initializer->getAsSymbolNode()->getSymbol());

-            const TVariable* tVar = static_cast<const TVariable*>(symbol);

-

-            ConstantUnion* constArray = tVar->getConstPointer();

-            variable->shareConstPointer(constArray);

-        } else {

-            std::stringstream extraInfoStream;

-            extraInfoStream << "'" << variable->getType().getCompleteString() << "'";

-            std::string extraInfo = extraInfoStream.str();

-            error(line, " cannot assign to", "=", extraInfo.c_str());

-            variable->getType().setQualifier(EvqTemporary);

-            return true;

-        }

-    }

- 

-    if (qualifier != EvqConst) {

-        TIntermSymbol* intermSymbol = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), line);

-        intermNode = intermediate.addAssign(EOpInitialize, intermSymbol, initializer, line);

-        if (intermNode == 0) {

-            assignError(line, "=", intermSymbol->getCompleteString(), initializer->getCompleteString());

-            return true;

-        }

-    } else 

-        intermNode = 0;

-

-    return false;

-}

-

-bool TParseContext::areAllChildConst(TIntermAggregate* aggrNode)

-{

-    ASSERT(aggrNode != NULL);

-    if (!aggrNode->isConstructor())

-        return false;

-

-    bool allConstant = true;

-

-    // check if all the child nodes are constants so that they can be inserted into 

-    // the parent node

-    TIntermSequence &sequence = aggrNode->getSequence() ;

-    for (TIntermSequence::iterator p = sequence.begin(); p != sequence.end(); ++p) {

-        if (!(*p)->getAsTyped()->getAsConstantUnion())

-            return false;

-    }

-

-    return allConstant;

-}

-

-// This function is used to test for the correctness of the parameters passed to various constructor functions

-// and also convert them to the right datatype if it is allowed and required. 

-//

-// Returns 0 for an error or the constructed node (aggregate or typed) for no error.

-//

-TIntermTyped* TParseContext::addConstructor(TIntermNode* node, const TType* type, TOperator op, TFunction* fnCall, const TSourceLoc& line)

-{

-    if (node == 0)

-        return 0;

-

-    TIntermAggregate* aggrNode = node->getAsAggregate();

-    

-    TFieldList::const_iterator memberFields;

-    if (op == EOpConstructStruct)

-        memberFields = type->getStruct()->fields().begin();

-    

-    TType elementType = *type;

-    if (type->isArray())

-        elementType.clearArrayness();

-

-    bool singleArg;

-    if (aggrNode) {

-        if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1)

-            singleArg = true;

-        else

-            singleArg = false;

-    } else

-        singleArg = true;

-

-    TIntermTyped *newNode;

-    if (singleArg) {

-        // If structure constructor or array constructor is being called 

-        // for only one parameter inside the structure, we need to call constructStruct function once.

-        if (type->isArray())

-            newNode = constructStruct(node, &elementType, 1, node->getLine(), false);

-        else if (op == EOpConstructStruct)

-            newNode = constructStruct(node, (*memberFields)->type(), 1, node->getLine(), false);

-        else

-            newNode = constructBuiltIn(type, op, node, node->getLine(), false);

-

-        if (newNode && newNode->getAsAggregate()) {

-            TIntermTyped* constConstructor = foldConstConstructor(newNode->getAsAggregate(), *type);

-            if (constConstructor)

-                return constConstructor;

-        }

-

-        return newNode;

-    }

-    

-    //

-    // Handle list of arguments.

-    //

-    TIntermSequence &sequenceVector = aggrNode->getSequence() ;    // Stores the information about the parameter to the constructor

-    // if the structure constructor contains more than one parameter, then construct

-    // each parameter

-    

-    int paramCount = 0;  // keeps a track of the constructor parameter number being checked    

-    

-    // for each parameter to the constructor call, check to see if the right type is passed or convert them 

-    // to the right type if possible (and allowed).

-    // for structure constructors, just check if the right type is passed, no conversion is allowed.

-    

-    for (TIntermSequence::iterator p = sequenceVector.begin(); 

-                                   p != sequenceVector.end(); p++, paramCount++) {

-        if (type->isArray())

-            newNode = constructStruct(*p, &elementType, paramCount+1, node->getLine(), true);

-        else if (op == EOpConstructStruct)

-            newNode = constructStruct(*p, memberFields[paramCount]->type(), paramCount+1, node->getLine(), true);

-        else

-            newNode = constructBuiltIn(type, op, *p, node->getLine(), true);

-        

-        if (newNode) {

-            *p = newNode;

-        }

-    }

-

-    TIntermTyped* constructor = intermediate.setAggregateOperator(aggrNode, op, line);

-    TIntermTyped* constConstructor = foldConstConstructor(constructor->getAsAggregate(), *type);

-    if (constConstructor)

-        return constConstructor;

-

-    return constructor;

-}

-

-TIntermTyped* TParseContext::foldConstConstructor(TIntermAggregate* aggrNode, const TType& type)

-{

-    bool canBeFolded = areAllChildConst(aggrNode);

-    aggrNode->setType(type);

-    if (canBeFolded) {

-        bool returnVal = false;

-        ConstantUnion* unionArray = new ConstantUnion[type.getObjectSize()];

-        if (aggrNode->getSequence().size() == 1)  {

-            returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), symbolTable,  type, true);

-        }

-        else {

-            returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), symbolTable,  type);

-        }

-        if (returnVal)

-            return 0;

-

-        return intermediate.addConstantUnion(unionArray, type, aggrNode->getLine());

-    }

-

-    return 0;

-}

-

-// Function for constructor implementation. Calls addUnaryMath with appropriate EOp value

-// for the parameter to the constructor (passed to this function). Essentially, it converts

-// the parameter types correctly. If a constructor expects an int (like ivec2) and is passed a 

-// float, then float is converted to int.

-//

-// Returns 0 for an error or the constructed node.

-//

-TIntermTyped* TParseContext::constructBuiltIn(const TType* type, TOperator op, TIntermNode* node, const TSourceLoc& line, bool subset)

-{

-    TIntermTyped* newNode;

-    TOperator basicOp;

-

-    //

-    // First, convert types as needed.

-    //

-    switch (op) {

-    case EOpConstructVec2:

-    case EOpConstructVec3:

-    case EOpConstructVec4:

-    case EOpConstructMat2:

-    case EOpConstructMat3:

-    case EOpConstructMat4:

-    case EOpConstructFloat:

-        basicOp = EOpConstructFloat;

-        break;

-

-    case EOpConstructIVec2:

-    case EOpConstructIVec3:

-    case EOpConstructIVec4:

-    case EOpConstructInt:

-        basicOp = EOpConstructInt;

-        break;

-

-    case EOpConstructBVec2:

-    case EOpConstructBVec3:

-    case EOpConstructBVec4:

-    case EOpConstructBool:

-        basicOp = EOpConstructBool;

-        break;

-

-    default:

-        error(line, "unsupported construction", "");

-        recover();

-

-        return 0;

-    }

-    newNode = intermediate.addUnaryMath(basicOp, node, node->getLine(), symbolTable);

-    if (newNode == 0) {

-        error(line, "can't convert", "constructor");

-        return 0;

-    }

-

-    //

-    // Now, if there still isn't an operation to do the construction, and we need one, add one.

-    //

-    

-    // Otherwise, skip out early.

-    if (subset || (newNode != node && newNode->getType() == *type))

-        return newNode;

-

-    // setAggregateOperator will insert a new node for the constructor, as needed.

-    return intermediate.setAggregateOperator(newNode, op, line);

-}

-

-// This function tests for the type of the parameters to the structures constructors. Raises

-// an error message if the expected type does not match the parameter passed to the constructor.

-//

-// Returns 0 for an error or the input node itself if the expected and the given parameter types match.

-//

-TIntermTyped* TParseContext::constructStruct(TIntermNode* node, TType* type, int paramCount, const TSourceLoc& line, bool subset)

-{

-    if (*type == node->getAsTyped()->getType()) {

-        if (subset)

-            return node->getAsTyped();

-        else

-            return intermediate.setAggregateOperator(node->getAsTyped(), EOpConstructStruct, line);

-    } else {

-        std::stringstream extraInfoStream;

-        extraInfoStream << "cannot convert parameter " << paramCount 

-                        << " from '" << node->getAsTyped()->getType().getBasicString()

-                        << "' to '" << type->getBasicString() << "'";

-        std::string extraInfo = extraInfoStream.str();

-        error(line, "", "constructor", extraInfo.c_str());

-        recover();

-    }

-

-    return 0;

-}

-

-//

-// This function returns the tree representation for the vector field(s) being accessed from contant vector.

-// If only one component of vector is accessed (v.x or v[0] where v is a contant vector), then a contant node is

-// returned, else an aggregate node is returned (for v.xy). The input to this function could either be the symbol

-// node or it could be the intermediate tree representation of accessing fields in a constant structure or column of 

-// a constant matrix.

-//

-TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTyped* node, const TSourceLoc& line)

-{

-    TIntermTyped* typedNode;

-    TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();

-

-    ConstantUnion *unionArray;

-    if (tempConstantNode) {

-        unionArray = tempConstantNode->getUnionArrayPointer();

-

-        if (!unionArray) {

-            return node;

-        }

-    } else { // The node has to be either a symbol node or an aggregate node or a tempConstant node, else, its an error

-        error(line, "Cannot offset into the vector", "Error");

-        recover();

-

-        return 0;

-    }

-

-    ConstantUnion* constArray = new ConstantUnion[fields.num];

-

-    for (int i = 0; i < fields.num; i++) {

-        if (fields.offsets[i] >= node->getType().getNominalSize()) {

-            std::stringstream extraInfoStream;

-            extraInfoStream << "vector field selection out of range '" << fields.offsets[i] << "'";

-            std::string extraInfo = extraInfoStream.str();

-            error(line, "", "[", extraInfo.c_str());

-            recover();

-            fields.offsets[i] = 0;

-        }

-        

-        constArray[i] = unionArray[fields.offsets[i]];

-

-    } 

-    typedNode = intermediate.addConstantUnion(constArray, node->getType(), line);

-    return typedNode;

-}

-

-//

-// This function returns the column being accessed from a constant matrix. The values are retrieved from

-// the symbol table and parse-tree is built for a vector (each column of a matrix is a vector). The input 

-// to the function could either be a symbol node (m[0] where m is a constant matrix)that represents a 

-// constant matrix or it could be the tree representation of the constant matrix (s.m1[0] where s is a constant structure)

-//

-TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, const TSourceLoc& line)

-{

-    TIntermTyped* typedNode;

-    TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();

-

-    if (index >= node->getType().getNominalSize()) {

-        std::stringstream extraInfoStream;

-        extraInfoStream << "matrix field selection out of range '" << index << "'";

-        std::string extraInfo = extraInfoStream.str();

-        error(line, "", "[", extraInfo.c_str());

-        recover();

-        index = 0;

-    }

-

-    if (tempConstantNode) {

-         ConstantUnion* unionArray = tempConstantNode->getUnionArrayPointer();

-         int size = tempConstantNode->getType().getNominalSize();

-         typedNode = intermediate.addConstantUnion(&unionArray[size*index], tempConstantNode->getType(), line);

-    } else {

-        error(line, "Cannot offset into the matrix", "Error");

-        recover();

-

-        return 0;

-    }

-

-    return typedNode;

-}

-

-

-//

-// This function returns an element of an array accessed from a constant array. The values are retrieved from

-// the symbol table and parse-tree is built for the type of the element. The input 

-// to the function could either be a symbol node (a[0] where a is a constant array)that represents a 

-// constant array or it could be the tree representation of the constant array (s.a1[0] where s is a constant structure)

-//

-TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, const TSourceLoc& line)

-{

-    TIntermTyped* typedNode;

-    TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();

-    TType arrayElementType = node->getType();

-    arrayElementType.clearArrayness();

-

-    if (index >= node->getType().getArraySize()) {

-        std::stringstream extraInfoStream;

-        extraInfoStream << "array field selection out of range '" << index << "'";

-        std::string extraInfo = extraInfoStream.str();

-        error(line, "", "[", extraInfo.c_str());

-        recover();

-        index = 0;

-    }

-

-    if (tempConstantNode) {

-         size_t arrayElementSize = arrayElementType.getObjectSize();

-         ConstantUnion* unionArray = tempConstantNode->getUnionArrayPointer();

-         typedNode = intermediate.addConstantUnion(&unionArray[arrayElementSize * index], tempConstantNode->getType(), line);

-    } else {

-        error(line, "Cannot offset into the array", "Error");

-        recover();

-

-        return 0;

-    }

-

-    return typedNode;

-}

-

-

-//

-// This function returns the value of a particular field inside a constant structure from the symbol table. 

-// If there is an embedded/nested struct, it appropriately calls addConstStructNested or addConstStructFromAggr

-// function and returns the parse-tree with the values of the embedded/nested struct.

-//

-TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* node, const TSourceLoc& line)

-{

-    const TFieldList& fields = node->getType().getStruct()->fields();

-

-    size_t instanceSize = 0;

-    for (size_t index = 0; index < fields.size(); ++index) {

-        if (fields[index]->name() == identifier) {

-            break;

-        } else {

-            instanceSize += fields[index]->type()->getObjectSize();

-        }

-    }

-

-    TIntermTyped* typedNode = 0;

-    TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();

-    if (tempConstantNode) {

-         ConstantUnion* constArray = tempConstantNode->getUnionArrayPointer();

-

-         typedNode = intermediate.addConstantUnion(constArray+instanceSize, tempConstantNode->getType(), line); // type will be changed in the calling function

-    } else {

-        error(line, "Cannot offset into the structure", "Error");

-        recover();

-

-        return 0;

-    }

-

-    return typedNode;

-}

-

-bool TParseContext::enterStructDeclaration(const TSourceLoc& line, const TString& identifier)

-{

-    ++structNestingLevel;

-

-    // Embedded structure definitions are not supported per GLSL ES spec.

-    // They aren't allowed in GLSL either, but we need to detect this here

-    // so we don't rely on the GLSL compiler to catch it.

-    if (structNestingLevel > 1) {

-        error(line, "", "Embedded struct definitions are not allowed");

-        return true;

-    }

-

-    return false;

-}

-

-void TParseContext::exitStructDeclaration()

-{

-    --structNestingLevel;

-}

-

-namespace {

-

-const int kWebGLMaxStructNesting = 4;

-

-}  // namespace

-

-bool TParseContext::structNestingErrorCheck(const TSourceLoc& line, const TField& field)

-{

-    if (!isWebGLBasedSpec(shaderSpec)) {

-        return false;

-    }

-

-    if (field.type()->getBasicType() != EbtStruct) {

-        return false;

-    }

-

-    // We're already inside a structure definition at this point, so add

-    // one to the field's struct nesting.

-    if (1 + field.type()->getDeepestStructNesting() > kWebGLMaxStructNesting) {

-        std::stringstream reasonStream;

-        reasonStream << "Reference of struct type "

-                     << field.type()->getStruct()->name().c_str()

-                     << " exceeds maximum allowed nesting level of "

-                     << kWebGLMaxStructNesting;

-        std::string reason = reasonStream.str();

-        error(line, reason.c_str(), field.name().c_str(), "");

-        return true;

-    }

-

-    return false;

-}

-

-//

-// Parse an array index expression

-//

-TIntermTyped* TParseContext::addIndexExpression(TIntermTyped *baseExpression, const TSourceLoc& location, TIntermTyped *indexExpression)

-{

-    TIntermTyped *indexedExpression = NULL;

-

-    if (!baseExpression->isArray() && !baseExpression->isMatrix() && !baseExpression->isVector())

-    {

-        if (baseExpression->getAsSymbolNode())

-        {

-            error(location, " left of '[' is not of type array, matrix, or vector ", baseExpression->getAsSymbolNode()->getSymbol().c_str());

-        }

-        else

-        {

-            error(location, " left of '[' is not of type array, matrix, or vector ", "expression");

-        }

-        recover();

-    }

-

-    if (indexExpression->getQualifier() == EvqConst)

-    {

-        int index = indexExpression->getAsConstantUnion()->getIConst(0);

-        if (index < 0)

-        {

-            std::stringstream infoStream;

-            infoStream << index;

-            std::string info = infoStream.str();

-            error(location, "negative index", info.c_str());

-            recover();

-            index = 0;

-        }

-        if (baseExpression->getType().getQualifier() == EvqConst)

-        {

-            if (baseExpression->isArray())

-            {

-                // constant folding for arrays

-                indexedExpression = addConstArrayNode(index, baseExpression, location);

-            }

-            else if (baseExpression->isVector())

-            {

-                // constant folding for vectors

-                TVectorFields fields;

-                fields.num = 1;

-                fields.offsets[0] = index; // need to do it this way because v.xy sends fields integer array

-                indexedExpression = addConstVectorNode(fields, baseExpression, location);

-            }

-            else if (baseExpression->isMatrix())

-            {

-                // constant folding for matrices

-                indexedExpression = addConstMatrixNode(index, baseExpression, location);

-            }

-        }

-        else

-        {

-            if (baseExpression->isArray())

-            {

-                if (index >= baseExpression->getType().getArraySize())

-                {

-                    std::stringstream extraInfoStream;

-                    extraInfoStream << "array index out of range '" << index << "'";

-                    std::string extraInfo = extraInfoStream.str();

-                    error(location, "", "[", extraInfo.c_str());

-                    recover();

-                    index = baseExpression->getType().getArraySize() - 1;

-                }

-                else if (baseExpression->getQualifier() == EvqFragData && index > 0 && !isExtensionEnabled("GL_EXT_draw_buffers"))

-                {

-                    error(location, "", "[", "array indexes for gl_FragData must be zero when GL_EXT_draw_buffers is disabled");

-                    recover();

-                    index = 0;

-                }

-            }

-            else if ((baseExpression->isVector() || baseExpression->isMatrix()) && baseExpression->getType().getNominalSize() <= index)

-            {

-                std::stringstream extraInfoStream;

-                extraInfoStream << "field selection out of range '" << index << "'";

-                std::string extraInfo = extraInfoStream.str();

-                error(location, "", "[", extraInfo.c_str());

-                recover();

-                index = baseExpression->getType().getNominalSize() - 1;

-            }

-

-            indexExpression->getAsConstantUnion()->getUnionArrayPointer()->setIConst(index);

-            indexedExpression = intermediate.addIndex(EOpIndexDirect, baseExpression, indexExpression, location);

-        }

-    }

-    else

-    {

-        indexedExpression = intermediate.addIndex(EOpIndexIndirect, baseExpression, indexExpression, location);

-    }

-

-    if (indexedExpression == 0)

-    {

-        ConstantUnion *unionArray = new ConstantUnion[1];

-        unionArray->setFConst(0.0f);

-        indexedExpression = intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpHigh, EvqConst), location);

-    }

-    else if (baseExpression->isArray())

-    {

-        const TType &baseType = baseExpression->getType();

-        if (baseType.getStruct())

-        {

-            TType copyOfType(baseType.getStruct());

-            indexedExpression->setType(copyOfType);

-        }

-        else

-        {

-            indexedExpression->setType(TType(baseExpression->getBasicType(), baseExpression->getPrecision(), EvqTemporary, baseExpression->getNominalSize(), baseExpression->isMatrix()));

-        }

-

-        if (baseExpression->getType().getQualifier() == EvqConst)

-        {

-            indexedExpression->getTypePointer()->setQualifier(EvqConst);

-        }

-    }

-    else if (baseExpression->isMatrix())

-    {

-        TQualifier qualifier = baseExpression->getType().getQualifier() == EvqConst ? EvqConst : EvqTemporary;

-        indexedExpression->setType(TType(baseExpression->getBasicType(), baseExpression->getPrecision(), qualifier, baseExpression->getNominalSize()));

-    }

-    else if (baseExpression->isVector())

-    {

-        TQualifier qualifier = baseExpression->getType().getQualifier() == EvqConst ? EvqConst : EvqTemporary;

-        indexedExpression->setType(TType(baseExpression->getBasicType(), baseExpression->getPrecision(), qualifier));

-    }

-    else

-    {

-        indexedExpression->setType(baseExpression->getType());

-    }

-

-    return indexedExpression;

-}

-

-//

-// Parse an array of strings using yyparse.

-//

-// Returns 0 for success.

-//

-int PaParseStrings(size_t count, const char* const string[], const int length[],

-                   TParseContext* context) {

-    if ((count == 0) || (string == NULL))

-        return 1;

-

-    if (glslang_initialize(context))

-        return 1;

-

-    int error = glslang_scan(count, string, length, context);

-    if (!error)

-        error = glslang_parse(context);

-

-    glslang_finalize(context);

-

-    return (error == 0) && (context->numErrors() == 0) ? 0 : 1;

-}

-

-

-

+//
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/ParseHelper.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "compiler/glslang.h"
+#include "compiler/preprocessor/SourceLocation.h"
+
+///////////////////////////////////////////////////////////////////////
+//
+// Sub- vector and matrix fields
+//
+////////////////////////////////////////////////////////////////////////
+
+//
+// Look at a '.' field selector string and change it into offsets
+// for a vector.
+//
+bool TParseContext::parseVectorFields(const TString& compString, int vecSize, TVectorFields& fields, const TSourceLoc& line)
+{
+    fields.num = (int) compString.size();
+    if (fields.num > 4) {
+        error(line, "illegal vector field selection", compString.c_str());
+        return false;
+    }
+
+    enum {
+        exyzw,
+        ergba,
+        estpq
+    } fieldSet[4];
+
+    for (int i = 0; i < fields.num; ++i) {
+        switch (compString[i])  {
+        case 'x': 
+            fields.offsets[i] = 0;
+            fieldSet[i] = exyzw;
+            break;
+        case 'r': 
+            fields.offsets[i] = 0;
+            fieldSet[i] = ergba;
+            break;
+        case 's':
+            fields.offsets[i] = 0;
+            fieldSet[i] = estpq;
+            break;
+        case 'y': 
+            fields.offsets[i] = 1;
+            fieldSet[i] = exyzw;
+            break;
+        case 'g': 
+            fields.offsets[i] = 1;
+            fieldSet[i] = ergba;
+            break;
+        case 't':
+            fields.offsets[i] = 1;
+            fieldSet[i] = estpq;
+            break;
+        case 'z': 
+            fields.offsets[i] = 2;
+            fieldSet[i] = exyzw;
+            break;
+        case 'b': 
+            fields.offsets[i] = 2;
+            fieldSet[i] = ergba;
+            break;
+        case 'p':
+            fields.offsets[i] = 2;
+            fieldSet[i] = estpq;
+            break;
+        
+        case 'w': 
+            fields.offsets[i] = 3;
+            fieldSet[i] = exyzw;
+            break;
+        case 'a': 
+            fields.offsets[i] = 3;
+            fieldSet[i] = ergba;
+            break;
+        case 'q':
+            fields.offsets[i] = 3;
+            fieldSet[i] = estpq;
+            break;
+        default:
+            error(line, "illegal vector field selection", compString.c_str());
+            return false;
+        }
+    }
+
+    for (int i = 0; i < fields.num; ++i) {
+        if (fields.offsets[i] >= vecSize) {
+            error(line, "vector field selection out of range",  compString.c_str());
+            return false;
+        }
+
+        if (i > 0) {
+            if (fieldSet[i] != fieldSet[i-1]) {
+                error(line, "illegal - vector component fields not from the same set", compString.c_str());
+                return false;
+            }
+        }
+    }
+
+    return true;
+}
+
+
+//
+// Look at a '.' field selector string and change it into offsets
+// for a matrix.
+//
+bool TParseContext::parseMatrixFields(const TString& compString, int matSize, TMatrixFields& fields, const TSourceLoc& line)
+{
+    fields.wholeRow = false;
+    fields.wholeCol = false;
+    fields.row = -1;
+    fields.col = -1;
+
+    if (compString.size() != 2) {
+        error(line, "illegal length of matrix field selection", compString.c_str());
+        return false;
+    }
+
+    if (compString[0] == '_') {
+        if (compString[1] < '0' || compString[1] > '3') {
+            error(line, "illegal matrix field selection", compString.c_str());
+            return false;
+        }
+        fields.wholeCol = true;
+        fields.col = compString[1] - '0';
+    } else if (compString[1] == '_') {
+        if (compString[0] < '0' || compString[0] > '3') {
+            error(line, "illegal matrix field selection", compString.c_str());
+            return false;
+        }
+        fields.wholeRow = true;
+        fields.row = compString[0] - '0';
+    } else {
+        if (compString[0] < '0' || compString[0] > '3' ||
+            compString[1] < '0' || compString[1] > '3') {
+            error(line, "illegal matrix field selection", compString.c_str());
+            return false;
+        }
+        fields.row = compString[0] - '0';
+        fields.col = compString[1] - '0';
+    }
+
+    if (fields.row >= matSize || fields.col >= matSize) {
+        error(line, "matrix field selection out of range", compString.c_str());
+        return false;
+    }
+
+    return true;
+}
+
+///////////////////////////////////////////////////////////////////////
+//
+// Errors
+//
+////////////////////////////////////////////////////////////////////////
+
+//
+// Track whether errors have occurred.
+//
+void TParseContext::recover()
+{
+}
+
+//
+// Used by flex/bison to output all syntax and parsing errors.
+//
+void TParseContext::error(const TSourceLoc& loc,
+                          const char* reason, const char* token, 
+                          const char* extraInfo)
+{
+    pp::SourceLocation srcLoc;
+    srcLoc.file = loc.first_file;
+    srcLoc.line = loc.first_line;
+    diagnostics.writeInfo(pp::Diagnostics::ERROR,
+                          srcLoc, reason, token, extraInfo);
+
+}
+
+void TParseContext::warning(const TSourceLoc& loc,
+                            const char* reason, const char* token,
+                            const char* extraInfo) {
+    pp::SourceLocation srcLoc;
+    srcLoc.file = loc.first_file;
+    srcLoc.line = loc.first_line;
+    diagnostics.writeInfo(pp::Diagnostics::WARNING,
+                          srcLoc, reason, token, extraInfo);
+}
+
+void TParseContext::trace(const char* str)
+{
+    diagnostics.writeDebug(str);
+}
+
+//
+// Same error message for all places assignments don't work.
+//
+void TParseContext::assignError(const TSourceLoc& line, const char* op, TString left, TString right)
+{
+    std::stringstream extraInfoStream;
+    extraInfoStream << "cannot convert from '" << right << "' to '" << left << "'";
+    std::string extraInfo = extraInfoStream.str();
+    error(line, "", op, extraInfo.c_str());
+}
+
+//
+// Same error message for all places unary operations don't work.
+//
+void TParseContext::unaryOpError(const TSourceLoc& line, const char* op, TString operand)
+{
+    std::stringstream extraInfoStream;
+    extraInfoStream << "no operation '" << op << "' exists that takes an operand of type " << operand 
+                    << " (or there is no acceptable conversion)";
+    std::string extraInfo = extraInfoStream.str();
+    error(line, " wrong operand type", op, extraInfo.c_str());
+}
+
+//
+// Same error message for all binary operations don't work.
+//
+void TParseContext::binaryOpError(const TSourceLoc& line, const char* op, TString left, TString right)
+{
+    std::stringstream extraInfoStream;
+    extraInfoStream << "no operation '" << op << "' exists that takes a left-hand operand of type '" << left 
+                    << "' and a right operand of type '" << right << "' (or there is no acceptable conversion)";
+    std::string extraInfo = extraInfoStream.str();
+    error(line, " wrong operand types ", op, extraInfo.c_str()); 
+}
+
+bool TParseContext::precisionErrorCheck(const TSourceLoc& line, TPrecision precision, TBasicType type){
+    if (!checksPrecisionErrors)
+        return false;
+    switch( type ){
+    case EbtFloat:
+        if( precision == EbpUndefined ){
+            error( line, "No precision specified for (float)", "" );
+            return true;
+        }
+        break;
+    case EbtInt:
+        if( precision == EbpUndefined ){
+            error( line, "No precision specified (int)", "" );
+            return true;
+        }
+        break;
+    default:
+        return false;
+    }
+    return false;
+}
+
+//
+// Both test and if necessary, spit out an error, to see if the node is really
+// an l-value that can be operated on this way.
+//
+// Returns true if the was an error.
+//
+bool TParseContext::lValueErrorCheck(const TSourceLoc& line, const char* op, TIntermTyped* node)
+{
+    TIntermSymbol* symNode = node->getAsSymbolNode();
+    TIntermBinary* binaryNode = node->getAsBinaryNode();
+
+    if (binaryNode) {
+        bool errorReturn;
+
+        switch(binaryNode->getOp()) {
+        case EOpIndexDirect:
+        case EOpIndexIndirect:
+        case EOpIndexDirectStruct:
+            return lValueErrorCheck(line, op, binaryNode->getLeft());
+        case EOpVectorSwizzle:
+            errorReturn = lValueErrorCheck(line, op, binaryNode->getLeft());
+            if (!errorReturn) {
+                int offset[4] = {0,0,0,0};
+
+                TIntermTyped* rightNode = binaryNode->getRight();
+                TIntermAggregate *aggrNode = rightNode->getAsAggregate();
+                
+                for (TIntermSequence::iterator p = aggrNode->getSequence().begin(); 
+                                               p != aggrNode->getSequence().end(); p++) {
+                    int value = (*p)->getAsTyped()->getAsConstantUnion()->getIConst(0);
+                    offset[value]++;     
+                    if (offset[value] > 1) {
+                        error(line, " l-value of swizzle cannot have duplicate components", op);
+
+                        return true;
+                    }
+                }
+            } 
+
+            return errorReturn;
+        default: 
+            break;
+        }
+        error(line, " l-value required", op);
+
+        return true;
+    }
+
+
+    const char* symbol = 0;
+    if (symNode != 0)
+        symbol = symNode->getSymbol().c_str();
+
+    const char* message = 0;
+    switch (node->getQualifier()) {
+    case EvqConst:          message = "can't modify a const";        break;
+    case EvqConstReadOnly:  message = "can't modify a const";        break;
+    case EvqAttribute:      message = "can't modify an attribute";   break;
+    case EvqUniform:        message = "can't modify a uniform";      break;
+    case EvqVaryingIn:      message = "can't modify a varying";      break;
+    case EvqFragCoord:      message = "can't modify gl_FragCoord";   break;
+    case EvqFrontFacing:    message = "can't modify gl_FrontFacing"; break;
+    case EvqPointCoord:     message = "can't modify gl_PointCoord";  break;
+    default:
+
+        //
+        // Type that can't be written to?
+        //
+        switch (node->getBasicType()) {
+        case EbtSampler2D:
+        case EbtSamplerCube:
+            message = "can't modify a sampler";
+            break;
+        case EbtVoid:
+            message = "can't modify void";
+            break;
+        default: 
+            break;
+        }
+    }
+
+    if (message == 0 && binaryNode == 0 && symNode == 0) {
+        error(line, " l-value required", op);
+
+        return true;
+    }
+
+
+    //
+    // Everything else is okay, no error.
+    //
+    if (message == 0)
+        return false;
+
+    //
+    // If we get here, we have an error and a message.
+    //
+    if (symNode) {
+        std::stringstream extraInfoStream;
+        extraInfoStream << "\"" << symbol << "\" (" << message << ")";
+        std::string extraInfo = extraInfoStream.str();
+        error(line, " l-value required", op, extraInfo.c_str());
+    }
+    else {
+        std::stringstream extraInfoStream;
+        extraInfoStream << "(" << message << ")";
+        std::string extraInfo = extraInfoStream.str();
+        error(line, " l-value required", op, extraInfo.c_str());
+    }
+
+    return true;
+}
+
+//
+// Both test, and if necessary spit out an error, to see if the node is really
+// a constant.
+//
+// Returns true if the was an error.
+//
+bool TParseContext::constErrorCheck(TIntermTyped* node)
+{
+    if (node->getQualifier() == EvqConst)
+        return false;
+
+    error(node->getLine(), "constant expression required", "");
+
+    return true;
+}
+
+//
+// Both test, and if necessary spit out an error, to see if the node is really
+// an integer.
+//
+// Returns true if the was an error.
+//
+bool TParseContext::integerErrorCheck(TIntermTyped* node, const char* token)
+{
+    if (node->getBasicType() == EbtInt && node->getNominalSize() == 1)
+        return false;
+
+    error(node->getLine(), "integer expression required", token);
+
+    return true;
+}
+
+//
+// Both test, and if necessary spit out an error, to see if we are currently
+// globally scoped.
+//
+// Returns true if the was an error.
+//
+bool TParseContext::globalErrorCheck(const TSourceLoc& line, bool global, const char* token)
+{
+    if (global)
+        return false;
+
+    error(line, "only allowed at global scope", token);
+
+    return true;
+}
+
+//
+// For now, keep it simple:  if it starts "gl_", it's reserved, independent
+// of scope.  Except, if the symbol table is at the built-in push-level,
+// which is when we are parsing built-ins.
+// Also checks for "webgl_" and "_webgl_" reserved identifiers if parsing a
+// webgl shader.
+//
+// Returns true if there was an error.
+//
+bool TParseContext::reservedErrorCheck(const TSourceLoc& line, const TString& identifier)
+{
+    static const char* reservedErrMsg = "reserved built-in name";
+    if (!symbolTable.atBuiltInLevel()) {
+        if (identifier.compare(0, 3, "gl_") == 0) {
+            error(line, reservedErrMsg, "gl_");
+            return true;
+        }
+        if (isWebGLBasedSpec(shaderSpec)) {
+            if (identifier.compare(0, 6, "webgl_") == 0) {
+                error(line, reservedErrMsg, "webgl_");
+                return true;
+            }
+            if (identifier.compare(0, 7, "_webgl_") == 0) {
+                error(line, reservedErrMsg, "_webgl_");
+                return true;
+            }
+            if (shaderSpec == SH_CSS_SHADERS_SPEC && identifier.compare(0, 4, "css_") == 0) {
+                error(line, reservedErrMsg, "css_");
+                return true;
+            }
+        }
+        if (identifier.find("__") != TString::npos) {
+            error(line, "identifiers containing two consecutive underscores (__) are reserved as possible future keywords", identifier.c_str());
+            return true;
+        }
+    }
+
+    return false;
+}
+
+//
+// Make sure there is enough data provided to the constructor to build
+// something of the type of the constructor.  Also returns the type of
+// the constructor.
+//
+// Returns true if there was an error in construction.
+//
+bool TParseContext::constructorErrorCheck(const TSourceLoc& line, TIntermNode* node, TFunction& function, TOperator op, TType* type)
+{
+    *type = function.getReturnType();
+
+    bool constructingMatrix = false;
+    switch(op) {
+    case EOpConstructMat2:
+    case EOpConstructMat3:
+    case EOpConstructMat4:
+        constructingMatrix = true;
+        break;
+    default: 
+        break;
+    }
+
+    //
+    // Note: It's okay to have too many components available, but not okay to have unused
+    // arguments.  'full' will go to true when enough args have been seen.  If we loop
+    // again, there is an extra argument, so 'overfull' will become true.
+    //
+
+    size_t size = 0;
+    bool constType = true;
+    bool full = false;
+    bool overFull = false;
+    bool matrixInMatrix = false;
+    bool arrayArg = false;
+    for (size_t i = 0; i < function.getParamCount(); ++i) {
+        const TParameter& param = function.getParam(i);
+        size += param.type->getObjectSize();
+        
+        if (constructingMatrix && param.type->isMatrix())
+            matrixInMatrix = true;
+        if (full)
+            overFull = true;
+        if (op != EOpConstructStruct && !type->isArray() && size >= type->getObjectSize())
+            full = true;
+        if (param.type->getQualifier() != EvqConst)
+            constType = false;
+        if (param.type->isArray())
+            arrayArg = true;
+    }
+    
+    if (constType)
+        type->setQualifier(EvqConst);
+
+    if (type->isArray() && static_cast<size_t>(type->getArraySize()) != function.getParamCount()) {
+        error(line, "array constructor needs one argument per array element", "constructor");
+        return true;
+    }
+
+    if (arrayArg && op != EOpConstructStruct) {
+        error(line, "constructing from a non-dereferenced array", "constructor");
+        return true;
+    }
+
+    if (matrixInMatrix && !type->isArray()) {
+        if (function.getParamCount() != 1) {
+          error(line, "constructing matrix from matrix can only take one argument", "constructor");
+          return true;
+        }
+    }
+
+    if (overFull) {
+        error(line, "too many arguments", "constructor");
+        return true;
+    }
+    
+    if (op == EOpConstructStruct && !type->isArray() && int(type->getStruct()->fields().size()) != function.getParamCount()) {
+        error(line, "Number of constructor parameters does not match the number of structure fields", "constructor");
+        return true;
+    }
+
+    if (!type->isMatrix() || !matrixInMatrix) {
+        if ((op != EOpConstructStruct && size != 1 && size < type->getObjectSize()) ||
+            (op == EOpConstructStruct && size < type->getObjectSize())) {
+            error(line, "not enough data provided for construction", "constructor");
+            return true;
+        }
+    }
+
+    TIntermTyped *typed = node ? node->getAsTyped() : 0;
+    if (typed == 0) {
+        error(line, "constructor argument does not have a type", "constructor");
+        return true;
+    }
+    if (op != EOpConstructStruct && IsSampler(typed->getBasicType())) {
+        error(line, "cannot convert a sampler", "constructor");
+        return true;
+    }
+    if (typed->getBasicType() == EbtVoid) {
+        error(line, "cannot convert a void", "constructor");
+        return true;
+    }
+
+    return false;
+}
+
+// This function checks to see if a void variable has been declared and raise an error message for such a case
+//
+// returns true in case of an error
+//
+bool TParseContext::voidErrorCheck(const TSourceLoc& line, const TString& identifier, const TPublicType& pubType)
+{
+    if (pubType.type == EbtVoid) {
+        error(line, "illegal use of type 'void'", identifier.c_str());
+        return true;
+    } 
+
+    return false;
+}
+
+// This function checks to see if the node (for the expression) contains a scalar boolean expression or not
+//
+// returns true in case of an error
+//
+bool TParseContext::boolErrorCheck(const TSourceLoc& line, const TIntermTyped* type)
+{
+    if (type->getBasicType() != EbtBool || type->isArray() || type->isMatrix() || type->isVector()) {
+        error(line, "boolean expression expected", "");
+        return true;
+    } 
+
+    return false;
+}
+
+// This function checks to see if the node (for the expression) contains a scalar boolean expression or not
+//
+// returns true in case of an error
+//
+bool TParseContext::boolErrorCheck(const TSourceLoc& line, const TPublicType& pType)
+{
+    if (pType.type != EbtBool || pType.array || pType.matrix || (pType.size > 1)) {
+        error(line, "boolean expression expected", "");
+        return true;
+    } 
+
+    return false;
+}
+
+bool TParseContext::samplerErrorCheck(const TSourceLoc& line, const TPublicType& pType, const char* reason)
+{
+    if (pType.type == EbtStruct) {
+        if (containsSampler(*pType.userDef)) {
+            error(line, reason, getBasicString(pType.type), "(structure contains a sampler)");
+        
+            return true;
+        }
+        
+        return false;
+    } else if (IsSampler(pType.type)) {
+        error(line, reason, getBasicString(pType.type));
+
+        return true;
+    }
+
+    return false;
+}
+
+bool TParseContext::structQualifierErrorCheck(const TSourceLoc& line, const TPublicType& pType)
+{
+    if ((pType.qualifier == EvqVaryingIn || pType.qualifier == EvqVaryingOut || pType.qualifier == EvqAttribute) &&
+        pType.type == EbtStruct) {
+        error(line, "cannot be used with a structure", getQualifierString(pType.qualifier));
+        
+        return true;
+    }
+
+    if (pType.qualifier != EvqUniform && samplerErrorCheck(line, pType, "samplers must be uniform"))
+        return true;
+
+    return false;
+}
+
+bool TParseContext::parameterSamplerErrorCheck(const TSourceLoc& line, TQualifier qualifier, const TType& type)
+{
+    if ((qualifier == EvqOut || qualifier == EvqInOut) && 
+             type.getBasicType() != EbtStruct && IsSampler(type.getBasicType())) {
+        error(line, "samplers cannot be output parameters", type.getBasicString());
+        return true;
+    }
+
+    return false;
+}
+
+bool TParseContext::containsSampler(TType& type)
+{
+    if (IsSampler(type.getBasicType()))
+        return true;
+
+    if (type.getBasicType() == EbtStruct) {
+        const TFieldList& fields = type.getStruct()->fields();
+        for (unsigned int i = 0; i < fields.size(); ++i) {
+            if (containsSampler(*fields[i]->type()))
+                return true;
+        }
+    }
+
+    return false;
+}
+
+//
+// Do size checking for an array type's size.
+//
+// Returns true if there was an error.
+//
+bool TParseContext::arraySizeErrorCheck(const TSourceLoc& line, TIntermTyped* expr, int& size)
+{
+    TIntermConstantUnion* constant = expr->getAsConstantUnion();
+    if (constant == 0 || constant->getBasicType() != EbtInt) {
+        error(line, "array size must be a constant integer expression", "");
+        return true;
+    }
+
+    size = constant->getIConst(0);
+
+    if (size <= 0) {
+        error(line, "array size must be a positive integer", "");
+        size = 1;
+        return true;
+    }
+
+    return false;
+}
+
+//
+// See if this qualifier can be an array.
+//
+// Returns true if there is an error.
+//
+bool TParseContext::arrayQualifierErrorCheck(const TSourceLoc& line, TPublicType type)
+{
+    if ((type.qualifier == EvqAttribute) || (type.qualifier == EvqConst)) {
+        error(line, "cannot declare arrays of this qualifier", TType(type).getCompleteString().c_str());
+        return true;
+    }
+
+    return false;
+}
+
+//
+// See if this type can be an array.
+//
+// Returns true if there is an error.
+//
+bool TParseContext::arrayTypeErrorCheck(const TSourceLoc& line, TPublicType type)
+{
+    //
+    // Can the type be an array?
+    //
+    if (type.array) {
+        error(line, "cannot declare arrays of arrays", TType(type).getCompleteString().c_str());
+        return true;
+    }
+
+    return false;
+}
+
+//
+// Do all the semantic checking for declaring an array, with and 
+// without a size, and make the right changes to the symbol table.
+//
+// size == 0 means no specified size.
+//
+// Returns true if there was an error.
+//
+bool TParseContext::arrayErrorCheck(const TSourceLoc& line, TString& identifier, TPublicType type, TVariable*& variable)
+{
+    //
+    // Don't check for reserved word use until after we know it's not in the symbol table,
+    // because reserved arrays can be redeclared.
+    //
+
+    bool builtIn = false; 
+    bool sameScope = false;
+    TSymbol* symbol = symbolTable.find(identifier, &builtIn, &sameScope);
+    if (symbol == 0 || !sameScope) {
+        if (reservedErrorCheck(line, identifier))
+            return true;
+        
+        variable = new TVariable(&identifier, TType(type));
+
+        if (type.arraySize)
+            variable->getType().setArraySize(type.arraySize);
+
+        if (! symbolTable.insert(*variable)) {
+            delete variable;
+            error(line, "INTERNAL ERROR inserting new symbol", identifier.c_str());
+            return true;
+        }
+    } else {
+        if (! symbol->isVariable()) {
+            error(line, "variable expected", identifier.c_str());
+            return true;
+        }
+
+        variable = static_cast<TVariable*>(symbol);
+        if (! variable->getType().isArray()) {
+            error(line, "redeclaring non-array as array", identifier.c_str());
+            return true;
+        }
+        if (variable->getType().getArraySize() > 0) {
+            error(line, "redeclaration of array with size", identifier.c_str());
+            return true;
+        }
+        
+        if (! variable->getType().sameElementType(TType(type))) {
+            error(line, "redeclaration of array with a different type", identifier.c_str());
+            return true;
+        }
+
+        if (type.arraySize)
+            variable->getType().setArraySize(type.arraySize);
+    } 
+
+    if (voidErrorCheck(line, identifier, type))
+        return true;
+
+    return false;
+}
+
+//
+// Enforce non-initializer type/qualifier rules.
+//
+// Returns true if there was an error.
+//
+bool TParseContext::nonInitConstErrorCheck(const TSourceLoc& line, TString& identifier, TPublicType& type, bool array)
+{
+    if (type.qualifier == EvqConst)
+    {
+        // Make the qualifier make sense.
+        type.qualifier = EvqTemporary;
+        
+        if (array)
+        {
+            error(line, "arrays may not be declared constant since they cannot be initialized", identifier.c_str());
+        }
+        else if (type.isStructureContainingArrays())
+        {
+            error(line, "structures containing arrays may not be declared constant since they cannot be initialized", identifier.c_str());
+        }
+        else
+        {
+            error(line, "variables with qualifier 'const' must be initialized", identifier.c_str());
+        }
+
+        return true;
+    }
+
+    return false;
+}
+
+//
+// Do semantic checking for a variable declaration that has no initializer,
+// and update the symbol table.
+//
+// Returns true if there was an error.
+//
+bool TParseContext::nonInitErrorCheck(const TSourceLoc& line, TString& identifier, TPublicType& type, TVariable*& variable)
+{
+    if (reservedErrorCheck(line, identifier))
+        recover();
+
+    variable = new TVariable(&identifier, TType(type));
+
+    if (! symbolTable.insert(*variable)) {
+        error(line, "redefinition", variable->getName().c_str());
+        delete variable;
+        variable = 0;
+        return true;
+    }
+
+    if (voidErrorCheck(line, identifier, type))
+        return true;
+
+    return false;
+}
+
+bool TParseContext::paramErrorCheck(const TSourceLoc& line, TQualifier qualifier, TQualifier paramQualifier, TType* type)
+{    
+    if (qualifier != EvqConst && qualifier != EvqTemporary) {
+        error(line, "qualifier not allowed on function parameter", getQualifierString(qualifier));
+        return true;
+    }
+    if (qualifier == EvqConst && paramQualifier != EvqIn) {
+        error(line, "qualifier not allowed with ", getQualifierString(qualifier), getQualifierString(paramQualifier));
+        return true;
+    }
+
+    if (qualifier == EvqConst)
+        type->setQualifier(EvqConstReadOnly);
+    else
+        type->setQualifier(paramQualifier);
+
+    return false;
+}
+
+bool TParseContext::extensionErrorCheck(const TSourceLoc& line, const TString& extension)
+{
+    const TExtensionBehavior& extBehavior = extensionBehavior();
+    TExtensionBehavior::const_iterator iter = extBehavior.find(extension.c_str());
+    if (iter == extBehavior.end()) {
+        error(line, "extension", extension.c_str(), "is not supported");
+        return true;
+    }
+    // In GLSL ES, an extension's default behavior is "disable".
+    if (iter->second == EBhDisable || iter->second == EBhUndefined) {
+        error(line, "extension", extension.c_str(), "is disabled");
+        return true;
+    }
+    if (iter->second == EBhWarn) {
+        warning(line, "extension", extension.c_str(), "is being used");
+        return false;
+    }
+
+    return false;
+}
+
+bool TParseContext::supportsExtension(const char* extension)
+{
+    const TExtensionBehavior& extbehavior = extensionBehavior();
+    TExtensionBehavior::const_iterator iter = extbehavior.find(extension);
+    return (iter != extbehavior.end());
+}
+
+bool TParseContext::isExtensionEnabled(const char* extension) const
+{
+    const TExtensionBehavior& extbehavior = extensionBehavior();
+    TExtensionBehavior::const_iterator iter = extbehavior.find(extension);
+
+    if (iter == extbehavior.end())
+    {
+        return false;
+    }
+
+    return (iter->second == EBhEnable || iter->second == EBhRequire);
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+//
+// Non-Errors.
+//
+/////////////////////////////////////////////////////////////////////////////////
+
+//
+// Look up a function name in the symbol table, and make sure it is a function.
+//
+// Return the function symbol if found, otherwise 0.
+//
+const TFunction* TParseContext::findFunction(const TSourceLoc& line, TFunction* call, bool *builtIn)
+{
+    // First find by unmangled name to check whether the function name has been
+    // hidden by a variable name or struct typename.
+    // If a function is found, check for one with a matching argument list.
+    const TSymbol* symbol = symbolTable.find(call->getName(), builtIn);
+    if (symbol == 0 || symbol->isFunction()) {
+        symbol = symbolTable.find(call->getMangledName(), builtIn);
+    }
+
+    if (symbol == 0) {
+        error(line, "no matching overloaded function found", call->getName().c_str());
+        return 0;
+    }
+
+    if (!symbol->isFunction()) {
+        error(line, "function name expected", call->getName().c_str());
+        return 0;
+    }
+
+    return static_cast<const TFunction*>(symbol);
+}
+
+//
+// Initializers show up in several places in the grammar.  Have one set of
+// code to handle them here.
+//
+bool TParseContext::executeInitializer(const TSourceLoc& line, TString& identifier, TPublicType& pType, 
+                                       TIntermTyped* initializer, TIntermNode*& intermNode, TVariable* variable)
+{
+    TType type = TType(pType);
+
+    if (variable == 0) {
+        if (reservedErrorCheck(line, identifier))
+            return true;
+
+        if (voidErrorCheck(line, identifier, pType))
+            return true;
+
+        //
+        // add variable to symbol table
+        //
+        variable = new TVariable(&identifier, type);
+        if (! symbolTable.insert(*variable)) {
+            error(line, "redefinition", variable->getName().c_str());
+            return true;
+            // don't delete variable, it's used by error recovery, and the pool 
+            // pop will take care of the memory
+        }
+    }
+
+    //
+    // identifier must be of type constant, a global, or a temporary
+    //
+    TQualifier qualifier = variable->getType().getQualifier();
+    if ((qualifier != EvqTemporary) && (qualifier != EvqGlobal) && (qualifier != EvqConst)) {
+        error(line, " cannot initialize this type of qualifier ", variable->getType().getQualifierString());
+        return true;
+    }
+    //
+    // test for and propagate constant
+    //
+
+    if (qualifier == EvqConst) {
+        if (qualifier != initializer->getType().getQualifier()) {
+            std::stringstream extraInfoStream;
+            extraInfoStream << "'" << variable->getType().getCompleteString() << "'";
+            std::string extraInfo = extraInfoStream.str();
+            error(line, " assigning non-constant to", "=", extraInfo.c_str());
+            variable->getType().setQualifier(EvqTemporary);
+            return true;
+        }
+        if (type != initializer->getType()) {
+            error(line, " non-matching types for const initializer ", 
+                variable->getType().getQualifierString());
+            variable->getType().setQualifier(EvqTemporary);
+            return true;
+        }
+        if (initializer->getAsConstantUnion()) { 
+            variable->shareConstPointer(initializer->getAsConstantUnion()->getUnionArrayPointer());
+        } else if (initializer->getAsSymbolNode()) {
+            const TSymbol* symbol = symbolTable.find(initializer->getAsSymbolNode()->getSymbol());
+            const TVariable* tVar = static_cast<const TVariable*>(symbol);
+
+            ConstantUnion* constArray = tVar->getConstPointer();
+            variable->shareConstPointer(constArray);
+        } else {
+            std::stringstream extraInfoStream;
+            extraInfoStream << "'" << variable->getType().getCompleteString() << "'";
+            std::string extraInfo = extraInfoStream.str();
+            error(line, " cannot assign to", "=", extraInfo.c_str());
+            variable->getType().setQualifier(EvqTemporary);
+            return true;
+        }
+    }
+ 
+    if (qualifier != EvqConst) {
+        TIntermSymbol* intermSymbol = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), line);
+        intermNode = intermediate.addAssign(EOpInitialize, intermSymbol, initializer, line);
+        if (intermNode == 0) {
+            assignError(line, "=", intermSymbol->getCompleteString(), initializer->getCompleteString());
+            return true;
+        }
+    } else 
+        intermNode = 0;
+
+    return false;
+}
+
+bool TParseContext::areAllChildConst(TIntermAggregate* aggrNode)
+{
+    ASSERT(aggrNode != NULL);
+    if (!aggrNode->isConstructor())
+        return false;
+
+    bool allConstant = true;
+
+    // check if all the child nodes are constants so that they can be inserted into 
+    // the parent node
+    TIntermSequence &sequence = aggrNode->getSequence() ;
+    for (TIntermSequence::iterator p = sequence.begin(); p != sequence.end(); ++p) {
+        if (!(*p)->getAsTyped()->getAsConstantUnion())
+            return false;
+    }
+
+    return allConstant;
+}
+
+// This function is used to test for the correctness of the parameters passed to various constructor functions
+// and also convert them to the right datatype if it is allowed and required. 
+//
+// Returns 0 for an error or the constructed node (aggregate or typed) for no error.
+//
+TIntermTyped* TParseContext::addConstructor(TIntermNode* node, const TType* type, TOperator op, TFunction* fnCall, const TSourceLoc& line)
+{
+    if (node == 0)
+        return 0;
+
+    TIntermAggregate* aggrNode = node->getAsAggregate();
+    
+    TFieldList::const_iterator memberFields;
+    if (op == EOpConstructStruct)
+        memberFields = type->getStruct()->fields().begin();
+    
+    TType elementType = *type;
+    if (type->isArray())
+        elementType.clearArrayness();
+
+    bool singleArg;
+    if (aggrNode) {
+        if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1)
+            singleArg = true;
+        else
+            singleArg = false;
+    } else
+        singleArg = true;
+
+    TIntermTyped *newNode;
+    if (singleArg) {
+        // If structure constructor or array constructor is being called 
+        // for only one parameter inside the structure, we need to call constructStruct function once.
+        if (type->isArray())
+            newNode = constructStruct(node, &elementType, 1, node->getLine(), false);
+        else if (op == EOpConstructStruct)
+            newNode = constructStruct(node, (*memberFields)->type(), 1, node->getLine(), false);
+        else
+            newNode = constructBuiltIn(type, op, node, node->getLine(), false);
+
+        if (newNode && newNode->getAsAggregate()) {
+            TIntermTyped* constConstructor = foldConstConstructor(newNode->getAsAggregate(), *type);
+            if (constConstructor)
+                return constConstructor;
+        }
+
+        return newNode;
+    }
+    
+    //
+    // Handle list of arguments.
+    //
+    TIntermSequence &sequenceVector = aggrNode->getSequence() ;    // Stores the information about the parameter to the constructor
+    // if the structure constructor contains more than one parameter, then construct
+    // each parameter
+    
+    int paramCount = 0;  // keeps a track of the constructor parameter number being checked    
+    
+    // for each parameter to the constructor call, check to see if the right type is passed or convert them 
+    // to the right type if possible (and allowed).
+    // for structure constructors, just check if the right type is passed, no conversion is allowed.
+    
+    for (TIntermSequence::iterator p = sequenceVector.begin(); 
+                                   p != sequenceVector.end(); p++, paramCount++) {
+        if (type->isArray())
+            newNode = constructStruct(*p, &elementType, paramCount+1, node->getLine(), true);
+        else if (op == EOpConstructStruct)
+            newNode = constructStruct(*p, memberFields[paramCount]->type(), paramCount+1, node->getLine(), true);
+        else
+            newNode = constructBuiltIn(type, op, *p, node->getLine(), true);
+        
+        if (newNode) {
+            *p = newNode;
+        }
+    }
+
+    TIntermTyped* constructor = intermediate.setAggregateOperator(aggrNode, op, line);
+    TIntermTyped* constConstructor = foldConstConstructor(constructor->getAsAggregate(), *type);
+    if (constConstructor)
+        return constConstructor;
+
+    return constructor;
+}
+
+TIntermTyped* TParseContext::foldConstConstructor(TIntermAggregate* aggrNode, const TType& type)
+{
+    bool canBeFolded = areAllChildConst(aggrNode);
+    aggrNode->setType(type);
+    if (canBeFolded) {
+        bool returnVal = false;
+        ConstantUnion* unionArray = new ConstantUnion[type.getObjectSize()];
+        if (aggrNode->getSequence().size() == 1)  {
+            returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), symbolTable,  type, true);
+        }
+        else {
+            returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), symbolTable,  type);
+        }
+        if (returnVal)
+            return 0;
+
+        return intermediate.addConstantUnion(unionArray, type, aggrNode->getLine());
+    }
+
+    return 0;
+}
+
+// Function for constructor implementation. Calls addUnaryMath with appropriate EOp value
+// for the parameter to the constructor (passed to this function). Essentially, it converts
+// the parameter types correctly. If a constructor expects an int (like ivec2) and is passed a 
+// float, then float is converted to int.
+//
+// Returns 0 for an error or the constructed node.
+//
+TIntermTyped* TParseContext::constructBuiltIn(const TType* type, TOperator op, TIntermNode* node, const TSourceLoc& line, bool subset)
+{
+    TIntermTyped* newNode;
+    TOperator basicOp;
+
+    //
+    // First, convert types as needed.
+    //
+    switch (op) {
+    case EOpConstructVec2:
+    case EOpConstructVec3:
+    case EOpConstructVec4:
+    case EOpConstructMat2:
+    case EOpConstructMat3:
+    case EOpConstructMat4:
+    case EOpConstructFloat:
+        basicOp = EOpConstructFloat;
+        break;
+
+    case EOpConstructIVec2:
+    case EOpConstructIVec3:
+    case EOpConstructIVec4:
+    case EOpConstructInt:
+        basicOp = EOpConstructInt;
+        break;
+
+    case EOpConstructBVec2:
+    case EOpConstructBVec3:
+    case EOpConstructBVec4:
+    case EOpConstructBool:
+        basicOp = EOpConstructBool;
+        break;
+
+    default:
+        error(line, "unsupported construction", "");
+        recover();
+
+        return 0;
+    }
+    newNode = intermediate.addUnaryMath(basicOp, node, node->getLine(), symbolTable);
+    if (newNode == 0) {
+        error(line, "can't convert", "constructor");
+        return 0;
+    }
+
+    //
+    // Now, if there still isn't an operation to do the construction, and we need one, add one.
+    //
+    
+    // Otherwise, skip out early.
+    if (subset || (newNode != node && newNode->getType() == *type))
+        return newNode;
+
+    // setAggregateOperator will insert a new node for the constructor, as needed.
+    return intermediate.setAggregateOperator(newNode, op, line);
+}
+
+// This function tests for the type of the parameters to the structures constructors. Raises
+// an error message if the expected type does not match the parameter passed to the constructor.
+//
+// Returns 0 for an error or the input node itself if the expected and the given parameter types match.
+//
+TIntermTyped* TParseContext::constructStruct(TIntermNode* node, TType* type, int paramCount, const TSourceLoc& line, bool subset)
+{
+    if (*type == node->getAsTyped()->getType()) {
+        if (subset)
+            return node->getAsTyped();
+        else
+            return intermediate.setAggregateOperator(node->getAsTyped(), EOpConstructStruct, line);
+    } else {
+        std::stringstream extraInfoStream;
+        extraInfoStream << "cannot convert parameter " << paramCount 
+                        << " from '" << node->getAsTyped()->getType().getBasicString()
+                        << "' to '" << type->getBasicString() << "'";
+        std::string extraInfo = extraInfoStream.str();
+        error(line, "", "constructor", extraInfo.c_str());
+        recover();
+    }
+
+    return 0;
+}
+
+//
+// This function returns the tree representation for the vector field(s) being accessed from contant vector.
+// If only one component of vector is accessed (v.x or v[0] where v is a contant vector), then a contant node is
+// returned, else an aggregate node is returned (for v.xy). The input to this function could either be the symbol
+// node or it could be the intermediate tree representation of accessing fields in a constant structure or column of 
+// a constant matrix.
+//
+TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTyped* node, const TSourceLoc& line)
+{
+    TIntermTyped* typedNode;
+    TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
+
+    ConstantUnion *unionArray;
+    if (tempConstantNode) {
+        unionArray = tempConstantNode->getUnionArrayPointer();
+
+        if (!unionArray) {
+            return node;
+        }
+    } else { // The node has to be either a symbol node or an aggregate node or a tempConstant node, else, its an error
+        error(line, "Cannot offset into the vector", "Error");
+        recover();
+
+        return 0;
+    }
+
+    ConstantUnion* constArray = new ConstantUnion[fields.num];
+
+    for (int i = 0; i < fields.num; i++) {
+        if (fields.offsets[i] >= node->getType().getNominalSize()) {
+            std::stringstream extraInfoStream;
+            extraInfoStream << "vector field selection out of range '" << fields.offsets[i] << "'";
+            std::string extraInfo = extraInfoStream.str();
+            error(line, "", "[", extraInfo.c_str());
+            recover();
+            fields.offsets[i] = 0;
+        }
+        
+        constArray[i] = unionArray[fields.offsets[i]];
+
+    } 
+    typedNode = intermediate.addConstantUnion(constArray, node->getType(), line);
+    return typedNode;
+}
+
+//
+// This function returns the column being accessed from a constant matrix. The values are retrieved from
+// the symbol table and parse-tree is built for a vector (each column of a matrix is a vector). The input 
+// to the function could either be a symbol node (m[0] where m is a constant matrix)that represents a 
+// constant matrix or it could be the tree representation of the constant matrix (s.m1[0] where s is a constant structure)
+//
+TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, const TSourceLoc& line)
+{
+    TIntermTyped* typedNode;
+    TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
+
+    if (index >= node->getType().getNominalSize()) {
+        std::stringstream extraInfoStream;
+        extraInfoStream << "matrix field selection out of range '" << index << "'";
+        std::string extraInfo = extraInfoStream.str();
+        error(line, "", "[", extraInfo.c_str());
+        recover();
+        index = 0;
+    }
+
+    if (tempConstantNode) {
+         ConstantUnion* unionArray = tempConstantNode->getUnionArrayPointer();
+         int size = tempConstantNode->getType().getNominalSize();
+         typedNode = intermediate.addConstantUnion(&unionArray[size*index], tempConstantNode->getType(), line);
+    } else {
+        error(line, "Cannot offset into the matrix", "Error");
+        recover();
+
+        return 0;
+    }
+
+    return typedNode;
+}
+
+
+//
+// This function returns an element of an array accessed from a constant array. The values are retrieved from
+// the symbol table and parse-tree is built for the type of the element. The input 
+// to the function could either be a symbol node (a[0] where a is a constant array)that represents a 
+// constant array or it could be the tree representation of the constant array (s.a1[0] where s is a constant structure)
+//
+TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, const TSourceLoc& line)
+{
+    TIntermTyped* typedNode;
+    TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
+    TType arrayElementType = node->getType();
+    arrayElementType.clearArrayness();
+
+    if (index >= node->getType().getArraySize()) {
+        std::stringstream extraInfoStream;
+        extraInfoStream << "array field selection out of range '" << index << "'";
+        std::string extraInfo = extraInfoStream.str();
+        error(line, "", "[", extraInfo.c_str());
+        recover();
+        index = 0;
+    }
+
+    if (tempConstantNode) {
+         size_t arrayElementSize = arrayElementType.getObjectSize();
+         ConstantUnion* unionArray = tempConstantNode->getUnionArrayPointer();
+         typedNode = intermediate.addConstantUnion(&unionArray[arrayElementSize * index], tempConstantNode->getType(), line);
+    } else {
+        error(line, "Cannot offset into the array", "Error");
+        recover();
+
+        return 0;
+    }
+
+    return typedNode;
+}
+
+
+//
+// This function returns the value of a particular field inside a constant structure from the symbol table. 
+// If there is an embedded/nested struct, it appropriately calls addConstStructNested or addConstStructFromAggr
+// function and returns the parse-tree with the values of the embedded/nested struct.
+//
+TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* node, const TSourceLoc& line)
+{
+    const TFieldList& fields = node->getType().getStruct()->fields();
+
+    size_t instanceSize = 0;
+    for (size_t index = 0; index < fields.size(); ++index) {
+        if (fields[index]->name() == identifier) {
+            break;
+        } else {
+            instanceSize += fields[index]->type()->getObjectSize();
+        }
+    }
+
+    TIntermTyped* typedNode = 0;
+    TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
+    if (tempConstantNode) {
+         ConstantUnion* constArray = tempConstantNode->getUnionArrayPointer();
+
+         typedNode = intermediate.addConstantUnion(constArray+instanceSize, tempConstantNode->getType(), line); // type will be changed in the calling function
+    } else {
+        error(line, "Cannot offset into the structure", "Error");
+        recover();
+
+        return 0;
+    }
+
+    return typedNode;
+}
+
+bool TParseContext::enterStructDeclaration(const TSourceLoc& line, const TString& identifier)
+{
+    ++structNestingLevel;
+
+    // Embedded structure definitions are not supported per GLSL ES spec.
+    // They aren't allowed in GLSL either, but we need to detect this here
+    // so we don't rely on the GLSL compiler to catch it.
+    if (structNestingLevel > 1) {
+        error(line, "", "Embedded struct definitions are not allowed");
+        return true;
+    }
+
+    return false;
+}
+
+void TParseContext::exitStructDeclaration()
+{
+    --structNestingLevel;
+}
+
+namespace {
+
+const int kWebGLMaxStructNesting = 4;
+
+}  // namespace
+
+bool TParseContext::structNestingErrorCheck(const TSourceLoc& line, const TField& field)
+{
+    if (!isWebGLBasedSpec(shaderSpec)) {
+        return false;
+    }
+
+    if (field.type()->getBasicType() != EbtStruct) {
+        return false;
+    }
+
+    // We're already inside a structure definition at this point, so add
+    // one to the field's struct nesting.
+    if (1 + field.type()->getDeepestStructNesting() > kWebGLMaxStructNesting) {
+        std::stringstream reasonStream;
+        reasonStream << "Reference of struct type "
+                     << field.type()->getStruct()->name().c_str()
+                     << " exceeds maximum allowed nesting level of "
+                     << kWebGLMaxStructNesting;
+        std::string reason = reasonStream.str();
+        error(line, reason.c_str(), field.name().c_str(), "");
+        return true;
+    }
+
+    return false;
+}
+
+//
+// Parse an array index expression
+//
+TIntermTyped* TParseContext::addIndexExpression(TIntermTyped *baseExpression, const TSourceLoc& location, TIntermTyped *indexExpression)
+{
+    TIntermTyped *indexedExpression = NULL;
+
+    if (!baseExpression->isArray() && !baseExpression->isMatrix() && !baseExpression->isVector())
+    {
+        if (baseExpression->getAsSymbolNode())
+        {
+            error(location, " left of '[' is not of type array, matrix, or vector ", baseExpression->getAsSymbolNode()->getSymbol().c_str());
+        }
+        else
+        {
+            error(location, " left of '[' is not of type array, matrix, or vector ", "expression");
+        }
+        recover();
+    }
+
+    if (indexExpression->getQualifier() == EvqConst)
+    {
+        int index = indexExpression->getAsConstantUnion()->getIConst(0);
+        if (index < 0)
+        {
+            std::stringstream infoStream;
+            infoStream << index;
+            std::string info = infoStream.str();
+            error(location, "negative index", info.c_str());
+            recover();
+            index = 0;
+        }
+        if (baseExpression->getType().getQualifier() == EvqConst)
+        {
+            if (baseExpression->isArray())
+            {
+                // constant folding for arrays
+                indexedExpression = addConstArrayNode(index, baseExpression, location);
+            }
+            else if (baseExpression->isVector())
+            {
+                // constant folding for vectors
+                TVectorFields fields;
+                fields.num = 1;
+                fields.offsets[0] = index; // need to do it this way because v.xy sends fields integer array
+                indexedExpression = addConstVectorNode(fields, baseExpression, location);
+            }
+            else if (baseExpression->isMatrix())
+            {
+                // constant folding for matrices
+                indexedExpression = addConstMatrixNode(index, baseExpression, location);
+            }
+        }
+        else
+        {
+            if (baseExpression->isArray())
+            {
+                if (index >= baseExpression->getType().getArraySize())
+                {
+                    std::stringstream extraInfoStream;
+                    extraInfoStream << "array index out of range '" << index << "'";
+                    std::string extraInfo = extraInfoStream.str();
+                    error(location, "", "[", extraInfo.c_str());
+                    recover();
+                    index = baseExpression->getType().getArraySize() - 1;
+                }
+                else if (baseExpression->getQualifier() == EvqFragData && index > 0 && !isExtensionEnabled("GL_EXT_draw_buffers"))
+                {
+                    error(location, "", "[", "array indexes for gl_FragData must be zero when GL_EXT_draw_buffers is disabled");
+                    recover();
+                    index = 0;
+                }
+            }
+            else if ((baseExpression->isVector() || baseExpression->isMatrix()) && baseExpression->getType().getNominalSize() <= index)
+            {
+                std::stringstream extraInfoStream;
+                extraInfoStream << "field selection out of range '" << index << "'";
+                std::string extraInfo = extraInfoStream.str();
+                error(location, "", "[", extraInfo.c_str());
+                recover();
+                index = baseExpression->getType().getNominalSize() - 1;
+            }
+
+            indexExpression->getAsConstantUnion()->getUnionArrayPointer()->setIConst(index);
+            indexedExpression = intermediate.addIndex(EOpIndexDirect, baseExpression, indexExpression, location);
+        }
+    }
+    else
+    {
+        indexedExpression = intermediate.addIndex(EOpIndexIndirect, baseExpression, indexExpression, location);
+    }
+
+    if (indexedExpression == 0)
+    {
+        ConstantUnion *unionArray = new ConstantUnion[1];
+        unionArray->setFConst(0.0f);
+        indexedExpression = intermediate.addConstantUnion(unionArray, TType(EbtFloat, EbpHigh, EvqConst), location);
+    }
+    else if (baseExpression->isArray())
+    {
+        const TType &baseType = baseExpression->getType();
+        if (baseType.getStruct())
+        {
+            TType copyOfType(baseType.getStruct());
+            indexedExpression->setType(copyOfType);
+        }
+        else
+        {
+            indexedExpression->setType(TType(baseExpression->getBasicType(), baseExpression->getPrecision(), EvqTemporary, baseExpression->getNominalSize(), baseExpression->isMatrix()));
+        }
+
+        if (baseExpression->getType().getQualifier() == EvqConst)
+        {
+            indexedExpression->getTypePointer()->setQualifier(EvqConst);
+        }
+    }
+    else if (baseExpression->isMatrix())
+    {
+        TQualifier qualifier = baseExpression->getType().getQualifier() == EvqConst ? EvqConst : EvqTemporary;
+        indexedExpression->setType(TType(baseExpression->getBasicType(), baseExpression->getPrecision(), qualifier, baseExpression->getNominalSize()));
+    }
+    else if (baseExpression->isVector())
+    {
+        TQualifier qualifier = baseExpression->getType().getQualifier() == EvqConst ? EvqConst : EvqTemporary;
+        indexedExpression->setType(TType(baseExpression->getBasicType(), baseExpression->getPrecision(), qualifier));
+    }
+    else
+    {
+        indexedExpression->setType(baseExpression->getType());
+    }
+
+    return indexedExpression;
+}
+
+//
+// Parse an array of strings using yyparse.
+//
+// Returns 0 for success.
+//
+int PaParseStrings(size_t count, const char* const string[], const int length[],
+                   TParseContext* context) {
+    if ((count == 0) || (string == NULL))
+        return 1;
+
+    if (glslang_initialize(context))
+        return 1;
+
+    int error = glslang_scan(count, string, length, context);
+    if (!error)
+        error = glslang_parse(context);
+
+    glslang_finalize(context);
+
+    return (error == 0) && (context->numErrors() == 0) ? 0 : 1;
+}
+
+
+
diff --git a/src/compiler/Uniform.cpp b/src/compiler/Uniform.cpp
index dcf3af1..f367db2 100644
--- a/src/compiler/Uniform.cpp
+++ b/src/compiler/Uniform.cpp
@@ -1,21 +1,21 @@
-//

-// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-#include "compiler/Uniform.h"

-

-namespace sh

-{

-

-Uniform::Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex)

-{

-    this->type = type;

-    this->precision = precision;

-    this->name = name;

-    this->arraySize = arraySize;

-    this->registerIndex = registerIndex;

-}

-

-}

+//
+// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/Uniform.h"
+
+namespace sh
+{
+
+Uniform::Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex)
+{
+    this->type = type;
+    this->precision = precision;
+    this->name = name;
+    this->arraySize = arraySize;
+    this->registerIndex = registerIndex;
+}
+
+}
diff --git a/src/compiler/Uniform.h b/src/compiler/Uniform.h
index 2ffd51e..4c53ffa 100644
--- a/src/compiler/Uniform.h
+++ b/src/compiler/Uniform.h
@@ -1,35 +1,35 @@
-//

-// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-#ifndef COMPILER_UNIFORM_H_

-#define COMPILER_UNIFORM_H_

-

-#include <string>

-#include <vector>

-

-#define GL_APICALL

-#include <GLES2/gl2.h>

-

-namespace sh

-{

-

-struct Uniform

-{

-    Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex);

-

-    GLenum type;

-    GLenum precision;

-    std::string name;

-    unsigned int arraySize;

-    

-    int registerIndex;

-};

-

-typedef std::vector<Uniform> ActiveUniforms;

-

-}

-

-#endif   // COMPILER_UNIFORM_H_

+//
+// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef COMPILER_UNIFORM_H_
+#define COMPILER_UNIFORM_H_
+
+#include <string>
+#include <vector>
+
+#define GL_APICALL
+#include <GLES2/gl2.h>
+
+namespace sh
+{
+
+struct Uniform
+{
+    Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex);
+
+    GLenum type;
+    GLenum precision;
+    std::string name;
+    unsigned int arraySize;
+    
+    int registerIndex;
+};
+
+typedef std::vector<Uniform> ActiveUniforms;
+
+}
+
+#endif   // COMPILER_UNIFORM_H_
diff --git a/src/compiler/preprocessor/Preprocessor.cpp b/src/compiler/preprocessor/Preprocessor.cpp
index 4b9e674..b615c85 100644
--- a/src/compiler/preprocessor/Preprocessor.cpp
+++ b/src/compiler/preprocessor/Preprocessor.cpp
@@ -1,119 +1,119 @@
-//

-// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-#include "Preprocessor.h"

-

-#include <cassert>

-#include <sstream>

-

-#include "DiagnosticsBase.h"

-#include "DirectiveParser.h"

-#include "Macro.h"

-#include "MacroExpander.h"

-#include "Token.h"

-#include "Tokenizer.h"

-

-namespace pp

-{

-

-struct PreprocessorImpl

-{

-    Diagnostics* diagnostics;

-    MacroSet macroSet;

-    Tokenizer tokenizer;

-    DirectiveParser directiveParser;

-    MacroExpander macroExpander;

-

-    PreprocessorImpl(Diagnostics* diag,

-                     DirectiveHandler* directiveHandler) :

-        diagnostics(diag),

-        tokenizer(diag),

-        directiveParser(&tokenizer, &macroSet, diag, directiveHandler),

-        macroExpander(&directiveParser, &macroSet, diag)

-    {

-    }

-};

-

-Preprocessor::Preprocessor(Diagnostics* diagnostics,

-                           DirectiveHandler* directiveHandler)

-{

-    mImpl = new PreprocessorImpl(diagnostics, directiveHandler);

-}

-

-Preprocessor::~Preprocessor()

-{

-    delete mImpl;

-}

-

-bool Preprocessor::init(size_t count,

-                        const char* const string[],

-                        const int length[])

-{

-    static const int kGLSLVersion = 100;

-

-    // Add standard pre-defined macros.

-    predefineMacro("__LINE__", 0);

-    predefineMacro("__FILE__", 0);

-    predefineMacro("__VERSION__", kGLSLVersion);

-    predefineMacro("GL_ES", 1);

-

-    return mImpl->tokenizer.init(count, string, length);

-}

-

-void Preprocessor::predefineMacro(const char* name, int value)

-{

-    std::ostringstream stream;

-    stream << value;

-

-    Token token;

-    token.type = Token::CONST_INT;

-    token.text = stream.str();

-

-    Macro macro;

-    macro.predefined = true;

-    macro.type = Macro::kTypeObj;

-    macro.name = name;

-    macro.replacements.push_back(token);

-

-    mImpl->macroSet[name] = macro;

-}

-

-void Preprocessor::setMaxTokenLength(size_t maxLength)

-{

-    mImpl->tokenizer.setMaxTokenLength(maxLength);

-}

-

-void Preprocessor::lex(Token* token)

-{

-    bool validToken = false;

-    while (!validToken)

-    {

-        mImpl->macroExpander.lex(token);

-        switch (token->type)

-        {

-          // We should not be returning internal preprocessing tokens.

-          // Convert preprocessing tokens to compiler tokens or report

-          // diagnostics.

-          case Token::PP_HASH:

-            assert(false);

-            break;

-          case Token::PP_NUMBER:

-            mImpl->diagnostics->report(Diagnostics::INVALID_NUMBER,

-                                       token->location, token->text);

-            break;

-          case Token::PP_OTHER:

-            mImpl->diagnostics->report(Diagnostics::INVALID_CHARACTER,

-                                       token->location, token->text);

-            break;

-          default:

-            validToken = true;

-            break;

-        }

-    }

-}

-

-}  // namespace pp

-

+//
+// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "Preprocessor.h"
+
+#include <cassert>
+#include <sstream>
+
+#include "DiagnosticsBase.h"
+#include "DirectiveParser.h"
+#include "Macro.h"
+#include "MacroExpander.h"
+#include "Token.h"
+#include "Tokenizer.h"
+
+namespace pp
+{
+
+struct PreprocessorImpl
+{
+    Diagnostics* diagnostics;
+    MacroSet macroSet;
+    Tokenizer tokenizer;
+    DirectiveParser directiveParser;
+    MacroExpander macroExpander;
+
+    PreprocessorImpl(Diagnostics* diag,
+                     DirectiveHandler* directiveHandler) :
+        diagnostics(diag),
+        tokenizer(diag),
+        directiveParser(&tokenizer, &macroSet, diag, directiveHandler),
+        macroExpander(&directiveParser, &macroSet, diag)
+    {
+    }
+};
+
+Preprocessor::Preprocessor(Diagnostics* diagnostics,
+                           DirectiveHandler* directiveHandler)
+{
+    mImpl = new PreprocessorImpl(diagnostics, directiveHandler);
+}
+
+Preprocessor::~Preprocessor()
+{
+    delete mImpl;
+}
+
+bool Preprocessor::init(size_t count,
+                        const char* const string[],
+                        const int length[])
+{
+    static const int kGLSLVersion = 100;
+
+    // Add standard pre-defined macros.
+    predefineMacro("__LINE__", 0);
+    predefineMacro("__FILE__", 0);
+    predefineMacro("__VERSION__", kGLSLVersion);
+    predefineMacro("GL_ES", 1);
+
+    return mImpl->tokenizer.init(count, string, length);
+}
+
+void Preprocessor::predefineMacro(const char* name, int value)
+{
+    std::ostringstream stream;
+    stream << value;
+
+    Token token;
+    token.type = Token::CONST_INT;
+    token.text = stream.str();
+
+    Macro macro;
+    macro.predefined = true;
+    macro.type = Macro::kTypeObj;
+    macro.name = name;
+    macro.replacements.push_back(token);
+
+    mImpl->macroSet[name] = macro;
+}
+
+void Preprocessor::setMaxTokenLength(size_t maxLength)
+{
+    mImpl->tokenizer.setMaxTokenLength(maxLength);
+}
+
+void Preprocessor::lex(Token* token)
+{
+    bool validToken = false;
+    while (!validToken)
+    {
+        mImpl->macroExpander.lex(token);
+        switch (token->type)
+        {
+          // We should not be returning internal preprocessing tokens.
+          // Convert preprocessing tokens to compiler tokens or report
+          // diagnostics.
+          case Token::PP_HASH:
+            assert(false);
+            break;
+          case Token::PP_NUMBER:
+            mImpl->diagnostics->report(Diagnostics::INVALID_NUMBER,
+                                       token->location, token->text);
+            break;
+          case Token::PP_OTHER:
+            mImpl->diagnostics->report(Diagnostics::INVALID_CHARACTER,
+                                       token->location, token->text);
+            break;
+          default:
+            validToken = true;
+            break;
+        }
+    }
+}
+
+}  // namespace pp
+
diff --git a/src/compiler/preprocessor/Preprocessor.h b/src/compiler/preprocessor/Preprocessor.h
index f9609c0..9a90d79 100644
--- a/src/compiler/preprocessor/Preprocessor.h
+++ b/src/compiler/preprocessor/Preprocessor.h
@@ -1,57 +1,57 @@
-//

-// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-#ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_

-#define COMPILER_PREPROCESSOR_PREPROCESSOR_H_

-

-#include <stddef.h>

-

-#include "pp_utils.h"

-

-namespace pp

-{

-

-class Diagnostics;

-class DirectiveHandler;

-struct PreprocessorImpl;

-struct Token;

-

-class Preprocessor

-{

-  public:

-    Preprocessor(Diagnostics* diagnostics, DirectiveHandler* directiveHandler);

-    ~Preprocessor();

-

-    // count: specifies the number of elements in the string and length arrays.

-    // string: specifies an array of pointers to strings.

-    // length: specifies an array of string lengths.

-    // If length is NULL, each string is assumed to be null terminated.

-    // If length is a value other than NULL, it points to an array containing

-    // a string length for each of the corresponding elements of string.

-    // Each element in the length array may contain the length of the

-    // corresponding string or a value less than 0 to indicate that the string

-    // is null terminated.

-    bool init(size_t count, const char* const string[], const int length[]);

-    // Adds a pre-defined macro.

-    void predefineMacro(const char* name, int value);

-    // Sets maximum allowed token length.

-    // If token length exceeds this limit,

-    // the token text will be truncated to the given maximum length, and

-    // TOKEN_TOO_LONG diagnostic will be generated.

-    // The maximum length defaults to 256.

-    void setMaxTokenLength(size_t maxLength);

-

-    void lex(Token* token);

-

-  private:

-    PP_DISALLOW_COPY_AND_ASSIGN(Preprocessor);

-

-    PreprocessorImpl* mImpl;

-};

-

-}  // namespace pp

-#endif  // COMPILER_PREPROCESSOR_PREPROCESSOR_H_

-

+//
+// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_
+#define COMPILER_PREPROCESSOR_PREPROCESSOR_H_
+
+#include <stddef.h>
+
+#include "pp_utils.h"
+
+namespace pp
+{
+
+class Diagnostics;
+class DirectiveHandler;
+struct PreprocessorImpl;
+struct Token;
+
+class Preprocessor
+{
+  public:
+    Preprocessor(Diagnostics* diagnostics, DirectiveHandler* directiveHandler);
+    ~Preprocessor();
+
+    // count: specifies the number of elements in the string and length arrays.
+    // string: specifies an array of pointers to strings.
+    // length: specifies an array of string lengths.
+    // If length is NULL, each string is assumed to be null terminated.
+    // If length is a value other than NULL, it points to an array containing
+    // a string length for each of the corresponding elements of string.
+    // Each element in the length array may contain the length of the
+    // corresponding string or a value less than 0 to indicate that the string
+    // is null terminated.
+    bool init(size_t count, const char* const string[], const int length[]);
+    // Adds a pre-defined macro.
+    void predefineMacro(const char* name, int value);
+    // Sets maximum allowed token length.
+    // If token length exceeds this limit,
+    // the token text will be truncated to the given maximum length, and
+    // TOKEN_TOO_LONG diagnostic will be generated.
+    // The maximum length defaults to 256.
+    void setMaxTokenLength(size_t maxLength);
+
+    void lex(Token* token);
+
+  private:
+    PP_DISALLOW_COPY_AND_ASSIGN(Preprocessor);
+
+    PreprocessorImpl* mImpl;
+};
+
+}  // namespace pp
+#endif  // COMPILER_PREPROCESSOR_PREPROCESSOR_H_
+
diff --git a/src/compiler/preprocessor/Tokenizer.h b/src/compiler/preprocessor/Tokenizer.h
index 3522a3d..9d131f8 100644
--- a/src/compiler/preprocessor/Tokenizer.h
+++ b/src/compiler/preprocessor/Tokenizer.h
@@ -1,59 +1,59 @@
-//

-// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-#ifndef COMPILER_PREPROCESSOR_TOKENIZER_H_

-#define COMPILER_PREPROCESSOR_TOKENIZER_H_

-

-#include "Input.h"

-#include "Lexer.h"

-#include "pp_utils.h"

-

-namespace pp

-{

-

-class Diagnostics;

-

-class Tokenizer : public Lexer

-{

-  public:

-    struct Context

-    {

-        Diagnostics* diagnostics;

-

-        Input input;

-        // The location where yytext points to. Token location should track

-        // scanLoc instead of Input::mReadLoc because they may not be the same

-        // if text is buffered up in the scanner input buffer.

-        Input::Location scanLoc;

-

-        bool leadingSpace;

-        bool lineStart;

-    };

-

-    Tokenizer(Diagnostics* diagnostics);

-    ~Tokenizer();

-

-    bool init(size_t count, const char* const string[], const int length[]);

-

-    void setMaxTokenLength(size_t maxLength) { mMaxTokenLength = maxLength; }

-    void setFileNumber(int file);

-    void setLineNumber(int line);

-

-    virtual void lex(Token* token);

-

-  private:

-    PP_DISALLOW_COPY_AND_ASSIGN(Tokenizer);

-    bool initScanner();

-    void destroyScanner();

-

-    void* mHandle;  // Scanner handle.

-    Context mContext;  // Scanner extra.

-    size_t mMaxTokenLength;

-};

-

-}  // namespace pp

-#endif  // COMPILER_PREPROCESSOR_TOKENIZER_H_

-

+//
+// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef COMPILER_PREPROCESSOR_TOKENIZER_H_
+#define COMPILER_PREPROCESSOR_TOKENIZER_H_
+
+#include "Input.h"
+#include "Lexer.h"
+#include "pp_utils.h"
+
+namespace pp
+{
+
+class Diagnostics;
+
+class Tokenizer : public Lexer
+{
+  public:
+    struct Context
+    {
+        Diagnostics* diagnostics;
+
+        Input input;
+        // The location where yytext points to. Token location should track
+        // scanLoc instead of Input::mReadLoc because they may not be the same
+        // if text is buffered up in the scanner input buffer.
+        Input::Location scanLoc;
+
+        bool leadingSpace;
+        bool lineStart;
+    };
+
+    Tokenizer(Diagnostics* diagnostics);
+    ~Tokenizer();
+
+    bool init(size_t count, const char* const string[], const int length[]);
+
+    void setMaxTokenLength(size_t maxLength) { mMaxTokenLength = maxLength; }
+    void setFileNumber(int file);
+    void setLineNumber(int line);
+
+    virtual void lex(Token* token);
+
+  private:
+    PP_DISALLOW_COPY_AND_ASSIGN(Tokenizer);
+    bool initScanner();
+    void destroyScanner();
+
+    void* mHandle;  // Scanner handle.
+    Context mContext;  // Scanner extra.
+    size_t mMaxTokenLength;
+};
+
+}  // namespace pp
+#endif  // COMPILER_PREPROCESSOR_TOKENIZER_H_
+
diff --git a/src/compiler/preprocessor/Tokenizer.l b/src/compiler/preprocessor/Tokenizer.l
index 4254799..01f0177 100644
--- a/src/compiler/preprocessor/Tokenizer.l
+++ b/src/compiler/preprocessor/Tokenizer.l
@@ -1,340 +1,340 @@
-/*

-//

-// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-This file contains the Lex specification for GLSL ES preprocessor.

-Based on Microsoft Visual Studio 2010 Preprocessor Grammar:

-http://msdn.microsoft.com/en-us/library/2scxys89.aspx

-

-IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh.

-*/

-

-%top{

-//

-// Copyright (c) 2011-2013 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-// This file is auto-generated by generate_parser.sh. DO NOT EDIT!

-}

-

-%{

-#include "Tokenizer.h"

-

-#include "DiagnosticsBase.h"

-#include "Token.h"

-

-#if defined(__GNUC__)

-// Triggered by the auto-generated yy_fatal_error function.

-#pragma GCC diagnostic ignored "-Wmissing-noreturn"

-#endif

-

-typedef std::string YYSTYPE;

-typedef pp::SourceLocation YYLTYPE;

-

-// Use the unused yycolumn variable to track file (string) number.

-#define yyfileno yycolumn

-

-#define YY_USER_INIT                   \

-    do {                               \

-        yyfileno = 0;                  \

-        yylineno = 1;                  \

-        yyextra->leadingSpace = false; \

-        yyextra->lineStart = true;     \

-    } while(0);

-

-#define YY_USER_ACTION                                              \

-    do                                                              \

-    {                                                               \

-        pp::Input* input = &yyextra->input;                         \

-        pp::Input::Location* scanLoc = &yyextra->scanLoc;           \

-        while ((scanLoc->sIndex < input->count()) &&                \

-               (scanLoc->cIndex >= input->length(scanLoc->sIndex))) \

-        {                                                           \

-            scanLoc->cIndex -= input->length(scanLoc->sIndex++);    \

-            ++yyfileno; yylineno = 1;                               \

-        }                                                           \

-        yylloc->file = yyfileno;                                    \

-        yylloc->line = yylineno;                                    \

-        scanLoc->cIndex += yyleng;                                  \

-    } while(0);

-

-#define YY_INPUT(buf, result, maxSize) \

-    result = yyextra->input.read(buf, maxSize);

-

-%}

-

-%option noyywrap nounput never-interactive

-%option reentrant bison-bridge bison-locations

-%option prefix="pp"

-%option extra-type="pp::Tokenizer::Context*"

-%x COMMENT

-

-NEWLINE     \n|\r|\r\n

-IDENTIFIER  [_a-zA-Z][_a-zA-Z0-9]*

-PUNCTUATOR  [][<>(){}.+-/*%^|&~=!:;,?]

-

-DECIMAL_CONSTANT      [1-9][0-9]*

-OCTAL_CONSTANT        0[0-7]*

-HEXADECIMAL_CONSTANT  0[xX][0-9a-fA-F]+

-

-DIGIT                [0-9]

-EXPONENT_PART        [eE][+-]?{DIGIT}+

-FRACTIONAL_CONSTANT  ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")

-

-%%

-

-    /* Line comment */

-"//"[^\r\n]*

-

-    /* Block comment */

-    /* Line breaks are just counted - not returned. */

-    /* The comment is replaced by a single space. */ 

-"/*" { BEGIN(COMMENT); }

-<COMMENT>[^*\r\n]+

-<COMMENT>"*"

-<COMMENT>{NEWLINE} { ++yylineno; }

-<COMMENT>"*/" {

-    yyextra->leadingSpace = true;

-    BEGIN(INITIAL);

-}

-

-# {

-    // # is only valid at start of line for preprocessor directives.

-    yylval->assign(1, yytext[0]);

-    return yyextra->lineStart ? pp::Token::PP_HASH : pp::Token::PP_OTHER;

-}

-

-{IDENTIFIER} {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::IDENTIFIER;

-}

-

-{DECIMAL_CONSTANT}|{OCTAL_CONSTANT}|{HEXADECIMAL_CONSTANT} {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::CONST_INT;

-}

-

-({DIGIT}+{EXPONENT_PART})|({FRACTIONAL_CONSTANT}{EXPONENT_PART}?) {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::CONST_FLOAT;

-}

-

-    /* Anything that starts with a {DIGIT} or .{DIGIT} must be a number. */

-    /* Rule to catch all invalid integers and floats. */

-({DIGIT}+[_a-zA-Z0-9.]*)|("."{DIGIT}+[_a-zA-Z0-9.]*) {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::PP_NUMBER;

-}

-

-"++" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_INC;

-}

-"--" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_DEC;

-}

-"<<" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_LEFT;

-}

-">>" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_RIGHT;

-}

-"<=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_LE;

-}

-">=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_GE;

-}

-"==" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_EQ;

-}

-"!=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_NE;

-}

-"&&" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_AND;

-}

-"^^" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_XOR;

-}

-"||" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_OR;

-}

-"+=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_ADD_ASSIGN;

-}

-"-=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_SUB_ASSIGN;

-}

-"*=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_MUL_ASSIGN;

-}

-"/=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_DIV_ASSIGN;

-}

-"%=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_MOD_ASSIGN;

-}

-"<<=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_LEFT_ASSIGN;

-}

-">>=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_RIGHT_ASSIGN;

-}

-"&=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_AND_ASSIGN;

-}

-"^=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_XOR_ASSIGN;

-}

-"|=" {

-    yylval->assign(yytext, yyleng);

-    return pp::Token::OP_OR_ASSIGN;

-}

-

-{PUNCTUATOR} {

-    yylval->assign(1, yytext[0]);

-    return yytext[0];

-}

-

-[ \t\v\f]+   { yyextra->leadingSpace = true; }

-

-{NEWLINE} {

-    ++yylineno;

-    yylval->assign(1, '\n');

-    return '\n';

-}

-

-\\{NEWLINE} { ++yylineno; }

-

-. {

-    yylval->assign(1, yytext[0]);

-    return pp::Token::PP_OTHER;

-}

-

-<*><<EOF>> {

-    // YY_USER_ACTION is not invoked for handling EOF.

-    // Set the location for EOF token manually.

-    pp::Input* input = &yyextra->input;

-    pp::Input::Location* scanLoc = &yyextra->scanLoc;

-    yy_size_t sIndexMax = input->count() ? input->count() - 1 : 0;

-    if (scanLoc->sIndex != sIndexMax)

-    {

-        // We can only reach here if there are empty strings at the

-        // end of the input.

-        scanLoc->sIndex = sIndexMax; scanLoc->cIndex = 0;

-        // FIXME: this is not 64-bit clean.

-        yyfileno = static_cast<int>(sIndexMax); yylineno = 1;

-    }

-    yylloc->file = yyfileno;

-    yylloc->line = yylineno;

-    yylval->clear();

-

-    if (YY_START == COMMENT)

-    {

-        yyextra->diagnostics->report(pp::Diagnostics::EOF_IN_COMMENT,

-                                     pp::SourceLocation(yyfileno, yylineno),

-                                     "");

-    }

-    yyterminate();

-}

-

-%%

-

-namespace pp {

-

-Tokenizer::Tokenizer(Diagnostics* diagnostics)

-    : mHandle(0),

-      mMaxTokenLength(256)

-{

-    mContext.diagnostics = diagnostics;

-}

-

-Tokenizer::~Tokenizer()

-{

-    destroyScanner();

-}

-

-bool Tokenizer::init(size_t count, const char* const string[], const int length[])

-{

-    if ((count > 0) && (string == 0)) return false;

-

-    mContext.input = Input(count, string, length);

-    return initScanner();

-}

-

-void Tokenizer::setFileNumber(int file)

-{

-    // We use column number as file number.

-    // See macro yyfileno.

-    yyset_column(file, mHandle);

-}

-

-void Tokenizer::setLineNumber(int line)

-{

-    yyset_lineno(line, mHandle);

-}

-

-void Tokenizer::lex(Token* token)

-{

-    token->type = yylex(&token->text, &token->location, mHandle);

-    if (token->text.size() > mMaxTokenLength)

-    {

-        mContext.diagnostics->report(Diagnostics::TOKEN_TOO_LONG,

-                                     token->location, token->text);

-        token->text.erase(mMaxTokenLength);

-    }

-

-    token->flags = 0;

-

-    token->setAtStartOfLine(mContext.lineStart);

-    mContext.lineStart = token->type == '\n';

-

-    token->setHasLeadingSpace(mContext.leadingSpace);

-    mContext.leadingSpace = false;

-}

-

-bool Tokenizer::initScanner()

-{

-    if ((mHandle == NULL) && yylex_init_extra(&mContext, &mHandle))

-        return false;

-

-    yyrestart(0, mHandle);

-    return true;

-}

-

-void Tokenizer::destroyScanner()

-{

-    if (mHandle == NULL)

-        return;

-

-    yylex_destroy(mHandle);

-    mHandle = NULL;

-}

-

-}  // namespace pp

-

+/*
+//
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+This file contains the Lex specification for GLSL ES preprocessor.
+Based on Microsoft Visual Studio 2010 Preprocessor Grammar:
+http://msdn.microsoft.com/en-us/library/2scxys89.aspx
+
+IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh.
+*/
+
+%top{
+//
+// Copyright (c) 2011-2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
+}
+
+%{
+#include "Tokenizer.h"
+
+#include "DiagnosticsBase.h"
+#include "Token.h"
+
+#if defined(__GNUC__)
+// Triggered by the auto-generated yy_fatal_error function.
+#pragma GCC diagnostic ignored "-Wmissing-noreturn"
+#endif
+
+typedef std::string YYSTYPE;
+typedef pp::SourceLocation YYLTYPE;
+
+// Use the unused yycolumn variable to track file (string) number.
+#define yyfileno yycolumn
+
+#define YY_USER_INIT                   \
+    do {                               \
+        yyfileno = 0;                  \
+        yylineno = 1;                  \
+        yyextra->leadingSpace = false; \
+        yyextra->lineStart = true;     \
+    } while(0);
+
+#define YY_USER_ACTION                                              \
+    do                                                              \
+    {                                                               \
+        pp::Input* input = &yyextra->input;                         \
+        pp::Input::Location* scanLoc = &yyextra->scanLoc;           \
+        while ((scanLoc->sIndex < input->count()) &&                \
+               (scanLoc->cIndex >= input->length(scanLoc->sIndex))) \
+        {                                                           \
+            scanLoc->cIndex -= input->length(scanLoc->sIndex++);    \
+            ++yyfileno; yylineno = 1;                               \
+        }                                                           \
+        yylloc->file = yyfileno;                                    \
+        yylloc->line = yylineno;                                    \
+        scanLoc->cIndex += yyleng;                                  \
+    } while(0);
+
+#define YY_INPUT(buf, result, maxSize) \
+    result = yyextra->input.read(buf, maxSize);
+
+%}
+
+%option noyywrap nounput never-interactive
+%option reentrant bison-bridge bison-locations
+%option prefix="pp"
+%option extra-type="pp::Tokenizer::Context*"
+%x COMMENT
+
+NEWLINE     \n|\r|\r\n
+IDENTIFIER  [_a-zA-Z][_a-zA-Z0-9]*
+PUNCTUATOR  [][<>(){}.+-/*%^|&~=!:;,?]
+
+DECIMAL_CONSTANT      [1-9][0-9]*
+OCTAL_CONSTANT        0[0-7]*
+HEXADECIMAL_CONSTANT  0[xX][0-9a-fA-F]+
+
+DIGIT                [0-9]
+EXPONENT_PART        [eE][+-]?{DIGIT}+
+FRACTIONAL_CONSTANT  ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
+
+%%
+
+    /* Line comment */
+"//"[^\r\n]*
+
+    /* Block comment */
+    /* Line breaks are just counted - not returned. */
+    /* The comment is replaced by a single space. */ 
+"/*" { BEGIN(COMMENT); }
+<COMMENT>[^*\r\n]+
+<COMMENT>"*"
+<COMMENT>{NEWLINE} { ++yylineno; }
+<COMMENT>"*/" {
+    yyextra->leadingSpace = true;
+    BEGIN(INITIAL);
+}
+
+# {
+    // # is only valid at start of line for preprocessor directives.
+    yylval->assign(1, yytext[0]);
+    return yyextra->lineStart ? pp::Token::PP_HASH : pp::Token::PP_OTHER;
+}
+
+{IDENTIFIER} {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::IDENTIFIER;
+}
+
+{DECIMAL_CONSTANT}|{OCTAL_CONSTANT}|{HEXADECIMAL_CONSTANT} {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::CONST_INT;
+}
+
+({DIGIT}+{EXPONENT_PART})|({FRACTIONAL_CONSTANT}{EXPONENT_PART}?) {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::CONST_FLOAT;
+}
+
+    /* Anything that starts with a {DIGIT} or .{DIGIT} must be a number. */
+    /* Rule to catch all invalid integers and floats. */
+({DIGIT}+[_a-zA-Z0-9.]*)|("."{DIGIT}+[_a-zA-Z0-9.]*) {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::PP_NUMBER;
+}
+
+"++" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_INC;
+}
+"--" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_DEC;
+}
+"<<" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_LEFT;
+}
+">>" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_RIGHT;
+}
+"<=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_LE;
+}
+">=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_GE;
+}
+"==" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_EQ;
+}
+"!=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_NE;
+}
+"&&" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_AND;
+}
+"^^" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_XOR;
+}
+"||" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_OR;
+}
+"+=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_ADD_ASSIGN;
+}
+"-=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_SUB_ASSIGN;
+}
+"*=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_MUL_ASSIGN;
+}
+"/=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_DIV_ASSIGN;
+}
+"%=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_MOD_ASSIGN;
+}
+"<<=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_LEFT_ASSIGN;
+}
+">>=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_RIGHT_ASSIGN;
+}
+"&=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_AND_ASSIGN;
+}
+"^=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_XOR_ASSIGN;
+}
+"|=" {
+    yylval->assign(yytext, yyleng);
+    return pp::Token::OP_OR_ASSIGN;
+}
+
+{PUNCTUATOR} {
+    yylval->assign(1, yytext[0]);
+    return yytext[0];
+}
+
+[ \t\v\f]+   { yyextra->leadingSpace = true; }
+
+{NEWLINE} {
+    ++yylineno;
+    yylval->assign(1, '\n');
+    return '\n';
+}
+
+\\{NEWLINE} { ++yylineno; }
+
+. {
+    yylval->assign(1, yytext[0]);
+    return pp::Token::PP_OTHER;
+}
+
+<*><<EOF>> {
+    // YY_USER_ACTION is not invoked for handling EOF.
+    // Set the location for EOF token manually.
+    pp::Input* input = &yyextra->input;
+    pp::Input::Location* scanLoc = &yyextra->scanLoc;
+    yy_size_t sIndexMax = input->count() ? input->count() - 1 : 0;
+    if (scanLoc->sIndex != sIndexMax)
+    {
+        // We can only reach here if there are empty strings at the
+        // end of the input.
+        scanLoc->sIndex = sIndexMax; scanLoc->cIndex = 0;
+        // FIXME: this is not 64-bit clean.
+        yyfileno = static_cast<int>(sIndexMax); yylineno = 1;
+    }
+    yylloc->file = yyfileno;
+    yylloc->line = yylineno;
+    yylval->clear();
+
+    if (YY_START == COMMENT)
+    {
+        yyextra->diagnostics->report(pp::Diagnostics::EOF_IN_COMMENT,
+                                     pp::SourceLocation(yyfileno, yylineno),
+                                     "");
+    }
+    yyterminate();
+}
+
+%%
+
+namespace pp {
+
+Tokenizer::Tokenizer(Diagnostics* diagnostics)
+    : mHandle(0),
+      mMaxTokenLength(256)
+{
+    mContext.diagnostics = diagnostics;
+}
+
+Tokenizer::~Tokenizer()
+{
+    destroyScanner();
+}
+
+bool Tokenizer::init(size_t count, const char* const string[], const int length[])
+{
+    if ((count > 0) && (string == 0)) return false;
+
+    mContext.input = Input(count, string, length);
+    return initScanner();
+}
+
+void Tokenizer::setFileNumber(int file)
+{
+    // We use column number as file number.
+    // See macro yyfileno.
+    yyset_column(file, mHandle);
+}
+
+void Tokenizer::setLineNumber(int line)
+{
+    yyset_lineno(line, mHandle);
+}
+
+void Tokenizer::lex(Token* token)
+{
+    token->type = yylex(&token->text, &token->location, mHandle);
+    if (token->text.size() > mMaxTokenLength)
+    {
+        mContext.diagnostics->report(Diagnostics::TOKEN_TOO_LONG,
+                                     token->location, token->text);
+        token->text.erase(mMaxTokenLength);
+    }
+
+    token->flags = 0;
+
+    token->setAtStartOfLine(mContext.lineStart);
+    mContext.lineStart = token->type == '\n';
+
+    token->setHasLeadingSpace(mContext.leadingSpace);
+    mContext.leadingSpace = false;
+}
+
+bool Tokenizer::initScanner()
+{
+    if ((mHandle == NULL) && yylex_init_extra(&mContext, &mHandle))
+        return false;
+
+    yyrestart(0, mHandle);
+    return true;
+}
+
+void Tokenizer::destroyScanner()
+{
+    if (mHandle == NULL)
+        return;
+
+    yylex_destroy(mHandle);
+    mHandle = NULL;
+}
+
+}  // namespace pp
+
diff --git a/src/compiler/preprocessor/preprocessor.vcxproj b/src/compiler/preprocessor/preprocessor.vcxproj
index ca8530b..14f701b 100644
--- a/src/compiler/preprocessor/preprocessor.vcxproj
+++ b/src/compiler/preprocessor/preprocessor.vcxproj
@@ -1,172 +1,172 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Debug|x64">

-      <Configuration>Debug</Configuration>

-      <Platform>x64</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|x64">

-      <Configuration>Release</Configuration>

-      <Platform>x64</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}</ProjectGuid>

-    <RootNamespace>preprocessor</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>StaticLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>StaticLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">

-    <ConfigurationType>StaticLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">

-    <ConfigurationType>StaticLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-    </ClCompile>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

-    <Midl>

-      <TargetEnvironment>X64</TargetEnvironment>

-    </Midl>

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-    </ClCompile>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <Optimization>MaxSpeed</Optimization>

-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-    </ClCompile>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

-    <Midl>

-      <TargetEnvironment>X64</TargetEnvironment>

-    </Midl>

-    <ClCompile>

-      <Optimization>MaxSpeed</Optimization>

-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-    </ClCompile>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="DiagnosticsBase.cpp" />

-    <ClCompile Include="DirectiveHandlerBase.cpp" />

-    <ClCompile Include="DirectiveParser.cpp" />

-    <ClCompile Include="ExpressionParser.cpp" />

-    <ClCompile Include="Input.cpp" />

-    <ClCompile Include="Lexer.cpp" />

-    <ClCompile Include="Macro.cpp" />

-    <ClCompile Include="MacroExpander.cpp" />

-    <ClCompile Include="Preprocessor.cpp" />

-    <ClCompile Include="Token.cpp" />

-    <ClCompile Include="Tokenizer.cpp" />

-  </ItemGroup>

-  <ItemGroup>

-    <ClInclude Include="length_limits.h" />

-    <ClInclude Include="DiagnosticsBase.h" />

-    <ClInclude Include="DirectiveHandlerBase.h" />

-    <ClInclude Include="DirectiveParser.h" />

-    <ClInclude Include="ExpressionParser.h" />

-    <ClInclude Include="Input.h" />

-    <ClInclude Include="Lexer.h" />

-    <ClInclude Include="Macro.h" />

-    <ClInclude Include="MacroExpander.h" />

-    <ClInclude Include="numeric_lex.h" />

-    <ClInclude Include="pp_utils.h" />

-    <ClInclude Include="Preprocessor.h" />

-    <ClInclude Include="SourceLocation.h" />

-    <ClInclude Include="Token.h" />

-    <ClInclude Include="Tokenizer.h" />

-  </ItemGroup>

-  <ItemGroup>

-    <None Include="Tokenizer.l" />

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}</ProjectGuid>
+    <RootNamespace>preprocessor</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="DiagnosticsBase.cpp" />
+    <ClCompile Include="DirectiveHandlerBase.cpp" />
+    <ClCompile Include="DirectiveParser.cpp" />
+    <ClCompile Include="ExpressionParser.cpp" />
+    <ClCompile Include="Input.cpp" />
+    <ClCompile Include="Lexer.cpp" />
+    <ClCompile Include="Macro.cpp" />
+    <ClCompile Include="MacroExpander.cpp" />
+    <ClCompile Include="Preprocessor.cpp" />
+    <ClCompile Include="Token.cpp" />
+    <ClCompile Include="Tokenizer.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="length_limits.h" />
+    <ClInclude Include="DiagnosticsBase.h" />
+    <ClInclude Include="DirectiveHandlerBase.h" />
+    <ClInclude Include="DirectiveParser.h" />
+    <ClInclude Include="ExpressionParser.h" />
+    <ClInclude Include="Input.h" />
+    <ClInclude Include="Lexer.h" />
+    <ClInclude Include="Macro.h" />
+    <ClInclude Include="MacroExpander.h" />
+    <ClInclude Include="numeric_lex.h" />
+    <ClInclude Include="pp_utils.h" />
+    <ClInclude Include="Preprocessor.h" />
+    <ClInclude Include="SourceLocation.h" />
+    <ClInclude Include="Token.h" />
+    <ClInclude Include="Tokenizer.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Tokenizer.l" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/src/compiler/preprocessor/preprocessor.vcxproj.filters b/src/compiler/preprocessor/preprocessor.vcxproj.filters
index 4ac202f..8c8da86 100644
--- a/src/compiler/preprocessor/preprocessor.vcxproj.filters
+++ b/src/compiler/preprocessor/preprocessor.vcxproj.filters
@@ -1,100 +1,100 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup>

-    <Filter Include="Source Files">

-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>

-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>

-    </Filter>

-    <Filter Include="Header Files">

-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>

-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>

-    </Filter>

-  </ItemGroup>

-  <ItemGroup>

-    <ClCompile Include="DirectiveParser.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="ExpressionParser.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="Input.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="Lexer.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="Macro.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="MacroExpander.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="Preprocessor.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="Token.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="Tokenizer.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="DiagnosticsBase.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="DirectiveHandlerBase.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-  </ItemGroup>

-  <ItemGroup>

-    <ClInclude Include="DirectiveParser.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="ExpressionParser.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="Input.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="Lexer.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="Macro.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="MacroExpander.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="numeric_lex.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="pp_utils.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="Preprocessor.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="SourceLocation.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="Token.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="Tokenizer.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="length_limits.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="DiagnosticsBase.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="DirectiveHandlerBase.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-  </ItemGroup>

-  <ItemGroup>

-    <None Include="Tokenizer.l">

-      <Filter>Source Files</Filter>

-    </None>

-  </ItemGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="DirectiveParser.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="ExpressionParser.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Input.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Lexer.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Macro.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="MacroExpander.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Preprocessor.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Token.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Tokenizer.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="DiagnosticsBase.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="DirectiveHandlerBase.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="DirectiveParser.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="ExpressionParser.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Input.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Lexer.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Macro.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="MacroExpander.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="numeric_lex.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="pp_utils.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Preprocessor.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="SourceLocation.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Token.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Tokenizer.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="length_limits.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="DiagnosticsBase.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="DirectiveHandlerBase.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Tokenizer.l">
+      <Filter>Source Files</Filter>
+    </None>
+  </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/src/libEGL/libEGL.vcxproj b/src/libEGL/libEGL.vcxproj
index 631a4c6..2406d12 100644
--- a/src/libEGL/libEGL.vcxproj
+++ b/src/libEGL/libEGL.vcxproj
@@ -1,258 +1,258 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Debug|x64">

-      <Configuration>Debug</Configuration>

-      <Platform>x64</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|x64">

-      <Configuration>Release</Configuration>

-      <Platform>x64</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}</ProjectGuid>

-    <RootNamespace>libEGL</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>

-    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>

-    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\lib\x86;$(LibraryPath)</LibraryPath>

-    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath>

-    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath>

-    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;</IncludePath>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>

-      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Windows</SubSystem>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-    <PostBuildEvent>

-      <Command>%40echo on

-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"

-copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"

-copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"

-%40echo off

-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <Optimization>MaxSpeed</Optimization>

-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>

-      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Windows</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-    <PostBuildEvent>

-      <Command>%40echo on

-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"

-copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"

-copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"

-%40echo off

-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

-    <Midl>

-      <TargetEnvironment>X64</TargetEnvironment>

-    </Midl>

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <TreatWarningAsError>true</TreatWarningAsError>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>

-      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Windows</SubSystem>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX64</TargetMachine>

-    </Link>

-    <PostBuildEvent>

-      <Command>%40echo on

-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"

-copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"

-copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"

-%40echo off

-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

-    <Midl>

-      <TargetEnvironment>X64</TargetEnvironment>

-    </Midl>

-    <ClCompile>

-      <Optimization>MaxSpeed</Optimization>

-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>

-      </PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <TreatWarningAsError>true</TreatWarningAsError>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>

-      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Windows</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX64</TargetMachine>

-    </Link>

-    <PostBuildEvent>

-      <Command>%40echo on

-mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"

-copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"

-copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"

-%40echo off

-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="Config.cpp" />

-    <ClCompile Include="..\Common\debug.cpp" />

-    <ClCompile Include="Display.cpp" />

-    <ClCompile Include="libEGL.cpp" />

-    <ClCompile Include="main.cpp" />

-    <ClCompile Include="Surface.cpp" />

-  </ItemGroup>

-  <ItemGroup>

-    <ClInclude Include="Config.h" />

-    <ClInclude Include="Display.h" />

-    <ClInclude Include="..\..\include\EGL\egl.h" />

-    <ClInclude Include="..\..\include\EGL\eglext.h" />

-    <ClInclude Include="..\..\include\EGL\eglplatform.h" />

-    <ClInclude Include="main.h" />

-    <ClInclude Include="resource.h" />

-    <ClInclude Include="Surface.h" />

-    <ClInclude Include="..\common\version.h" />

-  </ItemGroup>

-  <ItemGroup>

-    <None Include="libEGL.def" />

-  </ItemGroup>

-  <ItemGroup>

-    <ResourceCompile Include="libEGL.rc" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\libGLESv2\libGLESv2.vcxproj">

-      <Project>{b5871a7a-968c-42e3-a33b-981e6f448e78}</Project>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}</ProjectGuid>
+    <RootNamespace>libEGL</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath>
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;</IncludePath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
+      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <PostBuildEvent>
+      <Command>%40echo on
+mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
+copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
+copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
+%40echo off
+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
+      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <PostBuildEvent>
+      <Command>%40echo on
+mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
+copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
+copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
+%40echo off
+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <TreatWarningAsError>true</TreatWarningAsError>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
+      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+    <PostBuildEvent>
+      <Command>%40echo on
+mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
+copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
+copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
+%40echo off
+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBEGL_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <TreatWarningAsError>true</TreatWarningAsError>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <ModuleDefinitionFile>libEGL.def</ModuleDefinitionFile>
+      <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+    <PostBuildEvent>
+      <Command>%40echo on
+mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
+copy "$(OutDir)libEGL.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
+copy "$(OutDir)libEGL.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
+%40echo off
+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="Config.cpp" />
+    <ClCompile Include="..\Common\debug.cpp" />
+    <ClCompile Include="Display.cpp" />
+    <ClCompile Include="libEGL.cpp" />
+    <ClCompile Include="main.cpp" />
+    <ClCompile Include="Surface.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="Config.h" />
+    <ClInclude Include="Display.h" />
+    <ClInclude Include="..\..\include\EGL\egl.h" />
+    <ClInclude Include="..\..\include\EGL\eglext.h" />
+    <ClInclude Include="..\..\include\EGL\eglplatform.h" />
+    <ClInclude Include="main.h" />
+    <ClInclude Include="resource.h" />
+    <ClInclude Include="Surface.h" />
+    <ClInclude Include="..\common\version.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="libEGL.def" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="libEGL.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\libGLESv2\libGLESv2.vcxproj">
+      <Project>{b5871a7a-968c-42e3-a33b-981e6f448e78}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/src/libEGL/libEGL.vcxproj.filters b/src/libEGL/libEGL.vcxproj.filters
index 860e169..e78b94f 100644
--- a/src/libEGL/libEGL.vcxproj.filters
+++ b/src/libEGL/libEGL.vcxproj.filters
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup>

-    <Filter Include="Source Files">

-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>

-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>

-    </Filter>

-    <Filter Include="Header Files">

-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>

-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>

-    </Filter>

-  </ItemGroup>

-  <ItemGroup>

-    <ClCompile Include="Config.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="..\Common\debug.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="Display.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="libEGL.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="main.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-    <ClCompile Include="Surface.cpp">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-  </ItemGroup>

-  <ItemGroup>

-    <ClInclude Include="Config.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="Display.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="..\..\include\EGL\egl.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="..\..\include\EGL\eglext.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="..\..\include\EGL\eglplatform.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="main.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="resource.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="Surface.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-    <ClInclude Include="..\common\version.h">

-      <Filter>Header Files</Filter>

-    </ClInclude>

-  </ItemGroup>

-  <ItemGroup>

-    <ResourceCompile Include="libEGL.rc" />

-  </ItemGroup>

-  <ItemGroup>

-    <None Include="libEGL.def" />

-  </ItemGroup>

+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="Config.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Common\debug.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Display.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="libEGL.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="main.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Surface.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="Config.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Display.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\include\EGL\egl.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\include\EGL\eglext.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\include\EGL\eglplatform.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="main.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="resource.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Surface.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\common\version.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="libEGL.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="libEGL.def" />
+  </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/src/libGLESv2/Uniform.cpp b/src/libGLESv2/Uniform.cpp
index 0fe3b8c..5424e27 100644
--- a/src/libGLESv2/Uniform.cpp
+++ b/src/libGLESv2/Uniform.cpp
@@ -1,43 +1,43 @@
 #include "precompiled.h"
-//

-// Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-#include "libGLESv2/Uniform.h"

-

-#include "libGLESv2/utilities.h"

-

-namespace gl

-{

-

-Uniform::Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize)

-    : type(type), precision(precision), name(name), arraySize(arraySize)

-{

-    int bytes = gl::UniformInternalSize(type) * elementCount();

-    data = new unsigned char[bytes];

-    memset(data, 0, bytes);

-    dirty = true;

-

-    psRegisterIndex = -1;

-    vsRegisterIndex = -1;

-    registerCount = VariableRowCount(type) * elementCount();

-}

-

-Uniform::~Uniform()

-{

-    delete[] data;

-}

-

-bool Uniform::isArray() const

-{

-    return arraySize > 0;

-}

-

-unsigned int Uniform::elementCount() const

-{

-    return arraySize > 0 ? arraySize : 1;

-}

-

-}

+//
+// Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "libGLESv2/Uniform.h"
+
+#include "libGLESv2/utilities.h"
+
+namespace gl
+{
+
+Uniform::Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize)
+    : type(type), precision(precision), name(name), arraySize(arraySize)
+{
+    int bytes = gl::UniformInternalSize(type) * elementCount();
+    data = new unsigned char[bytes];
+    memset(data, 0, bytes);
+    dirty = true;
+
+    psRegisterIndex = -1;
+    vsRegisterIndex = -1;
+    registerCount = VariableRowCount(type) * elementCount();
+}
+
+Uniform::~Uniform()
+{
+    delete[] data;
+}
+
+bool Uniform::isArray() const
+{
+    return arraySize > 0;
+}
+
+unsigned int Uniform::elementCount() const
+{
+    return arraySize > 0 ? arraySize : 1;
+}
+
+}
diff --git a/src/libGLESv2/Uniform.h b/src/libGLESv2/Uniform.h
index 64414ac..8ab0fbe 100644
--- a/src/libGLESv2/Uniform.h
+++ b/src/libGLESv2/Uniform.h
@@ -1,48 +1,48 @@
-//

-// Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.

-// Use of this source code is governed by a BSD-style license that can be

-// found in the LICENSE file.

-//

-

-#ifndef LIBGLESV2_UNIFORM_H_

-#define LIBGLESV2_UNIFORM_H_

-

-#include <string>

-#include <vector>

-

-#define GL_APICALL

-#include <GLES2/gl2.h>

-

-#include "common/debug.h"

-

-namespace gl

-{

-

-// Helper struct representing a single shader uniform

-struct Uniform

-{

-    Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize);

-

-    ~Uniform();

-

-    bool isArray() const;

-    unsigned int elementCount() const;

-

-    const GLenum type;

-    const GLenum precision;

-    const std::string name;

-    const unsigned int arraySize;

-

-    unsigned char *data;

-    bool dirty;

-

-    int psRegisterIndex;

-    int vsRegisterIndex;

-    unsigned int registerCount;

-};

-

-typedef std::vector<Uniform*> UniformArray;

-

-}

-

-#endif   // LIBGLESV2_UNIFORM_H_

+//
+// Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef LIBGLESV2_UNIFORM_H_
+#define LIBGLESV2_UNIFORM_H_
+
+#include <string>
+#include <vector>
+
+#define GL_APICALL
+#include <GLES2/gl2.h>
+
+#include "common/debug.h"
+
+namespace gl
+{
+
+// Helper struct representing a single shader uniform
+struct Uniform
+{
+    Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize);
+
+    ~Uniform();
+
+    bool isArray() const;
+    unsigned int elementCount() const;
+
+    const GLenum type;
+    const GLenum precision;
+    const std::string name;
+    const unsigned int arraySize;
+
+    unsigned char *data;
+    bool dirty;
+
+    int psRegisterIndex;
+    int vsRegisterIndex;
+    unsigned int registerCount;
+};
+
+typedef std::vector<Uniform*> UniformArray;
+
+}
+
+#endif   // LIBGLESV2_UNIFORM_H_
diff --git a/src/libGLESv2/libGLESv2.vcxproj b/src/libGLESv2/libGLESv2.vcxproj
index 7d5b18b..ecb04cf 100644
--- a/src/libGLESv2/libGLESv2.vcxproj
+++ b/src/libGLESv2/libGLESv2.vcxproj
@@ -1,425 +1,425 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Debug|Win32">

-      <Configuration>Debug</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Debug|x64">

-      <Configuration>Debug</Configuration>

-      <Platform>x64</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|x64">

-      <Configuration>Release</Configuration>

-      <Platform>x64</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{B5871A7A-968C-42E3-A33B-981E6F448E78}</ProjectGuid>

-    <RootNamespace>libGLESv2</RootNamespace>

-    <Keyword>Win32Proj</Keyword>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-    <WholeProgramOptimization>true</WholeProgramOptimization>

-  </PropertyGroup>

-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-    <CharacterSet>Unicode</CharacterSet>

-  </PropertyGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

-  <ImportGroup Label="ExtensionSettings">

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">

-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />

-  </ImportGroup>

-  <PropertyGroup Label="UserMacros" />

-  <PropertyGroup>

-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>

-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>

-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>

-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>

-    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath)</IncludePath>

-    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath>

-    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath)</IncludePath>

-    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath>

-    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath>

-    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath)</IncludePath>

-    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath)</LibraryPath>

-    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>Use</PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-      <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>

-      <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Windows</SubSystem>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-    <PostBuildEvent>

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B5871A7A-968C-42E3-A33B-981E6F448E78}</ProjectGuid>
+    <RootNamespace>libGLESv2</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath)</IncludePath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath)</LibraryPath>
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath)</IncludePath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath)</LibraryPath>
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath>
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath)</IncludePath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath)</LibraryPath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
+      <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <PostBuildEvent>
       <Command>%40echo on
 mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
 copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
 copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
 %40echo off
-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <Optimization>MaxSpeed</Optimization>

-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>Use</PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-      <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>

-      <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>

-      <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Windows</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX86</TargetMachine>

-    </Link>

-    <PostBuildEvent>

+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
+      <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+    <PostBuildEvent>
       <Command>%40echo on
 mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
 copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
 copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
 %40echo off
-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

-    <Midl>

-      <TargetEnvironment>X64</TargetEnvironment>

-    </Midl>

-    <ClCompile>

-      <Optimization>Disabled</Optimization>

-      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <MinimalRebuild>true</MinimalRebuild>

-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>

-      <PrecompiledHeader>Use</PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>

-      <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Windows</SubSystem>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX64</TargetMachine>

-    </Link>

-    <PostBuildEvent>

+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
+      <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+    <PostBuildEvent>
       <Command>%40echo on
 mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
 copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
 copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
 %40echo off
-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

-    <Midl>

-      <TargetEnvironment>X64</TargetEnvironment>

-    </Midl>

-    <ClCompile>

-      <Optimization>MaxSpeed</Optimization>

-      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>

-      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

-      <PrecompiledHeader>Use</PrecompiledHeader>

-      <WarningLevel>Level4</WarningLevel>

-      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>

-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

-      <TreatWarningAsError>true</TreatWarningAsError>

-      <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>

-      <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>

-    </ClCompile>

-    <Link>

-      <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>

-      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>

-      <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>

-      <GenerateDebugInformation>true</GenerateDebugInformation>

-      <SubSystem>Windows</SubSystem>

-      <OptimizeReferences>true</OptimizeReferences>

-      <EnableCOMDATFolding>true</EnableCOMDATFolding>

-      <DataExecutionPrevention>

-      </DataExecutionPrevention>

-      <TargetMachine>MachineX64</TargetMachine>

-    </Link>

-    <PostBuildEvent>

+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <AdditionalIncludeDirectories>$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4718;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
+      <AdditionalOptions>$(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>d3d9.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+      <ModuleDefinitionFile>libGLESv2.def</ModuleDefinitionFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+    <PostBuildEvent>
       <Command>%40echo on
 mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
 copy "$(OutDir)libGLESv2.dll" "$(ProjectDir)..\..\lib\$(Configuration)\"
 copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
 %40echo off
-</Command>

-    </PostBuildEvent>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="..\third_party\murmurhash\MurmurHash3.cpp">

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>

-    </ClCompile>

-    <ClCompile Include="Buffer.cpp" />

-    <ClCompile Include="Context.cpp" />

-    <ClCompile Include="..\common\debug.cpp">

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>

-    </ClCompile>

-    <ClCompile Include="..\common\event_tracer.cpp">

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>

-    </ClCompile>

-    <ClCompile Include="Fence.cpp" />

-    <ClCompile Include="Float16ToFloat32.cpp" />

-    <ClCompile Include="Framebuffer.cpp" />

-    <ClCompile Include="HandleAllocator.cpp" />

-    <ClCompile Include="libGLESv2.cpp" />

-    <ClCompile Include="main.cpp" />

-    <ClCompile Include="precompiled.cpp">

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>

-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>

-    </ClCompile>

-    <ClCompile Include="Program.cpp" />

-    <ClCompile Include="ProgramBinary.cpp" />

-    <ClCompile Include="Query.cpp" />

-    <ClCompile Include="..\common\RefCountObject.cpp" />

-    <ClCompile Include="Renderbuffer.cpp" />

-    <ClCompile Include="renderer\Blit.cpp" />

-    <ClCompile Include="renderer\Fence11.cpp" />

-    <ClCompile Include="renderer\Fence9.cpp" />

-    <ClCompile Include="renderer\BufferStorage.cpp" />

-    <ClCompile Include="renderer\BufferStorage11.cpp" />

-    <ClCompile Include="renderer\BufferStorage9.cpp" />

-    <ClCompile Include="renderer\Image.cpp" />

-    <ClCompile Include="renderer\Image9.cpp" />

-    <ClCompile Include="renderer\IndexBuffer.cpp" />

-    <ClCompile Include="renderer\IndexBuffer11.cpp" />

-    <ClCompile Include="renderer\IndexBuffer9.cpp" />

-    <ClCompile Include="renderer\IndexDataManager.cpp" />

-    <ClCompile Include="renderer\ImageSSE2.cpp" />

-    <ClCompile Include="renderer\Image11.cpp" />

-    <ClCompile Include="renderer\IndexRangeCache.cpp" />

-    <ClCompile Include="renderer\InputLayoutCache.cpp" />

-    <ClCompile Include="renderer\Query11.cpp" />

-    <ClCompile Include="renderer\Query9.cpp" />

-    <ClCompile Include="renderer\Renderer.cpp" />

-    <ClCompile Include="renderer\Renderer11.cpp" />

-    <ClCompile Include="renderer\renderer11_utils.cpp" />

-    <ClCompile Include="renderer\Renderer9.cpp" />

-    <ClCompile Include="renderer\renderer9_utils.cpp" />

-    <ClCompile Include="renderer\RenderTarget11.cpp" />

-    <ClCompile Include="renderer\RenderTarget9.cpp" />

-    <ClCompile Include="renderer\RenderStateCache.cpp" />

-    <ClCompile Include="renderer\ShaderExecutable11.cpp" />

-    <ClCompile Include="renderer\ShaderExecutable9.cpp" />

-    <ClCompile Include="renderer\SwapChain11.cpp" />

-    <ClCompile Include="renderer\SwapChain9.cpp" />

-    <ClCompile Include="renderer\TextureStorage.cpp" />

-    <ClCompile Include="renderer\TextureStorage11.cpp" />

-    <ClCompile Include="renderer\TextureStorage9.cpp" />

-    <ClCompile Include="renderer\VertexBuffer.cpp" />

-    <ClCompile Include="renderer\VertexBuffer11.cpp" />

-    <ClCompile Include="renderer\VertexBuffer9.cpp" />

-    <ClCompile Include="renderer\VertexDataManager.cpp" />

-    <ClCompile Include="renderer\VertexDeclarationCache.cpp" />

-    <ClCompile Include="ResourceManager.cpp" />

-    <ClCompile Include="Shader.cpp" />

-    <ClCompile Include="Texture.cpp" />

-    <ClCompile Include="Uniform.cpp" />

-    <ClCompile Include="utilities.cpp" />

-  </ItemGroup>

-  <ItemGroup>

-    <ClInclude Include="..\common\debug.h" />

-    <ClInclude Include="..\common\event_tracer.h" />

-    <ClInclude Include="..\common\system.h" />

-    <ClInclude Include="..\third_party\murmurhash\MurmurHash3.h" />

-    <ClInclude Include="..\third_party\trace_event\trace_event.h" />

-    <ClInclude Include="angletypes.h" />

-    <ClInclude Include="BinaryStream.h" />

-    <ClInclude Include="Buffer.h" />

-    <ClInclude Include="constants.h" />

-    <ClInclude Include="Context.h" />

-    <ClInclude Include="Fence.h" />

-    <ClInclude Include="Framebuffer.h" />

-    <ClInclude Include="..\..\include\GLES2\gl2.h" />

-    <ClInclude Include="..\..\include\GLES2\gl2ext.h" />

-    <ClInclude Include="..\..\include\GLES2\gl2platform.h" />

-    <ClInclude Include="HandleAllocator.h" />

-    <ClInclude Include="main.h" />

-    <ClInclude Include="mathutil.h" />

-    <ClInclude Include="precompiled.h" />

-    <ClInclude Include="Program.h" />

-    <ClInclude Include="ProgramBinary.h" />

-    <ClInclude Include="Query.h" />

-    <ClInclude Include="..\common\RefCountObject.h" />

-    <ClInclude Include="Renderbuffer.h" />

-    <ClInclude Include="renderer\Blit.h" />

-    <ClInclude Include="renderer\Fence11.h" />

-    <ClInclude Include="renderer\Fence9.h" />

-    <ClInclude Include="renderer\FenceImpl.h" />

-    <ClInclude Include="renderer\BufferStorage.h" />

-    <ClInclude Include="renderer\BufferStorage11.h" />

-    <ClInclude Include="renderer\BufferStorage9.h" />

-    <ClInclude Include="renderer\generatemip.h" />

-    <ClInclude Include="renderer\Image.h" />

-    <ClInclude Include="renderer\Image11.h" />

-    <ClInclude Include="renderer\Image9.h" />

-    <ClInclude Include="renderer\IndexBuffer.h" />

-    <ClInclude Include="renderer\IndexBuffer11.h" />

-    <ClInclude Include="renderer\IndexBuffer9.h" />

-    <ClInclude Include="renderer\IndexDataManager.h" />

-    <ClInclude Include="renderer\IndexRangeCache.h" />

-    <ClInclude Include="renderer\InputLayoutCache.h" />

-    <ClInclude Include="renderer\Query11.h" />

-    <ClInclude Include="renderer\QueryImpl.h" />

-    <ClInclude Include="renderer\Query9.h" />

-    <ClInclude Include="renderer\Renderer.h" />

-    <ClInclude Include="renderer\Renderer11.h" />

-    <ClInclude Include="renderer\renderer11_utils.h" />

-    <ClInclude Include="renderer\Renderer9.h" />

-    <ClInclude Include="renderer\renderer9_utils.h" />

-    <ClInclude Include="renderer\RenderTarget.h" />

-    <ClInclude Include="renderer\RenderTarget11.h" />

-    <ClInclude Include="renderer\RenderTarget9.h" />

-    <ClInclude Include="renderer\RenderStateCache.h" />

-    <ClInclude Include="renderer\ShaderCache.h" />

-    <ClInclude Include="renderer\ShaderExecutable.h" />

-    <ClInclude Include="renderer\ShaderExecutable11.h" />

-    <ClInclude Include="renderer\ShaderExecutable9.h" />

-    <ClInclude Include="renderer\shaders\compiled\clear11vs.h" />

-    <ClInclude Include="renderer\shaders\compiled\clearmultiple11ps.h" />

-    <ClInclude Include="renderer\shaders\compiled\clearsingle11ps.h" />

-    <ClInclude Include="renderer\shaders\compiled\componentmaskps.h" />

-    <ClInclude Include="renderer\shaders\compiled\flipyvs.h" />

-    <ClInclude Include="renderer\shaders\compiled\luminanceps.h" />

-    <ClInclude Include="renderer\shaders\compiled\passthrough11vs.h" />

-    <ClInclude Include="renderer\shaders\compiled\passthroughlum11ps.h" />

-    <ClInclude Include="renderer\shaders\compiled\passthroughlumalpha11ps.h" />

-    <ClInclude Include="renderer\shaders\compiled\passthroughps.h" />

-    <ClInclude Include="renderer\shaders\compiled\passthroughrgb11ps.h" />

-    <ClInclude Include="renderer\shaders\compiled\passthroughrgba11ps.h" />

-    <ClInclude Include="renderer\shaders\compiled\standardvs.h" />

-    <ClInclude Include="renderer\SwapChain.h" />

-    <ClInclude Include="renderer\SwapChain11.h" />

-    <ClInclude Include="renderer\SwapChain9.h" />

-    <ClInclude Include="renderer\TextureStorage.h" />

-    <ClInclude Include="renderer\TextureStorage11.h" />

-    <ClInclude Include="renderer\TextureStorage9.h" />

-    <ClInclude Include="renderer\VertexBuffer.h" />

-    <ClInclude Include="renderer\VertexBuffer11.h" />

-    <ClInclude Include="renderer\VertexBuffer9.h" />

-    <ClInclude Include="renderer\vertexconversion.h" />

-    <ClInclude Include="renderer\VertexDataManager.h" />

-    <ClInclude Include="renderer\VertexDeclarationCache.h" />

-    <ClInclude Include="resource.h" />

-    <ClInclude Include="ResourceManager.h" />

-    <ClInclude Include="Shader.h" />

-    <ClInclude Include="Texture.h" />

-    <ClInclude Include="Uniform.h" />

-    <ClInclude Include="utilities.h" />

-    <ClInclude Include="..\common\version.h" />

-  </ItemGroup>

-  <ItemGroup>

-    <None Include="libGLESv2.def" />

-    <None Include="renderer\shaders\Blit.ps" />

-    <None Include="renderer\shaders\Blit.vs" />

-    <None Include="renderer\shaders\Clear11.hlsl" />

-    <None Include="renderer\shaders\generate_shaders.bat" />

-    <None Include="renderer\shaders\Passthrough11.hlsl" />

-  </ItemGroup>

-  <ItemGroup>

-    <ResourceCompile Include="libGLESv2.rc" />

-  </ItemGroup>

-  <ItemGroup>

-    <ProjectReference Include="..\compiler\preprocessor\preprocessor.vcxproj">

-      <Project>{fbe32df3-0fb0-4f2f-a424-2c21bd7bc325}</Project>

-    </ProjectReference>

-    <ProjectReference Include="..\compiler\translator.vcxproj">

-      <Project>{5b3a6db8-1e7e-40d7-92b9-da8aae619fad}</Project>

-    </ProjectReference>

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-  <ImportGroup Label="ExtensionTargets">

-  </ImportGroup>

+</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\third_party\murmurhash\MurmurHash3.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="Buffer.cpp" />
+    <ClCompile Include="Context.cpp" />
+    <ClCompile Include="..\common\debug.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="..\common\event_tracer.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="Fence.cpp" />
+    <ClCompile Include="Float16ToFloat32.cpp" />
+    <ClCompile Include="Framebuffer.cpp" />
+    <ClCompile Include="HandleAllocator.cpp" />
+    <ClCompile Include="libGLESv2.cpp" />
+    <ClCompile Include="main.cpp" />
+    <ClCompile Include="precompiled.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="Program.cpp" />
+    <ClCompile Include="ProgramBinary.cpp" />
+    <ClCompile Include="Query.cpp" />
+    <ClCompile Include="..\common\RefCountObject.cpp" />
+    <ClCompile Include="Renderbuffer.cpp" />
+    <ClCompile Include="renderer\Blit.cpp" />
+    <ClCompile Include="renderer\Fence11.cpp" />
+    <ClCompile Include="renderer\Fence9.cpp" />
+    <ClCompile Include="renderer\BufferStorage.cpp" />
+    <ClCompile Include="renderer\BufferStorage11.cpp" />
+    <ClCompile Include="renderer\BufferStorage9.cpp" />
+    <ClCompile Include="renderer\Image.cpp" />
+    <ClCompile Include="renderer\Image9.cpp" />
+    <ClCompile Include="renderer\IndexBuffer.cpp" />
+    <ClCompile Include="renderer\IndexBuffer11.cpp" />
+    <ClCompile Include="renderer\IndexBuffer9.cpp" />
+    <ClCompile Include="renderer\IndexDataManager.cpp" />
+    <ClCompile Include="renderer\ImageSSE2.cpp" />
+    <ClCompile Include="renderer\Image11.cpp" />
+    <ClCompile Include="renderer\IndexRangeCache.cpp" />
+    <ClCompile Include="renderer\InputLayoutCache.cpp" />
+    <ClCompile Include="renderer\Query11.cpp" />
+    <ClCompile Include="renderer\Query9.cpp" />
+    <ClCompile Include="renderer\Renderer.cpp" />
+    <ClCompile Include="renderer\Renderer11.cpp" />
+    <ClCompile Include="renderer\renderer11_utils.cpp" />
+    <ClCompile Include="renderer\Renderer9.cpp" />
+    <ClCompile Include="renderer\renderer9_utils.cpp" />
+    <ClCompile Include="renderer\RenderTarget11.cpp" />
+    <ClCompile Include="renderer\RenderTarget9.cpp" />
+    <ClCompile Include="renderer\RenderStateCache.cpp" />
+    <ClCompile Include="renderer\ShaderExecutable11.cpp" />
+    <ClCompile Include="renderer\ShaderExecutable9.cpp" />
+    <ClCompile Include="renderer\SwapChain11.cpp" />
+    <ClCompile Include="renderer\SwapChain9.cpp" />
+    <ClCompile Include="renderer\TextureStorage.cpp" />
+    <ClCompile Include="renderer\TextureStorage11.cpp" />
+    <ClCompile Include="renderer\TextureStorage9.cpp" />
+    <ClCompile Include="renderer\VertexBuffer.cpp" />
+    <ClCompile Include="renderer\VertexBuffer11.cpp" />
+    <ClCompile Include="renderer\VertexBuffer9.cpp" />
+    <ClCompile Include="renderer\VertexDataManager.cpp" />
+    <ClCompile Include="renderer\VertexDeclarationCache.cpp" />
+    <ClCompile Include="ResourceManager.cpp" />
+    <ClCompile Include="Shader.cpp" />
+    <ClCompile Include="Texture.cpp" />
+    <ClCompile Include="Uniform.cpp" />
+    <ClCompile Include="utilities.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\common\debug.h" />
+    <ClInclude Include="..\common\event_tracer.h" />
+    <ClInclude Include="..\common\system.h" />
+    <ClInclude Include="..\third_party\murmurhash\MurmurHash3.h" />
+    <ClInclude Include="..\third_party\trace_event\trace_event.h" />
+    <ClInclude Include="angletypes.h" />
+    <ClInclude Include="BinaryStream.h" />
+    <ClInclude Include="Buffer.h" />
+    <ClInclude Include="constants.h" />
+    <ClInclude Include="Context.h" />
+    <ClInclude Include="Fence.h" />
+    <ClInclude Include="Framebuffer.h" />
+    <ClInclude Include="..\..\include\GLES2\gl2.h" />
+    <ClInclude Include="..\..\include\GLES2\gl2ext.h" />
+    <ClInclude Include="..\..\include\GLES2\gl2platform.h" />
+    <ClInclude Include="HandleAllocator.h" />
+    <ClInclude Include="main.h" />
+    <ClInclude Include="mathutil.h" />
+    <ClInclude Include="precompiled.h" />
+    <ClInclude Include="Program.h" />
+    <ClInclude Include="ProgramBinary.h" />
+    <ClInclude Include="Query.h" />
+    <ClInclude Include="..\common\RefCountObject.h" />
+    <ClInclude Include="Renderbuffer.h" />
+    <ClInclude Include="renderer\Blit.h" />
+    <ClInclude Include="renderer\Fence11.h" />
+    <ClInclude Include="renderer\Fence9.h" />
+    <ClInclude Include="renderer\FenceImpl.h" />
+    <ClInclude Include="renderer\BufferStorage.h" />
+    <ClInclude Include="renderer\BufferStorage11.h" />
+    <ClInclude Include="renderer\BufferStorage9.h" />
+    <ClInclude Include="renderer\generatemip.h" />
+    <ClInclude Include="renderer\Image.h" />
+    <ClInclude Include="renderer\Image11.h" />
+    <ClInclude Include="renderer\Image9.h" />
+    <ClInclude Include="renderer\IndexBuffer.h" />
+    <ClInclude Include="renderer\IndexBuffer11.h" />
+    <ClInclude Include="renderer\IndexBuffer9.h" />
+    <ClInclude Include="renderer\IndexDataManager.h" />
+    <ClInclude Include="renderer\IndexRangeCache.h" />
+    <ClInclude Include="renderer\InputLayoutCache.h" />
+    <ClInclude Include="renderer\Query11.h" />
+    <ClInclude Include="renderer\QueryImpl.h" />
+    <ClInclude Include="renderer\Query9.h" />
+    <ClInclude Include="renderer\Renderer.h" />
+    <ClInclude Include="renderer\Renderer11.h" />
+    <ClInclude Include="renderer\renderer11_utils.h" />
+    <ClInclude Include="renderer\Renderer9.h" />
+    <ClInclude Include="renderer\renderer9_utils.h" />
+    <ClInclude Include="renderer\RenderTarget.h" />
+    <ClInclude Include="renderer\RenderTarget11.h" />
+    <ClInclude Include="renderer\RenderTarget9.h" />
+    <ClInclude Include="renderer\RenderStateCache.h" />
+    <ClInclude Include="renderer\ShaderCache.h" />
+    <ClInclude Include="renderer\ShaderExecutable.h" />
+    <ClInclude Include="renderer\ShaderExecutable11.h" />
+    <ClInclude Include="renderer\ShaderExecutable9.h" />
+    <ClInclude Include="renderer\shaders\compiled\clear11vs.h" />
+    <ClInclude Include="renderer\shaders\compiled\clearmultiple11ps.h" />
+    <ClInclude Include="renderer\shaders\compiled\clearsingle11ps.h" />
+    <ClInclude Include="renderer\shaders\compiled\componentmaskps.h" />
+    <ClInclude Include="renderer\shaders\compiled\flipyvs.h" />
+    <ClInclude Include="renderer\shaders\compiled\luminanceps.h" />
+    <ClInclude Include="renderer\shaders\compiled\passthrough11vs.h" />
+    <ClInclude Include="renderer\shaders\compiled\passthroughlum11ps.h" />
+    <ClInclude Include="renderer\shaders\compiled\passthroughlumalpha11ps.h" />
+    <ClInclude Include="renderer\shaders\compiled\passthroughps.h" />
+    <ClInclude Include="renderer\shaders\compiled\passthroughrgb11ps.h" />
+    <ClInclude Include="renderer\shaders\compiled\passthroughrgba11ps.h" />
+    <ClInclude Include="renderer\shaders\compiled\standardvs.h" />
+    <ClInclude Include="renderer\SwapChain.h" />
+    <ClInclude Include="renderer\SwapChain11.h" />
+    <ClInclude Include="renderer\SwapChain9.h" />
+    <ClInclude Include="renderer\TextureStorage.h" />
+    <ClInclude Include="renderer\TextureStorage11.h" />
+    <ClInclude Include="renderer\TextureStorage9.h" />
+    <ClInclude Include="renderer\VertexBuffer.h" />
+    <ClInclude Include="renderer\VertexBuffer11.h" />
+    <ClInclude Include="renderer\VertexBuffer9.h" />
+    <ClInclude Include="renderer\vertexconversion.h" />
+    <ClInclude Include="renderer\VertexDataManager.h" />
+    <ClInclude Include="renderer\VertexDeclarationCache.h" />
+    <ClInclude Include="resource.h" />
+    <ClInclude Include="ResourceManager.h" />
+    <ClInclude Include="Shader.h" />
+    <ClInclude Include="Texture.h" />
+    <ClInclude Include="Uniform.h" />
+    <ClInclude Include="utilities.h" />
+    <ClInclude Include="..\common\version.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="libGLESv2.def" />
+    <None Include="renderer\shaders\Blit.ps" />
+    <None Include="renderer\shaders\Blit.vs" />
+    <None Include="renderer\shaders\Clear11.hlsl" />
+    <None Include="renderer\shaders\generate_shaders.bat" />
+    <None Include="renderer\shaders\Passthrough11.hlsl" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="libGLESv2.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\compiler\preprocessor\preprocessor.vcxproj">
+      <Project>{fbe32df3-0fb0-4f2f-a424-2c21bd7bc325}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\compiler\translator.vcxproj">
+      <Project>{5b3a6db8-1e7e-40d7-92b9-da8aae619fad}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file