mirror of https://github.com/axmolengine/axmol.git
update vs project for new renderer and fix compiling fail on vs.
This commit is contained in:
parent
ad66f7ac41
commit
2d9b7ee4fc
|
@ -1350,8 +1350,7 @@ Point Node::convertToNodeSpace(const Point& worldPoint) const
|
|||
kmVec3 vec3 = {worldPoint.x, worldPoint.y, 0};
|
||||
kmVec3 ret;
|
||||
kmVec3Transform(&ret, &vec3, &tmp);
|
||||
Point p = {ret.x, ret.y };
|
||||
return p;
|
||||
return Point(ret.x, ret.y);
|
||||
}
|
||||
|
||||
Point Node::convertToWorldSpace(const Point& nodePoint) const
|
||||
|
@ -1360,8 +1359,7 @@ Point Node::convertToWorldSpace(const Point& nodePoint) const
|
|||
kmVec3 vec3 = {nodePoint.x, nodePoint.y, 0};
|
||||
kmVec3 ret;
|
||||
kmVec3Transform(&ret, &vec3, &tmp);
|
||||
Point p = {ret.x, ret.y };
|
||||
return p;
|
||||
return Point(ret.x, ret.y);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -317,6 +317,22 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
|||
<ClCompile Include="platform\win32\CCFileUtilsWin32.cpp" />
|
||||
<ClCompile Include="platform\win32\CCImage.cpp" />
|
||||
<ClCompile Include="platform\win32\CCStdC.cpp" />
|
||||
<ClCompile Include="renderer\CCCustomCommand.cpp" />
|
||||
<ClCompile Include="renderer\CCFrustum.cpp" />
|
||||
<ClCompile Include="renderer\CCGroupCommand.cpp" />
|
||||
<ClCompile Include="renderer\CCMaterialManager.cpp" />
|
||||
<ClCompile Include="renderer\CCNewClippingNode.cpp" />
|
||||
<ClCompile Include="renderer\CCNewDrawNode.cpp" />
|
||||
<ClCompile Include="renderer\CCNewLabelAtlas.cpp" />
|
||||
<ClCompile Include="renderer\CCNewParticleSystemQuad.cpp" />
|
||||
<ClCompile Include="renderer\CCNewRenderTexture.cpp" />
|
||||
<ClCompile Include="renderer\CCNewSprite.cpp" />
|
||||
<ClCompile Include="renderer\CCNewSpriteBatchNode.cpp" />
|
||||
<ClCompile Include="renderer\CCNewTextureAtlas.cpp" />
|
||||
<ClCompile Include="renderer\CCQuadCommand.cpp" />
|
||||
<ClCompile Include="renderer\CCRenderCommand.cpp" />
|
||||
<ClCompile Include="renderer\CCRenderer.cpp" />
|
||||
<ClCompile Include="renderer\CCRenderMaterial.cpp" />
|
||||
<ClCompile Include="TGAlib.cpp" />
|
||||
<ClCompile Include="TransformUtils.cpp" />
|
||||
<ClCompile Include="ZipUtils.cpp" />
|
||||
|
@ -513,6 +529,23 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
|||
<ClInclude Include="platform\win32\CCGL.h" />
|
||||
<ClInclude Include="platform\win32\CCPlatformDefine.h" />
|
||||
<ClInclude Include="platform\win32\CCStdC.h" />
|
||||
<ClInclude Include="renderer\CCCustomCommand.h" />
|
||||
<ClInclude Include="renderer\CCFrustum.h" />
|
||||
<ClInclude Include="renderer\CCGroupCommand.h" />
|
||||
<ClInclude Include="renderer\CCMaterialManager.h" />
|
||||
<ClInclude Include="renderer\CCNewClippingNode.h" />
|
||||
<ClInclude Include="renderer\CCNewDrawNode.h" />
|
||||
<ClInclude Include="renderer\CCNewLabelAtlas.h" />
|
||||
<ClInclude Include="renderer\CCNewParticleSystemQuad.h" />
|
||||
<ClInclude Include="renderer\CCNewRenderTexture.h" />
|
||||
<ClInclude Include="renderer\CCNewSprite.h" />
|
||||
<ClInclude Include="renderer\CCNewSpriteBatchNode.h" />
|
||||
<ClInclude Include="renderer\CCNewTextureAtlas.h" />
|
||||
<ClInclude Include="renderer\CCQuadCommand.h" />
|
||||
<ClInclude Include="renderer\CCRenderCommand.h" />
|
||||
<ClInclude Include="renderer\CCRenderCommandPool.h" />
|
||||
<ClInclude Include="renderer\CCRenderer.h" />
|
||||
<ClInclude Include="renderer\CCRenderMaterial.h" />
|
||||
<ClInclude Include="TGAlib.h" />
|
||||
<ClInclude Include="TransformUtils.h" />
|
||||
<ClInclude Include="uthash.h" />
|
||||
|
|
|
@ -109,6 +109,9 @@
|
|||
<Filter Include="base">
|
||||
<UniqueIdentifier>{aec8225f-81a7-4213-b97b-7004d5535398}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="renderer">
|
||||
<UniqueIdentifier>{cba0f362-878c-438b-ad0f-43d287516357}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
|
||||
|
@ -569,6 +572,54 @@
|
|||
<ClCompile Include="..\..\external\edtaa3func\edtaa3func.cpp">
|
||||
<Filter>label_nodes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCCustomCommand.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCFrustum.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCGroupCommand.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCMaterialManager.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCNewClippingNode.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCNewDrawNode.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCNewLabelAtlas.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCNewParticleSystemQuad.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCNewRenderTexture.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCNewSprite.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCNewSpriteBatchNode.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCNewTextureAtlas.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCQuadCommand.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCRenderCommand.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCRenderer.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderer\CCRenderMaterial.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\physics\CCPhysicsBody.h">
|
||||
|
@ -1149,5 +1200,56 @@
|
|||
<ClInclude Include="..\..\external\edtaa3func\edtaa3func.h">
|
||||
<Filter>label_nodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCCustomCommand.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCFrustum.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCGroupCommand.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCMaterialManager.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCNewClippingNode.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCNewDrawNode.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCNewLabelAtlas.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCNewParticleSystemQuad.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCNewRenderTexture.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCNewSprite.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCNewSpriteBatchNode.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCNewTextureAtlas.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCQuadCommand.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCRenderCommand.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCRenderCommandPool.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCRenderer.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderer\CCRenderMaterial.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -7,7 +7,7 @@
|
|||
<PropertyGroup />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d;$(EngineRoot)cocos\gui;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)cocos\math\kazmath\include;$(EngineRoot)cocos\2d\platform\win32;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\gui;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)cocos\math\kazmath\include;$(EngineRoot)cocos\2d\platform\win32;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
|
|
@ -31,9 +31,9 @@ NS_CC_BEGIN
|
|||
|
||||
ViewTransform::ViewTransform()
|
||||
{
|
||||
_position = {0, 0, 0};
|
||||
_focus = {0, 0, -1};
|
||||
_up = {0, 1, 0 };
|
||||
kmVec3Fill(&_position,0,0,0);
|
||||
kmVec3Fill(&_focus,0,0,-1);
|
||||
kmVec3Fill(&_up,0,1,0);
|
||||
_dirty = true;
|
||||
kmMat4Identity(&_matrix);
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ void Frustum::setupProjectionOrthogonal(const cocos2d::ViewTransform &view, floa
|
|||
normal = cDir;
|
||||
kmVec3Scale(&point, &cDir, near);
|
||||
kmVec3Add(&point, &point, &cc);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::NEAR], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_NEAR], &point, &normal);
|
||||
}
|
||||
|
||||
//far
|
||||
|
@ -201,7 +201,7 @@ void Frustum::setupProjectionOrthogonal(const cocos2d::ViewTransform &view, floa
|
|||
kmVec3Scale(&normal, &cDir, -1);
|
||||
kmVec3Scale(&point, &cDir, far);
|
||||
kmVec3Add(&point, &point, &cc);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FAR], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_FAR], &point, &normal);
|
||||
}
|
||||
|
||||
//left
|
||||
|
@ -211,7 +211,7 @@ void Frustum::setupProjectionOrthogonal(const cocos2d::ViewTransform &view, floa
|
|||
normal = cRight;
|
||||
kmVec3Scale(&point, &cRight, -width * 0.5);
|
||||
kmVec3Add(&point, &point, &cc);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::LEFT], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_LEFT], &point, &normal);
|
||||
}
|
||||
|
||||
//right
|
||||
|
@ -221,7 +221,7 @@ void Frustum::setupProjectionOrthogonal(const cocos2d::ViewTransform &view, floa
|
|||
kmVec3Scale(&normal, &cRight, -1);
|
||||
kmVec3Scale(&point, &cRight, width * 0.5);
|
||||
kmVec3Add(&point, &point, &cc);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::RIGHT], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_RIGHT], &point, &normal);
|
||||
}
|
||||
|
||||
//bottom
|
||||
|
@ -231,7 +231,7 @@ void Frustum::setupProjectionOrthogonal(const cocos2d::ViewTransform &view, floa
|
|||
normal = cUp;
|
||||
kmVec3Scale(&point, &cUp, -height * 0.5);
|
||||
kmVec3Add(&point, &point, &cc);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::BOTTOM], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_BOTTOM], &point, &normal);
|
||||
}
|
||||
|
||||
//top
|
||||
|
@ -241,7 +241,7 @@ void Frustum::setupProjectionOrthogonal(const cocos2d::ViewTransform &view, floa
|
|||
kmVec3Scale(&normal, &cUp, -1);
|
||||
kmVec3Scale(&point, &cUp, height * 0.5);
|
||||
kmVec3Add(&point, &point, &cc);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::TOP], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_TOP], &point, &normal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -267,14 +267,14 @@ void Frustum::setupProjectionPerspective(const ViewTransform& view, float left,
|
|||
|
||||
//near
|
||||
{
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::NEAR], &nearCenter, &cDir);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_NEAR], &nearCenter, &cDir);
|
||||
}
|
||||
|
||||
//far
|
||||
{
|
||||
kmVec3 normal;
|
||||
kmVec3Scale(&normal, &cDir, -1);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FAR], &farCenter, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_FAR], &farCenter, &normal);
|
||||
}
|
||||
|
||||
//left
|
||||
|
@ -288,7 +288,7 @@ void Frustum::setupProjectionPerspective(const ViewTransform& view, float left,
|
|||
kmVec3Cross(&normal, &normal, &cUp);
|
||||
kmVec3Normalize(&normal, &normal);
|
||||
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::LEFT], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_LEFT], &point, &normal);
|
||||
}
|
||||
|
||||
//right
|
||||
|
@ -302,7 +302,7 @@ void Frustum::setupProjectionPerspective(const ViewTransform& view, float left,
|
|||
kmVec3Cross(&normal, &cUp, &normal);
|
||||
kmVec3Normalize(&normal, &normal);
|
||||
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::RIGHT], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_RIGHT], &point, &normal);
|
||||
}
|
||||
|
||||
//bottom
|
||||
|
@ -316,7 +316,7 @@ void Frustum::setupProjectionPerspective(const ViewTransform& view, float left,
|
|||
kmVec3Cross(&normal, &cRight, &normal);
|
||||
kmVec3Normalize(&normal, &normal);
|
||||
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::BOTTOM], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_BOTTOM], &point, &normal);
|
||||
}
|
||||
|
||||
//top
|
||||
|
@ -330,7 +330,7 @@ void Frustum::setupProjectionPerspective(const ViewTransform& view, float left,
|
|||
kmVec3Cross(&normal, &normal, &cRight);
|
||||
kmVec3Normalize(&normal, &normal);
|
||||
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::TOP], &point, &normal);
|
||||
kmPlaneFromPointNormal(&_frustumPlanes[FrustumPlane::FRUSTUM_TOP], &point, &normal);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -347,18 +347,18 @@ void Frustum::setupFromMatrix(const kmMat4 &view, const kmMat4 &projection)
|
|||
kmMat4 mvp;
|
||||
kmMat4Multiply(&mvp, &projection, &view);
|
||||
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::NEAR], &mvp, KM_PLANE_NEAR);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::FAR], &mvp, KM_PLANE_FAR);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::LEFT], &mvp, KM_PLANE_LEFT);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::RIGHT], &mvp, KM_PLANE_RIGHT);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::BOTTOM], &mvp, KM_PLANE_BOTTOM);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::TOP], &mvp, KM_PLANE_TOP);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::FRUSTUM_NEAR], &mvp, KM_PLANE_NEAR);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::FRUSTUM_FAR], &mvp, KM_PLANE_FAR);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::FRUSTUM_LEFT], &mvp, KM_PLANE_LEFT);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::FRUSTUM_RIGHT], &mvp, KM_PLANE_RIGHT);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::FRUSTUM_BOTTOM], &mvp, KM_PLANE_BOTTOM);
|
||||
kmMat4ExtractPlane(&_frustumPlanes[FrustumPlane::FRUSTUM_TOP], &mvp, KM_PLANE_TOP);
|
||||
}
|
||||
|
||||
Frustum::IntersectResult Frustum::intersectPoint(const kmVec3 &point) const
|
||||
{
|
||||
int indexFirst = static_cast<int>(FrustumPlane::NEAR);
|
||||
int indexNumber = static_cast<int>(FrustumPlane::NUMBER);
|
||||
int indexFirst = static_cast<int>(FrustumPlane::FRUSTUM_NEAR);
|
||||
int indexNumber = static_cast<int>(FrustumPlane::FRUSTUM_NUMBER);
|
||||
|
||||
for(int planeIndex = indexFirst; planeIndex < indexNumber; ++planeIndex)
|
||||
{
|
||||
|
@ -371,8 +371,8 @@ Frustum::IntersectResult Frustum::intersectPoint(const kmVec3 &point) const
|
|||
Frustum::IntersectResult Frustum::intersectAABB(const AABB& aabb) const
|
||||
{
|
||||
IntersectResult result = IntersectResult::INSIDE;
|
||||
int indexFirst = static_cast<int>(FrustumPlane::NEAR);
|
||||
int indexNumber = static_cast<int>(FrustumPlane::NUMBER);
|
||||
int indexFirst = static_cast<int>(FrustumPlane::FRUSTUM_NEAR);
|
||||
int indexNumber = static_cast<int>(FrustumPlane::FRUSTUM_NUMBER);
|
||||
|
||||
for(int planeIndex = indexFirst; planeIndex < indexNumber; ++planeIndex)
|
||||
{
|
||||
|
@ -394,8 +394,8 @@ Frustum::IntersectResult Frustum::intersectAABB(const AABB& aabb) const
|
|||
Frustum::IntersectResult Frustum::intersectSphere(const kmVec3& center, float radius) const
|
||||
{
|
||||
IntersectResult result = IntersectResult::INSIDE;
|
||||
int indexFirst = static_cast<int>(FrustumPlane::NEAR);
|
||||
int indexNumber = static_cast<int>(FrustumPlane::NUMBER);
|
||||
int indexFirst = static_cast<int>(FrustumPlane::FRUSTUM_NEAR);
|
||||
int indexNumber = static_cast<int>(FrustumPlane::FRUSTUM_NUMBER);
|
||||
|
||||
for(int planeIndex = indexFirst; planeIndex < indexNumber; ++planeIndex)
|
||||
{
|
||||
|
|
|
@ -104,15 +104,15 @@ public:
|
|||
private:
|
||||
enum FrustumPlane
|
||||
{
|
||||
NEAR = 0,
|
||||
FAR = 1,
|
||||
BOTTOM = 2,
|
||||
TOP = 3,
|
||||
LEFT = 4,
|
||||
RIGHT = 5,
|
||||
NUMBER = 6
|
||||
FRUSTUM_NEAR = 0,
|
||||
FRUSTUM_FAR = 1,
|
||||
FRUSTUM_BOTTOM = 2,
|
||||
FRUSTUM_TOP = 3,
|
||||
FRUSTUM_LEFT = 4,
|
||||
FRUSTUM_RIGHT = 5,
|
||||
FRUSTUM_NUMBER = 6
|
||||
};
|
||||
kmPlane _frustumPlanes[FrustumPlane::NUMBER];
|
||||
kmPlane _frustumPlanes[FrustumPlane::FRUSTUM_NUMBER];
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -115,7 +115,7 @@ void NewRenderTexture::beginWithClear(float r, float g, float b, float a, float
|
|||
|
||||
void NewRenderTexture::beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue, GLbitfield flags)
|
||||
{
|
||||
setClearColor({r, g, b, a});
|
||||
setClearColor(Color4F(r, g, b, a));
|
||||
|
||||
setClearDepth(depthValue);
|
||||
|
||||
|
|
|
@ -152,11 +152,11 @@ bool NewSprite::culling() const
|
|||
kmVec3 point = {newRect.getMinX(), newRect.getMinY(), _vertexZ};
|
||||
|
||||
AABB aabb(point,point);
|
||||
point = {newRect.getMaxX(), newRect.getMinY(), _vertexZ};
|
||||
kmVec3Fill(&point,newRect.getMaxX(), newRect.getMinY(), _vertexZ);
|
||||
aabb.expand(point);
|
||||
point = {newRect.getMinX(), newRect.getMaxY(), _vertexZ};
|
||||
kmVec3Fill(&point,newRect.getMinX(), newRect.getMaxY(), _vertexZ);
|
||||
aabb.expand(point);
|
||||
point = {newRect.getMaxX(), newRect.getMaxY(), _vertexZ};
|
||||
kmVec3Fill(&point,newRect.getMaxX(), newRect.getMaxY(), _vertexZ);
|
||||
aabb.expand(point);
|
||||
|
||||
return Frustum::IntersectResult::OUTSIDE !=frustum->intersectAABB(aabb);
|
||||
|
|
|
@ -50,7 +50,8 @@ Renderer::Renderer()
|
|||
|
||||
RenderQueue defaultRenderQueue;
|
||||
_renderGroups.push_back(defaultRenderQueue);
|
||||
_renderStack.push({DEFAULT_RENDER_QUEUE, 0});
|
||||
RenderStackElement elelment = {DEFAULT_RENDER_QUEUE, 0};
|
||||
_renderStack.push(elelment);
|
||||
}
|
||||
|
||||
Renderer::~Renderer()
|
||||
|
@ -267,7 +268,8 @@ void Renderer::render()
|
|||
_renderStack.top().currentIndex = i + 1;
|
||||
|
||||
//push new renderQueue to renderStack
|
||||
_renderStack.push({cmd->getRenderQueueID(), 0});
|
||||
RenderStackElement element = {cmd->getRenderQueueID(), 0};
|
||||
_renderStack.push(element);
|
||||
|
||||
//Exit current loop
|
||||
break;
|
||||
|
@ -303,7 +305,8 @@ void Renderer::render()
|
|||
{
|
||||
_renderStack.pop();
|
||||
}
|
||||
_renderStack.push({DEFAULT_RENDER_QUEUE, 0});
|
||||
RenderStackElement element = {DEFAULT_RENDER_QUEUE, 0};
|
||||
_renderStack.push(element);
|
||||
_firstCommand = _lastCommand = 0;
|
||||
_lastMaterialID = 0;
|
||||
}
|
||||
|
|
|
@ -184,6 +184,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\websockets\prebuilt\win32\*.*" "$
|
|||
<ClCompile Include="..\Classes\KeyboardTest\KeyboardTest.cpp" />
|
||||
<ClCompile Include="..\Classes\LabelTest\LabelTestNew.cpp" />
|
||||
<ClCompile Include="..\Classes\NewEventDispatcherTest\NewEventDispatcherTest.cpp" />
|
||||
<ClCompile Include="..\Classes\NewRendererTest\NewRendererTest.cpp" />
|
||||
<ClCompile Include="..\Classes\PerformanceTest\PerformanceAllocTest.cpp" />
|
||||
<ClCompile Include="..\Classes\PerformanceTest\PerformanceLabelTest.cpp" />
|
||||
<ClCompile Include="..\Classes\PhysicsTest\PhysicsTest.cpp" />
|
||||
|
@ -328,6 +329,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\websockets\prebuilt\win32\*.*" "$
|
|||
<ClInclude Include="..\Classes\KeyboardTest\KeyboardTest.h" />
|
||||
<ClInclude Include="..\Classes\LabelTest\LabelTestNew.h" />
|
||||
<ClInclude Include="..\Classes\NewEventDispatcherTest\NewEventDispatcherTest.h" />
|
||||
<ClInclude Include="..\Classes\NewRendererTest\NewRendererTest.h" />
|
||||
<ClInclude Include="..\Classes\PerformanceTest\PerformanceLabelTest.h" />
|
||||
<ClInclude Include="..\Classes\PhysicsTest\PhysicsTest.h" />
|
||||
<ClInclude Include="..\Classes\ShaderTest\ShaderTest2.h" />
|
||||
|
|
|
@ -307,6 +307,9 @@
|
|||
<Filter Include="Classes\ConsoleTest">
|
||||
<UniqueIdentifier>{709f8a27-ecc2-4fe2-abd2-f13da4b70fe8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Classes\NewRendererTest">
|
||||
<UniqueIdentifier>{688e201c-77fe-4665-931e-e508a58141f5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
|
@ -712,6 +715,9 @@
|
|||
<ClCompile Include="..\Classes\PerformanceTest\PerformanceLabelTest.cpp">
|
||||
<Filter>Classes\PerformanceTest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Classes\NewRendererTest\NewRendererTest.cpp">
|
||||
<Filter>Classes\NewRendererTest</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="main.h">
|
||||
|
@ -1309,5 +1315,8 @@
|
|||
<ClInclude Include="..\Classes\PerformanceTest\PerformanceLabelTest.h">
|
||||
<Filter>Classes\PerformanceTest</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Classes\NewRendererTest\NewRendererTest.h">
|
||||
<Filter>Classes\NewRendererTest</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue