Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation on Windows. Requires VS2013 to properly compile. #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ xcschememanagement.plist
.DS_Store
._.*
xcuserdata/
DerivedData/
DerivedData/

# Win32
Debug.win32/
*.opensdf
*.sdf
*.suo
41 changes: 19 additions & 22 deletions Classes/3d/Colored.es2.frag.h
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
static const char* baseColoredFrag = STRINGIFY(

#ifdef GL_ES
varying lowp vec4 DestinationColor;
#else
varying vec4 DestinationColor;
#endif

//varying mediump vec2 TextureCoordOut;

//uniform sampler2D Sampler;

void main(void)
{
gl_FragColor = DestinationColor;
gl_FragColor.a = 1.0;
}
\r\n
#ifdef GL_ES \r\n
varying lowp vec4 DestinationColor; \r\n
#else \r\n
varying vec4 DestinationColor; \r\n
#endif \r\n
//varying mediump vec2 TextureCoordOut; \r\n
//uniform sampler2D Sampler; \r\n
\r\n
void main(void) \r\n
{ \r\n
gl_FragColor = DestinationColor; \r\n
gl_FragColor.a = 1.0; \r\n
} \r\n
);


// pure black frag shader
static const char* blackFrag = STRINGIFY(
uniform vec3 OutLineColor;
void main(void)
{
gl_FragColor = vec4(OutLineColor,1.0);
}
uniform vec3 OutLineColor; \r\n
void main(void) \r\n
{ \r\n
gl_FragColor = vec4(OutLineColor,1.0); \r\n
} \r\n
);
28 changes: 14 additions & 14 deletions Classes/3d/Textured.es2.frag.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
static const char* baseTexturedFrag = STRINGIFY(

#ifdef GL_ES
varying lowp vec4 DestinationColor;
varying mediump vec2 TextureCoordOut;
#else
varying vec4 DestinationColor;
varying vec2 TextureCoordOut;
#endif

uniform sampler2D Sampler;

void main(void)
{
gl_FragColor = texture2D(Sampler, TextureCoordOut) * DestinationColor;
}
#ifdef GL_ES \r\n
varying lowp vec4 DestinationColor; \r\n
varying mediump vec2 TextureCoordOut; \r\n
#else \r\n
varying vec4 DestinationColor; \r\n
varying vec2 TextureCoordOut; \r\n
#endif \r\n
\r\n
uniform sampler2D Sampler; \r\n
\r\n
void main(void) \r\n
{ \r\n
gl_FragColor = texture2D(Sampler, TextureCoordOut) * DestinationColor; \r\n
} \r\n
);
1 change: 1 addition & 0 deletions Classes/Bullets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ bool Missile::init()
_Model = Sprite3D::create("daodanv001.obj", "daodan_32.png");
if(_Model)
{
setTarget(nullptr);
addChild(_Model);
_radius=10;
_type = kPlayerMissiles;
Expand Down
4 changes: 3 additions & 1 deletion cocos2d/cocos/2d/cocos2d.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand All @@ -23,13 +23,15 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
4 changes: 3 additions & 1 deletion cocos2d/cocos/audio/proj.win32/CocosDenshion.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand All @@ -23,13 +23,15 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
4 changes: 3 additions & 1 deletion cocos2d/external/chipmunk/proj.win32/chipmunk.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand All @@ -22,13 +22,15 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
Loading