当前位置: 首页>>代码示例>>Java>>正文


Java Cubemap类代码示例

本文整理汇总了Java中com.badlogic.gdx.graphics.Cubemap的典型用法代码示例。如果您正苦于以下问题:Java Cubemap类的具体用法?Java Cubemap怎么用?Java Cubemap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Cubemap类属于com.badlogic.gdx.graphics包,在下文中一共展示了Cubemap类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCubeMap

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
/**
 * @return Cubemap used for the environmental cubemap
 */
public Cubemap getCubeMap() {
	if (mCubemap == null) {
		Texture back = mAssetManager.get("3D/cubemap/background_back.jpg", Texture.class);
		Texture front = mAssetManager.get("3D/cubemap/background_front.jpg", Texture.class);
		Texture up = mAssetManager.get("3D/cubemap/background_up.jpg", Texture.class);
		Texture down = mAssetManager.get("3D/cubemap/background_down.jpg", Texture.class);
		Texture left = mAssetManager.get("3D/cubemap/background_left.jpg", Texture.class);
		Texture right = mAssetManager.get("3D/cubemap/background_right.jpg", Texture.class);

		FacedCubemapData data = new FacedCubemapData(right.getTextureData(), left.getTextureData(), up.getTextureData(),
				down.getTextureData(), front.getTextureData(), back.getTextureData());
		return new Cubemap(data);
	} else {
		return mCubemap;
	}
}
 
开发者ID:nkarasch,项目名称:ChessGDX,代码行数:20,代码来源:AssetHandler.java

示例2: onSurfaceCreated

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
@Override
public void onSurfaceCreated (javax.microedition.khronos.opengles.GL10 gl, EGLConfig config) {
	eglContext = ((EGL10)EGLContext.getEGL()).eglGetCurrentContext();
	setupGL(gl);
	logConfig(config);
	updatePpi();

	Mesh.invalidateAllMeshes(app);
	Texture.invalidateAllTextures(app);
	Cubemap.invalidateAllCubemaps(app);
	ShaderProgram.invalidateAllShaderPrograms(app);
	FrameBuffer.invalidateAllFrameBuffers(app);

	logManagedCachesStatus();

	Display display = app.getWindowManager().getDefaultDisplay();
	this.width = display.getWidth();
	this.height = display.getHeight();
	this.mean = new WindowedMean(5);
	this.lastFrameTime = System.nanoTime();

	gl.glViewport(0, 0, this.width, this.height);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:24,代码来源:AndroidGraphics.java

示例3: onSurfaceCreated

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
@Override
public void onSurfaceCreated (EGLConfig config) {
   eglContext = ((EGL10)EGLContext.getEGL()).eglGetCurrentContext();
   setupGL();
   logConfig(config);
   updatePpi();

   Mesh.invalidateAllMeshes(app);
   Texture.invalidateAllTextures(app);
   Cubemap.invalidateAllCubemaps(app);
   ShaderProgram.invalidateAllShaderPrograms(app);
   FrameBuffer.invalidateAllFrameBuffers(app);

   logManagedCachesStatus();

   Point outSize = new Point();
   Display display = app.getWindowManager().getDefaultDisplay();
   display.getSize(outSize);
   this.width = outSize.x;
   this.height = outSize.y;
   this.mean = new WindowedMean(5);
   this.lastFrameTime = System.nanoTime();

   gl20.glViewport(0, 0, this.width, this.height);
}
 
开发者ID:raphaelbruno,项目名称:ZombieInvadersVR,代码行数:26,代码来源:CardBoardGraphics.java

示例4: clearManagedCaches

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public void clearManagedCaches () {
   Mesh.clearAllMeshes(app);
   Texture.clearAllTextures(app);
   Cubemap.clearAllCubemaps(app);
   ShaderProgram.clearAllShaderPrograms(app);
   FrameBuffer.clearAllFrameBuffers(app);

   logManagedCachesStatus();
}
 
开发者ID:raphaelbruno,项目名称:ZombieInvadersVR,代码行数:10,代码来源:CardBoardGraphics.java

示例5: logManagedCachesStatus

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
protected void logManagedCachesStatus () {
   Gdx.app.log(LOG_TAG, Mesh.getManagedStatus());
   Gdx.app.log(LOG_TAG, Texture.getManagedStatus());
   Gdx.app.log(LOG_TAG, Cubemap.getManagedStatus());
   Gdx.app.log(LOG_TAG, ShaderProgram.getManagedStatus());
   Gdx.app.log(LOG_TAG, FrameBuffer.getManagedStatus());
}
 
开发者ID:raphaelbruno,项目名称:ZombieInvadersVR,代码行数:8,代码来源:CardBoardGraphics.java

示例6: loadReflection

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public void loadReflection(String refl){
    ref=new Cubemap(Gdx.files.internal("cubemaps/" + refl + "_c00.bmp"), Gdx.files.internal("cubemaps/" + refl + "_c01.bmp"),
            Gdx.files.internal("cubemaps/" + refl + "_c02.bmp"), Gdx.files.internal("cubemaps/" + refl + "_c03.bmp"),
            Gdx.files.internal("cubemaps/" + refl + "_c04.bmp"), Gdx.files.internal("cubemaps/" + refl + "_c05.bmp"));
    ref.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
    ref.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
}
 
开发者ID:PWorlds,项目名称:LibGDX-PBR,代码行数:8,代码来源:PBRShader.java

示例7: loadObject

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
@Override
protected Cubemap loadObject(FileHandle file) {
  Array<TextureData> textures = new Array<TextureData>();
  for(String sideName : SIDES) {
    FileHandle sideHandle = Gdx.files.internal(file.pathWithoutExtension() + sideName + "." + file.extension());
    if (sideHandle.exists()) {
      TextureAsset sideAsset = manager.getTexture(sideHandle.file().getAbsolutePath());
      Texture texture        = sideAsset.get();
      addDependency(sideAsset);
      textures.add(texture.getTextureData());
    } else {
      throw new GdxRuntimeException("Could not find " + sideHandle.path());
    }
  }
  Cubemap cm = new Cubemap(
      textures.get(0),
      textures.get(1),
      textures.get(2),
      textures.get(3),
      textures.get(4),
      textures.get(5)
  );

  cm.setWrap(Texture.TextureWrap.ClampToEdge, Texture.TextureWrap.ClampToEdge);
  cm.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
  return cm;
}
 
开发者ID:macbury,项目名称:ForgE,代码行数:28,代码来源:CubemapAsset.java

示例8: clearManagedCaches

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public void clearManagedCaches () {
	Mesh.clearAllMeshes(app);
	Texture.clearAllTextures(app);
	Cubemap.clearAllCubemaps(app);
	ShaderProgram.clearAllShaderPrograms(app);
	FrameBuffer.clearAllFrameBuffers(app);

	logManagedCachesStatus();
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:10,代码来源:AndroidGraphics.java

示例9: logManagedCachesStatus

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
protected void logManagedCachesStatus () {
	Gdx.app.log(LOG_TAG, Mesh.getManagedStatus());
	Gdx.app.log(LOG_TAG, Texture.getManagedStatus());
	Gdx.app.log(LOG_TAG, Cubemap.getManagedStatus());
	Gdx.app.log(LOG_TAG, ShaderProgram.getManagedStatus());
	Gdx.app.log(LOG_TAG, FrameBuffer.getManagedStatus());
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:8,代码来源:AndroidGraphics.java

示例10: createIrradiance

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public static IBLAttribute createIrradiance(final Cubemap cubemap) {
    return new IBLAttribute(IrradianceType, cubemap);
}
 
开发者ID:MovementSpeed,项目名称:nhglib,代码行数:4,代码来源:IBLAttribute.java

示例11: createPrefilter

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public static IBLAttribute createPrefilter(final Cubemap cubemap) {
    return new IBLAttribute(PrefilterType, cubemap);
}
 
开发者ID:MovementSpeed,项目名称:nhglib,代码行数:4,代码来源:IBLAttribute.java

示例12: IBLAttribute

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public <T extends Cubemap> IBLAttribute(final long type, final TextureDescriptor<T> textureDescription) {
    this(type);
    this.textureDescription.set(textureDescription);
}
 
开发者ID:MovementSpeed,项目名称:nhglib,代码行数:5,代码来源:IBLAttribute.java

示例13: set

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public void set(final Cubemap cubemap) {
    textureDescription.texture = cubemap;
}
 
开发者ID:MovementSpeed,项目名称:nhglib,代码行数:4,代码来源:IBLAttribute.java

示例14: getSkyboxCubemap

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public Cubemap getSkyboxCubemap() {
  if (skyboxCubemap == null) {
    skyboxCubemap = skyboxAsset.get();
  }
  return skyboxCubemap;
}
 
开发者ID:macbury,项目名称:ForgE,代码行数:7,代码来源:CubemapSkybox.java

示例15: CubemapAttribute

import com.badlogic.gdx.graphics.Cubemap; //导入依赖的package包/类
public CubemapAttribute (final long type) {
	super(type);
	if (!is(type)) throw new GdxRuntimeException("Invalid type specified");
	textureDescription = new TextureDescriptor<Cubemap>();
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:6,代码来源:CubemapAttribute.java


注:本文中的com.badlogic.gdx.graphics.Cubemap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。