有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

轻量级Java游戏库,大量静态

为什么轻量级java游戏库使用大量静态引用。我已经开始学习LWJGL了,我觉得LWJGL希望你的很多变量和东西都是静态的。我有办法解决这个问题,如果没有的话,使用大量静态数据的好处是什么


共 (1) 个答案

  1. # 1 楼答案

    因为LWGJL是用C编写的OpenGL实现的Java包装器,它不是面向对象的

    您可以在the LWGJL wiki中找到:

    Libraries like OpenGL, OpenCL and OpenAL are written in C and hence static in nature. As LWJGL is designed to be as simple and as close to the metal as possible its API is almost entirely static to allows it to match as closely as possible to them.