粘合代码是否只是模拟“本机”中所需的行为?代码?

发布于 2024-12-21 18:05:42 字数 230 浏览 2 评论 0原文

我对胶水代码(多语言绑定)不太熟悉,而且我似乎找不到它通常如何实现的非常详细的描述(如果有这样的方法,它可能是可以解决的问题之一)解决了很多方法)。

让我们以 OpenGL 为例,虽然它是用 C 编写的,但也有 java 绑定,这可能不是最好的例子,因为 java 是一个虚拟机,可能只是将您的调用映射到本机接口。那么Python(我对此几乎一无所知)怎么样,它具有OpenGL 绑定,但不属于C 系列,那么它如何与GL 链接呢?

I'm not that familiar with glue code (multiple language bindings) and I can't seem to find a very detailed description of how it is usually implemented (if there is such a way, it may be one of those problems that can be solved so many ways).

Let us take OpenGL as an example while it is written in C there are also java bindings, this is probably not the best example since java is a virtual machine and probably just maps your calls to the native interface. So how about Python (which I know almost nothing about) it has OpenGL bindings, but is not in the C family so how does it link against GL?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文