• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DefaultTextureBinder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onInitialize

import com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder; //导入依赖的package包/类
@Override
protected void onInitialize() {
  if (removeOld) {
    clearOld();
  }

  ForgE.blocks.loadAtlasAndUvsIfNull();
  this.levelEnv            = new LevelEnv();
  this.shader              = (TerrainShader)ForgE.shaders.get("block-preview");

  this.renderContext       = new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
  this.camera              = new PerspectiveCamera(40, PREVIEW_SIZE/2, PREVIEW_SIZE/2);
  //this.buffer              = new FrameBuffer(Pixmap.Format.RGBA8888, PREVIEW_SIZE, PREVIEW_SIZE, true);
  camera.near = 0.01f;
  camera.far  = 5f;
  camera.position.set(0f, 2.5f, 0f);
  camera.lookAt(new Vector3(0.2f,2.35f,0.2f));
  camera.update();

  this.blocks = ForgE.blocks.list();
  this.i      = 1;
}
 
开发者ID:macbury,项目名称:ForgE,代码行数:23,代码来源:BlockPreviews.java


示例2: Level

import com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder; //导入依赖的package包/类
public Level(LevelState state, TerrainGeometryProvider geometryProvider) {
  this.colorShaderProvider      = new ShaderProvider();
  this.depthShaderProvider      = new DepthShaderProvider();

  this.env                      = state.env;
  this.state                    = state;
  this.terrainMap               = state.terrainMap;
  this.terrainGeometryProvider  = geometryProvider;
  this.postProcessing           = new PostProcessingManager(ForgE.files.internal("postprocessing:default.json"));
  this.renderContext            = new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));

  this.octree                   = OctreeNode.root();

  this.batch                    = new VoxelBatch(renderContext, colorShaderProvider);
  this.camera                   = env.mainCamera;
  this.frustrumDebugger         = new FrustrumDebugAndRenderer();
  frustrumDebugger.add(camera);
  frustrumDebugger.add(env.mainLight.getShadowCamera());
  this.terrainEngine            = new TerrainEngine(this);
  this.entities                 = new EntitySystemsManager(this);

  octree.setBounds(terrainMap.getBounds(ChunkMap.TERRAIN_TILE_SIZE));
}
 
开发者ID:macbury,项目名称:ForgE,代码行数:24,代码来源:Level.java


示例3: initialize

import com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder; //导入依赖的package包/类
@Override
protected void initialize() {
  displayableCollections = new Array<Array<? extends Displayable>>();

  modelDisplayables = new Array<ModelDisplayable>();
  displayableCollections.add(modelDisplayables);

  decalDisplayables = new Array<DecalDisplayable>();
  displayableCollections.add(decalDisplayables);

  renderContext = new RenderContext(
      new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED));
  renderContext.setCullFace(GL20.GL_BACK);

  modelBatch = new ModelBatch(renderContext,
                              new DefaultShaderProvider(),
                              new HelixRenderableSorter());

  decalBatch = new DecalBatch(new CameraGroupStrategy(camera));

  spriteBatch = new SpriteBatch();
}
 
开发者ID:fauu,项目名称:HelixEngine,代码行数:23,代码来源:RenderingSystem.java


示例4: setup

import com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder; //导入依赖的package包/类
@Override
public boolean setup() {

	modelBatch = new ModelBatch(new DefaultShaderProvider());

	lights = new Environment();
	lights.set(new ColorAttribute(ColorAttribute.AmbientLight, 1.0f, 1.0f, 1.0f, 1.f));
	lights.add(new DirectionalLight().set(0.3f, 0.3f, 0.3f, 0, 1, -0.2f));

	cam = new MapCamera(mMap);

	renderContext =
	        new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));

	// shader = new DefaultShader(renderable.material,
	// renderable.mesh.getVertexAttributes(), true, false, 1, 0, 0, 0);
	// shader.init();

	return true;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:21,代码来源:GdxModelRenderer.java


示例5: ModelBatch

import com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder; //导入依赖的package包/类
/** Construct a ModelBatch, using this constructor makes you responsible for calling context.begin() and context.end() yourself.
 * @param context The {@link RenderContext} to use.
 * @param shaderProvider The {@link ShaderProvider} to use, will be disposed when this ModelBatch is disposed.
 * @param sorter The {@link RenderableSorter} to use. */
public ModelBatch (final RenderContext context, final ShaderProvider shaderProvider, final RenderableSorter sorter) {
	this.sorter = (sorter == null) ? new DefaultRenderableSorter() : sorter;
	this.ownContext = (context == null);
	this.context = (context == null) ? new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1)) : context;
	this.shaderProvider = (shaderProvider == null) ? new DefaultShaderProvider() : shaderProvider;
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:11,代码来源:ModelBatch.java


示例6: onInitialize

import com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder; //导入依赖的package包/类
@Override
protected void onInitialize() {
  this.renderContext       = new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
  this.camera              = new PerspectiveCamera(67, 64, 64);
}
 
开发者ID:macbury,项目名称:ForgE,代码行数:6,代码来源:PreviewScreen.java


示例7: GameLevelScreen

import com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder; //导入依赖的package包/类
public GameLevelScreen(LevelFile levelDef) {
  this.gameObjectsTweenManager = new TweenManager();
  this.uiTweenManager          = new TweenManager();
  this.renderContext      = new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
  this.entities           = new ArrayList<Entity>();
  this.perspectiveCamera  = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());

  levelDefinition         = levelDef;

  this.map                = new Map(levelDefinition.geometryFile());
  perspectiveCamera.position.set(0, 0, 0);
  perspectiveCamera.near = 0.1f;
  perspectiveCamera.far = 50f;
  perspectiveCamera.update(true);

  this.cameraController = new RTSCameraController();
  cameraController.setCamera(perspectiveCamera);
  cameraController.setCenter(0, 0);
  cameraController.setEnabled(true);

  environment = new Environment();
  environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.3f, 0.3f, 0.3f, 1f));

  this.cellShadingCompositor = new LevelCompositor(renderContext);

  this.robot = BotLogic.entities.robot();
  this.robot.led = BotLogic.entities.led();

  addEntity(this.robot);
  addEntity(this.robot.led);

  colorModelBatch = new ModelBatch(renderContext);
  decalBatch      = new DecalBatch();

  decalBatch.setGroupStrategy(new CameraGroupStrategy(perspectiveCamera));

  DepthShader.Config depthConfig     = new DepthShader.Config(Gdx.files.internal("shaders/depth.vertex").readString(), Gdx.files.internal("shaders/depth.frag").readString());
  depthConfig.defaultCullFace        = GL20.GL_BACK;
  depthConfig.depthBufferOnly        = false;
  depthModelBatch = new ModelBatch(renderContext, new DepthShaderProvider(depthConfig));

  map.environment = environment;
  this.controller = new GameController(this);
  reset();

  environment.set(new ColorAttribute(ColorAttribute.Fog, 0f, 0f, 0f, 1f));
  environment.add(new DirectionalLight().set(new Color(.4f,.4f, .4f, 0.1f), new Vector3(1,-1,0)));
  BotLogic.audio.mainMenuMusic.play();
}
 
开发者ID:macbury,项目名称:BotLogic,代码行数:50,代码来源:GameLevelScreen.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AndroidListener类代码示例发布时间:2022-05-22
下一篇:
Java Region类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap