W8&WP8 D3D renderer

Yeah, I have this warning as well. It is because I do not set sampler explicitly which is actually not needed.

I am not plan to add more functionality now since this is all we need for our game. But you have core functions for rendering sprites, atlases, labels, … You can easily add other nodes what you need inspiring with for example Label or TextureAtlas nodes. Shaders should be ok but there is slightly different approach to define new shader (this can be seen in ccShaders).

Now I will only debug things I added. There are some problems. I will also look at the problem with rendering.

So you are not going to develop this further? Are you going to remove Angle from the project completely? Now it is still there.

Hi,

Could you fix the WP8 project if you have time, I am very eager to see it running on WP8. Please Please Please.

After removing angle and fixing rendering problem it will be easy to add functionality to other nodes.

I think there is a problem in the shaders system, I made all pixel shaders return red(return float4(1, 0, 0, 1):wink: but I still see the default clear color.

Like++
Looking forward to an improvement in speed. Thanks Jiri and everyone else contributing.

I thinks this is most important update for cocos2d-x now. Hope cocos2d-x official can support for this, even if it not complete but give us a choice. A temporary brunch is good enough, it should not take much time but great help for developers. You know WP8 is fast growing and time equals money. If need we can join in. Guys keep this moving. Thanks swap again.

Cheers,

1 Like

I would love to see this come into fruition. ANGLE is not only non-performant it is outright buggy. In my experience, any texture that extends beyond the right side of the screen gets looped around to the left side on top of itself and z-fights and CCScale9Sprite by default results in a broken texture. This has made using kResolutionNoBorder as in the iOS and Android versions of our app impossible. This is on top of the already existing bugs in the WinRT “support” in cocos2d-x (I put it in quotes to emphasize that just because something builds doesn’t mean it is supported…).

I will fix the render problem when I have more time. I will create W8 project to debug it.

I’ve just removed Angle libraries from our project completely :slight_smile:

1 Like

Great news, can you post the changes on github?

swap,

Thank you for your job and contribution

I have found the issue in WP8 cpptest Project, The D3D not setup completely, Eye and model matrix not setup. I am trying to fix it and waiting swap 's update.

Fixed some issues with wp8 test project, can show sprite now!!!

Perfect. Can you please commit your fix to the github? Thanks.

perfect. :slight_smile:

There still some issues and some bypassed code need to be refactor. After that i will commit it :slight_smile:

1 Like

Perfect.

Very appreciate both of you . swap , greateorion

Hero of WP8 cocos2d-x developers!
Thank you guys, hope the unofficial D3D branch comes out soon.

Finally I found the true fault, just change a setting is enough. 3D projection has some issues, but we do not need it. Now every is seem working!!!

There are two steps, Swap could you please update this to your github :smile: .

In CCDirector.cpp

First change the default projection to 2D:

std::string projection = conf->getValue(“cocos2d.x.gl.projection”, Value(“3d”)).asString();

to:

std::string projection = conf->getValue(“cocos2d.x.gl.projection”, Value(“2d”)).asString();

Second fix crash issue when width or height is zero:

auto m = DirectX::XMMatrixOrthographicOffCenterLH(0, size.width, 0, size.height, -1024, 1024);

to:

if (size.width == 0)
size.width = 1;
if (size.height == 0)
size.height = 1;
auto m = DirectX::XMMatrixOrthographicOffCenterLH(0, size.width, 0, size.height, -1024, 1024);

Thanks Swap again.

Thanks, rendering now works.
I seem to have a problem with the size of glview.

I tried to remove angle but I can not. it’s not simple render module. cocos2d-x has too much code opengl. it’s everywhere