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

lua: generate bindings for Sprite3DMaterial #16609

Merged
merged 1 commit into from
Sep 30, 2016
Merged

lua: generate bindings for Sprite3DMaterial #16609

merged 1 commit into from
Sep 30, 2016

Conversation

Glidos
Copy link
Contributor

@Glidos Glidos commented Sep 24, 2016

Add Sprite3DMaterial to the list of classes for autogeneration of
lua bindings.

Add a new test case to the end of Sprite3DTest.lua showing the
use of outline.material

@minggo
Copy link
Contributor

minggo commented Sep 26, 2016

Error happened when running the test case on Mac:

cocos2d: ERROR: 0:15: 'precision' : syntax error: syntax error

cocos2d: ERROR: Failed to compile vertex shader
[LUA-print] ASSERT FAILED ON LUA EXECUTE: invalid shader
stack traceback:
    [string "Sprite3DTest/Sprite3DTest.lua"]:1342: in function 'onEnter'
    [string "Sprite3DTest/Sprite3DTest.lua"]:1318: in function <[string "Sprite3DTest/Sprite3DTest.lua"]:1316>

And i think you can reuse resources in /tests/cpp-tests/Resources/Materials.

@Glidos
Copy link
Contributor Author

Glidos commented Sep 26, 2016

Okay, I've changed the test to use outline.material and simplified the test in other ways.

@minggo
Copy link
Contributor

minggo commented Sep 27, 2016

@Glidos thanks, you don't have to update files in cocos/scripting/lua-bindings/auto. These files will be auto-generated.

Add Sprite3DMaterial to the list of classes for autogeneration of
lua bindings.

Add a new test case to the end of Sprite3DTest.lua showing the
use of outline.material.
@Glidos
Copy link
Contributor Author

Glidos commented Sep 27, 2016

@minggo okay, autogenerated files removed. So how does that work? I notice the autogenerated files do end up committed to the repo. Is it part of the commit hook?

@Glidos
Copy link
Contributor Author

Glidos commented Sep 27, 2016

So without the autogenerated changes, the test build now fails. I'm confused.

@Glidos
Copy link
Contributor Author

Glidos commented Sep 27, 2016

Oh, and now it's passed. Okay, looks ready to go now.

@minggo
Copy link
Contributor

minggo commented Sep 30, 2016

@Glidos the CI will generate binding codes automatically when checking a PR.

@minggo minggo added this to the 3.14 milestone Sep 30, 2016
@minggo minggo merged commit 68ec773 into cocos2d:v3 Sep 30, 2016
@Glidos
Copy link
Contributor Author

Glidos commented Oct 2, 2016

@minggo thank you

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants