本文整理汇总了Java中com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder.WEIGHTED属性的典型用法代码示例。如果您正苦于以下问题:Java DefaultTextureBinder.WEIGHTED属性的具体用法?Java DefaultTextureBinder.WEIGHTED怎么用?Java DefaultTextureBinder.WEIGHTED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.badlogic.gdx.graphics.g3d.utils.DefaultTextureBinder
的用法示例。
在下文中一共展示了DefaultTextureBinder.WEIGHTED属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onInitialize
@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;
}
示例2: Level
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));
}
示例3: initialize
@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();
}
示例4: setup
@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;
}
示例5: ModelBatch
/** 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;
}
示例6: onInitialize
@Override
protected void onInitialize() {
this.renderContext = new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
this.camera = new PerspectiveCamera(67, 64, 64);
}
示例7: GameLevelScreen
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();
}