• International中文
  • [runtime] 我正在使用c#的OpenGL库OpenTk来转写WebGL运行时,遇到了许多问题

version spine3.6
runtime spine-csharp
我正在使用c#的OpenGL库OpenTK来转写Spine的WebGL运行时,遇到了许多问题
我将typescript代码翻译为c#代码后,使用同样的测试用例同步调试
我发现了许多地方都不太一样
RegionAttachment的UVs和ComputeWorldVertices()的结果不一致
OrthoCamera的Update()后ProjectionView不一致,查看了WebGL运行时中的Matrix4好像矩阵方向不一样
这些问题使我无法再继续了
因为我也没有在WebGL运行时中看到翻转纹理的操作,因此我考虑到是否两个运行时使用的坐标系统是不一致的?

Related Discussions
...

ComputeWorldVertices() does not compute any UVs. UVs are static, except if an attachment is clipped. Ingoring the clipping case, the results you get for RegionAttachment and MeshAttachment ComputeWorldVertices are exactly the same.

I would suggest to start with a simple skeleton, e.g. just a single RegionAttachment without any animation. Work your way up from there.

You can also share your code here and we can try to identify the issue.

    Mario Your translator may have caused you to misunderstand what I said.
    Today, I roughly translated "Matrix4" and "Vector3" as C#,To replace the equivalent types in OpenTK
    I debugged all the rendering code to ensure that all the data used by OpenGL is the same as spine-webgl
    Awesome,everything works well

    I think I can publish it now

    Apologies! Google translate seems to be a bit hit or miss. Glad you worked it out!