List of usage examples for org.lwjgl.opengl ARBTextureCubeMap GL_TEXTURE_CUBE_MAP_ARB
int GL_TEXTURE_CUBE_MAP_ARB
To view the source code for org.lwjgl.opengl ARBTextureCubeMap GL_TEXTURE_CUBE_MAP_ARB.
Click Source Link
From source file:com.ardor3d.scene.state.lwjgl.LwjglTextureStateUtil.java
License:Open Source License
private static void disableTexturing(final TextureUnitRecord unitRecord, final TextureStateRecord record, final int unit, final Type exceptedType, final ContextCapabilities caps) { if (exceptedType != Type.TwoDimensional) { if (!unitRecord.isValid() || unitRecord.enabled[Type.TwoDimensional.ordinal()]) { // Check we are in the right unit checkAndSetUnit(unit, record, caps); GL11.glDisable(GL11.GL_TEXTURE_2D); unitRecord.enabled[Type.TwoDimensional.ordinal()] = false; }/*from w w w . j a v a2 s . c o m*/ } if (exceptedType != Type.OneDimensional) { if (!unitRecord.isValid() || unitRecord.enabled[Type.OneDimensional.ordinal()]) { // Check we are in the right unit checkAndSetUnit(unit, record, caps); GL11.glDisable(GL11.GL_TEXTURE_1D); unitRecord.enabled[Type.OneDimensional.ordinal()] = false; } } if (caps.isTexture3DSupported() && exceptedType != Type.ThreeDimensional) { if (!unitRecord.isValid() || unitRecord.enabled[Type.ThreeDimensional.ordinal()]) { // Check we are in the right unit checkAndSetUnit(unit, record, caps); GL11.glDisable(GL12.GL_TEXTURE_3D); unitRecord.enabled[Type.ThreeDimensional.ordinal()] = false; } } if (caps.isTextureCubeMapSupported() && exceptedType != Type.CubeMap) { if (!unitRecord.isValid() || unitRecord.enabled[Type.CubeMap.ordinal()]) { // Check we are in the right unit checkAndSetUnit(unit, record, caps); GL11.glDisable(ARBTextureCubeMap.GL_TEXTURE_CUBE_MAP_ARB); unitRecord.enabled[Type.CubeMap.ordinal()] = false; } } }
From source file:com.ardor3d.scene.state.lwjgl.LwjglTextureStateUtil.java
License:Open Source License
private static void disableTexturing(final TextureUnitRecord unitRecord, final TextureStateRecord record, final int unit, final ContextCapabilities caps) { if (!unitRecord.isValid() || unitRecord.enabled[Type.TwoDimensional.ordinal()]) { // Check we are in the right unit checkAndSetUnit(unit, record, caps); GL11.glDisable(GL11.GL_TEXTURE_2D); unitRecord.enabled[Type.TwoDimensional.ordinal()] = false; }/*from w w w. ja v a 2 s. co m*/ if (!unitRecord.isValid() || unitRecord.enabled[Type.OneDimensional.ordinal()]) { // Check we are in the right unit checkAndSetUnit(unit, record, caps); GL11.glDisable(GL11.GL_TEXTURE_1D); unitRecord.enabled[Type.OneDimensional.ordinal()] = false; } if (caps.isTexture3DSupported()) { if (!unitRecord.isValid() || unitRecord.enabled[Type.ThreeDimensional.ordinal()]) { // Check we are in the right unit checkAndSetUnit(unit, record, caps); GL11.glDisable(GL12.GL_TEXTURE_3D); unitRecord.enabled[Type.ThreeDimensional.ordinal()] = false; } } if (caps.isTextureCubeMapSupported()) { if (!unitRecord.isValid() || unitRecord.enabled[Type.CubeMap.ordinal()]) { // Check we are in the right unit checkAndSetUnit(unit, record, caps); GL11.glDisable(ARBTextureCubeMap.GL_TEXTURE_CUBE_MAP_ARB); unitRecord.enabled[Type.CubeMap.ordinal()] = false; } } }
From source file:com.ardor3d.scene.state.lwjgl.LwjglTextureStateUtil.java
License:Open Source License
/** * Check if the wrap mode of this particular texture has been changed and apply as needed. * // ww w . ja v a2 s.c o m * @param cubeMap * our texture object * @param texRecord * our record of the last state of the unit in gl * @param record */ public static void applyWrap(final TextureCubeMap cubeMap, final TextureRecord texRecord, final int unit, final TextureStateRecord record, final ContextCapabilities caps) { if (!caps.isTextureCubeMapSupported()) { return; } final int wrapS = getGLWrap(cubeMap.getWrap(WrapAxis.S), caps); final int wrapT = getGLWrap(cubeMap.getWrap(WrapAxis.T), caps); final int wrapR = getGLWrap(cubeMap.getWrap(WrapAxis.R), caps); if (!texRecord.isValid() || texRecord.wrapS != wrapS) { checkAndSetUnit(unit, record, caps); GL11.glTexParameteri(ARBTextureCubeMap.GL_TEXTURE_CUBE_MAP_ARB, GL11.GL_TEXTURE_WRAP_S, wrapS); texRecord.wrapS = wrapS; } if (!texRecord.isValid() || texRecord.wrapT != wrapT) { checkAndSetUnit(unit, record, caps); GL11.glTexParameteri(ARBTextureCubeMap.GL_TEXTURE_CUBE_MAP_ARB, GL11.GL_TEXTURE_WRAP_T, wrapT); texRecord.wrapT = wrapT; } if (!texRecord.isValid() || texRecord.wrapR != wrapR) { checkAndSetUnit(unit, record, caps); GL11.glTexParameteri(ARBTextureCubeMap.GL_TEXTURE_CUBE_MAP_ARB, GL12.GL_TEXTURE_WRAP_R, wrapR); texRecord.wrapR = wrapR; } }
From source file:com.ardor3d.scene.state.lwjgl.LwjglTextureStateUtil.java
License:Open Source License
public static int getGLType(final Type type) { switch (type) { case TwoDimensional: return GL11.GL_TEXTURE_2D; case OneDimensional: return GL11.GL_TEXTURE_1D; case ThreeDimensional: return GL12.GL_TEXTURE_3D; case CubeMap: return ARBTextureCubeMap.GL_TEXTURE_CUBE_MAP_ARB; }// w w w.j av a2s.com throw new IllegalArgumentException("invalid texture type: " + type); }