[英]What does the different LWJGL OpenGL library numbers mean/do?
For example, sometimes people use GL15.SOME_VARIABLE
while GL20
has the exact same variable.例如,有时人们使用GL15.SOME_VARIABLE
而GL20
具有完全相同的变量。 Do these libraries have any significant impact on how the program runs or is it just for organisation?这些库是否对程序的运行方式有任何重大影响,还是只是为了组织? Is it different version types and in that case what is the reason to use older versions over newer ones?它是不同的版本类型吗?在这种情况下,使用旧版本而不是新版本的原因是什么?
Yes it differs but not in all, your question cannot have a direct answer as it's yes and no, Some of libraries do update the last ones or add up to them but u would use the older as they still have methods which are not repeated in the newer ones due to the no need for an edit是的,它有所不同,但并非完全不同,您的问题不能有直接的答案,因为它是肯定的和否定的,一些库确实更新了最后一个或添加到它们,但你会使用旧的,因为它们仍然有没有重复的方法较新的,因为不需要编辑
The library numbers mean the version of OpengGL you use.库编号表示您使用的 OpenGL 版本。 For exemple GL20.GL_VARIABLE
mean you use OpenGL 2.0
.例如GL20.GL_VARIABLE
意味着您使用OpenGL 2.0
。 Each version of OpenGL contains the attributes, functions and variable of the previous version. OpenGL的每个版本都包含上一版本的属性、函数和变量。 So for exemple GL42.GL_ARRAY_BUFFER
is the exactly same variable as GL15.GL_ARRAY_BUFFER
.因此,例如GL42.GL_ARRAY_BUFFER
是与GL15.GL_ARRAY_BUFFER
完全相同的变量。 Moreover if you look carefully at the code you will see that GL42.GL_ARRAY_BUFFER
is not present in GL42.class
but in GL15.class
.此外,如果您仔细查看代码,您会发现GL42.GL_ARRAY_BUFFER
不在GL42.class
中,而是在GL15.class
中。 So there is absolutely no difference between the two.所以两者绝对没有区别。 But it's stil recommended to use the most minimal version required for a feature because:但仍建议使用功能所需的最低版本,因为:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.