Compiles on windows, sort of

This commit is contained in:
Ricardo Quesada 2014-05-09 19:07:22 -07:00
parent 63c7c6a05c
commit 8f71e65482
21 changed files with 134 additions and 146 deletions

View File

@ -235,6 +235,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\renderer\CCBatchCommand.cpp" />
<ClCompile Include="..\renderer\CCCustomCommand.cpp" />
<ClCompile Include="..\renderer\CCGLProgram.cpp" />
<ClCompile Include="..\renderer\CCGLProgramCache.cpp" />
<ClCompile Include="..\renderer\CCGLProgramState.cpp" />
<ClCompile Include="..\renderer\CCGLProgramStateCache.cpp" />
<ClCompile Include="..\renderer\ccGLStateCache.cpp" />
@ -242,7 +243,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClCompile Include="..\renderer\CCQuadCommand.cpp" />
<ClCompile Include="..\renderer\CCRenderCommand.cpp" />
<ClCompile Include="..\renderer\CCRenderer.cpp" />
<ClCompile Include="..\renderer\CCShaderCache.cpp" />
<ClCompile Include="..\renderer\ccShaders.cpp" />
<ClCompile Include="CCAction.cpp" />
<ClCompile Include="CCActionCamera.cpp" />
@ -413,6 +413,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\renderer\CCBatchCommand.h" />
<ClInclude Include="..\renderer\CCCustomCommand.h" />
<ClInclude Include="..\renderer\CCGLProgram.h" />
<ClInclude Include="..\renderer\CCGLProgramCache.h" />
<ClInclude Include="..\renderer\CCGLProgramState.h" />
<ClInclude Include="..\renderer\CCGLProgramStateCache.h" />
<ClInclude Include="..\renderer\ccGLStateCache.h" />
@ -421,30 +422,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<ClInclude Include="..\renderer\CCRenderCommand.h" />
<ClInclude Include="..\renderer\CCRenderCommandPool.h" />
<ClInclude Include="..\renderer\CCRenderer.h" />
<ClInclude Include="..\renderer\CCShaderCache.h" />
<ClInclude Include="..\renderer\ccShaders.h" />
<ClInclude Include="..\renderer\ccShader_Label_frag_df.h" />
<ClInclude Include="..\renderer\ccShader_Label_frag_df_glow.h" />
<ClInclude Include="..\renderer\ccShader_Label_frag_normal.h" />
<ClInclude Include="..\renderer\ccShader_Label_frag_outline.h" />
<ClInclude Include="..\renderer\ccShader_Label_vert.h" />
<ClInclude Include="..\renderer\ccShader_PositionColorLengthTexture_frag.h" />
<ClInclude Include="..\renderer\ccShader_PositionColorLengthTexture_vert.h" />
<ClInclude Include="..\renderer\ccShader_PositionColor_frag.h" />
<ClInclude Include="..\renderer\ccShader_PositionColor_vert.h" />
<ClInclude Include="..\renderer\ccShader_PositionTextureA8Color_frag.h" />
<ClInclude Include="..\renderer\ccShader_PositionTextureA8Color_vert.h" />
<ClInclude Include="..\renderer\ccShader_PositionTextureColorAlphaTest_frag.h" />
<ClInclude Include="..\renderer\ccShader_PositionTextureColor_frag.h" />
<ClInclude Include="..\renderer\ccShader_PositionTextureColor_noMVP_frag.h" />
<ClInclude Include="..\renderer\ccShader_PositionTextureColor_noMVP_vert.h" />
<ClInclude Include="..\renderer\ccShader_PositionTextureColor_vert.h" />
<ClInclude Include="..\renderer\ccShader_PositionTexture_frag.h" />
<ClInclude Include="..\renderer\ccShader_PositionTexture_uColor_frag.h" />
<ClInclude Include="..\renderer\ccShader_PositionTexture_uColor_vert.h" />
<ClInclude Include="..\renderer\ccShader_PositionTexture_vert.h" />
<ClInclude Include="..\renderer\ccShader_Position_uColor_frag.h" />
<ClInclude Include="..\renderer\ccShader_Position_uColor_vert.h" />
<ClInclude Include="CCAction.h" />
<ClInclude Include="CCActionCamera.h" />
<ClInclude Include="CCActionCatmullRom.h" />
@ -549,6 +527,25 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
<None Include="..\math\Vector2.inl" />
<None Include="..\math\Vector3.inl" />
<None Include="..\math\Vector4.inl" />
<None Include="..\renderer\ccShader_Label.vert" />
<None Include="..\renderer\ccShader_Label_df.frag" />
<None Include="..\renderer\ccShader_Label_df_glow.frag" />
<None Include="..\renderer\ccShader_Label_normal.frag" />
<None Include="..\renderer\ccShader_Label_outline.frag" />
<None Include="..\renderer\ccShader_PositionColor.frag" />
<None Include="..\renderer\ccShader_PositionColor.vert" />
<None Include="..\renderer\ccShader_PositionColorLengthTexture.frag" />
<None Include="..\renderer\ccShader_PositionColorLengthTexture.vert" />
<None Include="..\renderer\ccShader_PositionTexture.frag" />
<None Include="..\renderer\ccShader_PositionTexture.vert" />
<None Include="..\renderer\ccShader_PositionTextureA8Color.frag" />
<None Include="..\renderer\ccShader_PositionTextureA8Color.vert" />
<None Include="..\renderer\ccShader_PositionTextureColor.frag" />
<None Include="..\renderer\ccShader_PositionTextureColor.vert" />
<None Include="..\renderer\ccShader_PositionTexture_uColor.frag" />
<None Include="..\renderer\ccShader_PositionTexture_uColor.vert" />
<None Include="..\renderer\ccShader_Position_uColor.frag" />
<None Include="..\renderer\ccShader_Position_uColor.vert" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -100,8 +100,8 @@
<Filter Include="math">
<UniqueIdentifier>{02a21a86-8f65-441b-ae13-11dec1c45ee5}</UniqueIdentifier>
</Filter>
<Filter Include="renderer\Shaders">
<UniqueIdentifier>{406577df-e0cd-4148-8e00-9bc159e0a799}</UniqueIdentifier>
<Filter Include="renderer\shaders">
<UniqueIdentifier>{438e71df-3684-4619-9659-10e07ed6cd62}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -576,10 +576,10 @@
<ClCompile Include="..\renderer\ccGLStateCache.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\renderer\CCShaderCache.cpp">
<ClCompile Include="..\renderer\ccShaders.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\renderer\ccShaders.cpp">
<ClCompile Include="..\renderer\CCGLProgramCache.cpp">
<Filter>renderer</Filter>
</ClCompile>
</ItemGroup>
@ -1115,72 +1115,6 @@
<ClInclude Include="..\renderer\CCGLProgramStateCache.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_Label_frag_df.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_Label_frag_df_glow.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_Label_frag_normal.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_Label_frag_outline.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_Label_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_Position_uColor_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_Position_uColor_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionColor_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionColor_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionColorLengthTexture_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionColorLengthTexture_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTexture_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTexture_uColor_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTexture_uColor_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTexture_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTextureA8Color_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTextureA8Color_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTextureColor_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTextureColor_noMVP_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTextureColor_noMVP_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTextureColor_vert.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShader_PositionTextureColorAlphaTest_frag.h">
<Filter>renderer\Shaders</Filter>
</ClInclude>
<ClInclude Include="..\renderer\CCGLProgram.h">
<Filter>renderer</Filter>
</ClInclude>
@ -1190,10 +1124,10 @@
<ClInclude Include="..\renderer\ccGLStateCache.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\renderer\CCShaderCache.h">
<ClInclude Include="..\renderer\ccShaders.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\renderer\ccShaders.h">
<ClInclude Include="..\renderer\CCGLProgramCache.h">
<Filter>renderer</Filter>
</ClInclude>
</ItemGroup>
@ -1224,5 +1158,62 @@
<None Include="..\math\Vector4.inl">
<Filter>math</Filter>
</None>
<None Include="..\renderer\ccShader_PositionTextureA8Color.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionTextureA8Color.vert">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionTextureColor.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionTextureColor.vert">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_Label.vert">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_Label_df.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_Label_df_glow.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_Label_normal.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_Label_outline.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_Position_uColor.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_Position_uColor.vert">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionColor.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionColor.vert">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionColorLengthTexture.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionColorLengthTexture.vert">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionTexture.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionTexture.vert">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionTexture_uColor.frag">
<Filter>renderer\shaders</Filter>
</None>
<None Include="..\renderer\ccShader_PositionTexture_uColor.vert">
<Filter>renderer\shaders</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -29,13 +29,13 @@ attribute vec4 a_position;
attribute vec2 a_texCoord;
attribute vec4 a_color;
#ifdef GL_ES
#ifdef GL_ES\n
varying lowp vec4 v_fragmentColor;
varying mediump vec2 v_texCoord;
#else
#else\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
#endif
#endif\n
void main()
{

View File

@ -1,8 +1,8 @@
const char* ccLabelDistanceFieldNormal_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;

View File

@ -1,8 +1,8 @@
const char* ccLabelDistanceFieldGlow_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;

View File

@ -24,9 +24,9 @@
*/
const char* ccLabelNormal_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;

View File

@ -1,7 +1,7 @@
const char* ccLabelOutline_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;

View File

@ -25,9 +25,9 @@
const char* ccPositionColor_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
varying vec4 v_fragmentColor;

View File

@ -28,11 +28,11 @@ const char* ccPositionColor_vert = STRINGIFY(
attribute vec4 a_position;
attribute vec4 a_color;
#ifdef GL_ES
#ifdef GL_ES\n
varying lowp vec4 v_fragmentColor;
#else
#else\n
varying vec4 v_fragmentColor;
#endif
#endif\n
void main()
{

View File

@ -21,22 +21,22 @@
const char* ccPositionColorLengthTexture_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
// #extension GL_OES_standard_derivatives : enable
\n
varying mediump vec4 v_color;
varying mediump vec2 v_texcoord;
#else
#else\n
varying vec4 v_color;
varying vec2 v_texcoord;
#endif
#endif\n
void main()
{
// #if defined GL_OES_standard_derivatives
// gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord));
// #else
// #else\n
gl_FragColor = v_color*step(0.0, 1.0 - length(v_texcoord));
// #endif
// #endif\n
}
);

View File

@ -21,7 +21,7 @@
const char* ccPositionColorLengthTexture_vert = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
attribute mediump vec4 a_position;
attribute mediump vec2 a_texcoord;
attribute mediump vec4 a_color;
@ -29,7 +29,7 @@ attribute mediump vec4 a_color;
varying mediump vec4 v_color;
varying mediump vec2 v_texcoord;
#else
#else\n
attribute vec4 a_position;
attribute vec2 a_texcoord;
@ -37,7 +37,7 @@ attribute vec4 a_color;
varying vec4 v_color;
varying vec2 v_texcoord;
#endif
#endif\n
void main()
{

View File

@ -25,9 +25,9 @@
const char* ccPositionTexture_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
varying vec2 v_texCoord;
uniform sampler2D CC_Texture0;

View File

@ -28,11 +28,11 @@ const char* ccPositionTexture_vert = STRINGIFY(
attribute vec4 a_position;
attribute vec2 a_texCoord;
#ifdef GL_ES
#ifdef GL_ES\n
varying mediump vec2 v_texCoord;
#else
#else\n
varying vec2 v_texCoord;
#endif
#endif\n
void main()
{

View File

@ -25,9 +25,9 @@
const char* ccPositionTextureA8Color_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;

View File

@ -29,13 +29,13 @@ attribute vec4 a_position;
attribute vec2 a_texCoord;
attribute vec4 a_color;
#ifdef GL_ES
#ifdef GL_ES\n
varying lowp vec4 v_fragmentColor;
varying mediump vec2 v_texCoord;
#else
#else\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
#endif
#endif\n
void main()
{

View File

@ -24,9 +24,9 @@
*/
const char* ccPositionTextureColor_frag = STRINGIFY(
#ifdef GL_ES
\n#ifdef GL_ES\n
precision lowp float;
#endif
\n#endif\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;

View File

@ -28,13 +28,13 @@ attribute vec4 a_position;
attribute vec2 a_texCoord;
attribute vec4 a_color;
#ifdef GL_ES
\n#ifdef GL_ES\n
varying lowp vec4 v_fragmentColor;
varying mediump vec2 v_texCoord;
#else
\n#else\n
varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
#endif
\n#endif\n
void main()
{

View File

@ -25,9 +25,9 @@
const char* ccPositionTexture_uColor_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
uniform vec4 u_color;

View File

@ -28,11 +28,11 @@ const char* ccPositionTexture_uColor_vert = STRINGIFY(
attribute vec4 a_position;
attribute vec2 a_texCoord;
#ifdef GL_ES
#ifdef GL_ES\n
varying mediump vec2 v_texCoord;
#else
#else\n
varying vec2 v_texCoord;
#endif
#endif\n
void main()
{

View File

@ -25,9 +25,9 @@
const char* ccPosition_uColor_frag = STRINGIFY(
#ifdef GL_ES
#ifdef GL_ES\n
precision lowp float;
#endif
#endif\n
varying vec4 v_fragmentColor;

View File

@ -29,11 +29,11 @@ attribute vec4 a_position;
uniform vec4 u_color;
uniform float u_pointSize;
#ifdef GL_ES
#ifdef GL_ES\n
varying lowp vec4 v_fragmentColor;
#else
#else\n
varying vec4 v_fragmentColor;
#endif
#endif\n
void main()
{