本文整理了Java中com.badlogic.gdx.Graphics.getGLVersion()
方法的一些代码示例,展示了Graphics.getGLVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graphics.getGLVersion()
方法的具体详情如下:
包路径:com.badlogic.gdx.Graphics
类名称:Graphics
方法名:getGLVersion
暂无
代码示例来源:origin: libgdx/libgdx
@Override
public void prepare () {
if (isPrepared) throw new GdxRuntimeException("Already prepared");
if (!isGpuOnly) {
int amountOfFloats = 4;
if (Gdx.graphics.getGLVersion().getType().equals(GLVersion.Type.OpenGL)) {
if (internalFormat == GL30.GL_RGBA16F || internalFormat == GL30.GL_RGBA32F) amountOfFloats = 4;
if (internalFormat == GL30.GL_RGB16F || internalFormat == GL30.GL_RGB32F) amountOfFloats = 3;
if (internalFormat == GL30.GL_RG16F || internalFormat == GL30.GL_RG32F) amountOfFloats = 2;
if (internalFormat == GL30.GL_R16F || internalFormat == GL30.GL_R32F) amountOfFloats = 1;
}
this.buffer = BufferUtils.newFloatBuffer(width * height * amountOfFloats);
}
isPrepared = true;
}
代码示例来源:origin: libgdx/libgdx
@Override
public void prepare () {
if (isPrepared) throw new GdxRuntimeException("Already prepared");
if (!isGpuOnly) {
int amountOfFloats = 4;
if (Gdx.graphics.getGLVersion().getType().equals(GLVersion.Type.OpenGL)) {
if (internalFormat == GL30.GL_RGBA16F || internalFormat == GL30.GL_RGBA32F) amountOfFloats = 4;
if (internalFormat == GL30.GL_RGB16F || internalFormat == GL30.GL_RGB32F) amountOfFloats = 3;
if (internalFormat == GL30.GL_RG16F || internalFormat == GL30.GL_RG32F) amountOfFloats = 2;
if (internalFormat == GL30.GL_R16F || internalFormat == GL30.GL_R32F) amountOfFloats = 1;
}
this.buffer = BufferUtils.newFloatBuffer(width * height * amountOfFloats);
}
isPrepared = true;
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
@Override
public void prepare () {
if (isPrepared) throw new GdxRuntimeException("Already prepared");
if (!isGpuOnly) {
int amountOfFloats = 4;
if (Gdx.graphics.getGLVersion().getType().equals(GLVersion.Type.OpenGL)) {
if (internalFormat == GL30.GL_RGBA16F || internalFormat == GL30.GL_RGBA32F) amountOfFloats = 4;
if (internalFormat == GL30.GL_RGB16F || internalFormat == GL30.GL_RGB32F) amountOfFloats = 3;
if (internalFormat == GL30.GL_RG16F || internalFormat == GL30.GL_RG32F) amountOfFloats = 2;
if (internalFormat == GL30.GL_R16F || internalFormat == GL30.GL_R32F) amountOfFloats = 1;
}
this.buffer = BufferUtils.newFloatBuffer(width * height * amountOfFloats);
}
isPrepared = true;
}
内容来源于网络,如有侵权,请联系作者删除!