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

Java ImmediateModeRenderer20类代码示例

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

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



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

示例1: ScreenExtensions

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public ScreenExtensions(GameManager gameManager) {
    this.gameManager = gameManager;
    manager = ManagerAssets.getInstance();
    addExtensions = this;
    camera = new PerspectiveCamera(40, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
    camera.position.set(0, 0, Gdx.graphics.getHeight() * 0.183f);//initial 180
    camera.lookAt(0, 0, 0);
    camera.far = 2500;
    camera.near = 1;
    camera.update();
    controller = new CameraInputController(camera);
    cam = new OrthographicCamera();
    batchsprite = new SpriteBatch();

    renderer = new ImmediateModeRenderer20(false, true, 1);
    gd = new GestureDetector(this);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:18,代码来源:ScreenExtensions.java


示例2: CombatFitght

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public CombatFitght(ScreenCombat screen,float pos) {
        cy = pos;
        managerAssets = ManagerAssets.getInstance();
        informationProfile = InformationProfile.getInstance();
        informationEnklave = InformationEnklave.getInstance();
        screenCombat = screen;
        lookup = managerAssets.getAssetsCombat().getTexture(NameFiles.progressbarcircular);
        lookup.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
//        groupturret1 = maketurret(180);
//        groupturret1.setPosition(0,pos * -0.33f);
//        groupturret2 = maketurret(-60);
//        groupturret2.setPosition(pos*0.33f,pos *0.26f);
//        groupturret3 = maketurret(60);
//        groupturret3.setPosition(-pos*0.33f,pos*0.26f);
        groupShield = makeShieldEnklave();
        groupButtonAction = makeButtonAction();
        renderer = new ImmediateModeRenderer20(false,true,1);
        informationEnklave.selectTargetEnklave = -1;
    }
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:20,代码来源:CombatFitght.java


示例3: ScreenRooms

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public ScreenRooms(GameManager gameManager) {
    this.gameManager = gameManager;
    manager = ManagerAssets.getInstance();
    camera = new PerspectiveCamera(40, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
    camera.position.set(0, 0, Gdx.graphics.getHeight()*0.183f);//initial 180
    camera.lookAt(0, 0, 0);
    camera.far = 2500;
    camera.near = 1;
    camera.update();
    cam = new OrthographicCamera();
    renderer = new ImmediateModeRenderer20(false, true, 1);
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:13,代码来源:ScreenRooms.java


示例4: GLRenderer

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public GLRenderer(final Camera camera) {
  Validate.notNull(camera);
  this.camera = camera;
  ImmediateModeRenderer20 _immediateModeRenderer20 = new ImmediateModeRenderer20(50000, false, true, 0);
  this.immediateModeRenderer = _immediateModeRenderer20;
  SpriteBatch _spriteBatch = new SpriteBatch();
  this.spriteBatch = _spriteBatch;
  ComponentLookup _instance = ComponentLookup.getInstance();
  AssetManager _component = _instance.<AssetManager>getComponent(AssetManager.class);
  BitmapFont _smallFont = _component.getSmallFont();
  this.font = _smallFont;
}
 
开发者ID:CymricNPG,项目名称:abattle,代码行数:13,代码来源:GLRenderer.java


示例5: dispose

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public ImmediateModeRenderer20 dispose() {
  ImmediateModeRenderer20 _xblockexpression = null;
  {
    this.immediateModeRenderer.dispose();
    _xblockexpression = this.immediateModeRenderer = null;
  }
  return _xblockexpression;
}
 
开发者ID:CymricNPG,项目名称:abattle,代码行数:9,代码来源:GLRenderer.java


示例6: create

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
@Override
public void create () {
	renderer = new ImmediateModeRenderer20(false, false, 0);
	spriteBatch = new SpriteBatch();
	obj = new Sprite(new Texture(Gdx.files.internal("data/badlogicsmall.jpg")));
	obj.setSize(40, 40);
	obj.setOriginCenter();
	obj2 = new Sprite(new Texture(Gdx.files.internal("data/bobrgb888-32x32.png")));
	obj2.setSize(40, 40);
	obj2.setOriginCenter();
	ZIGZAG_SCALE = Gdx.graphics.getDensity() * 96; // 96DP

	float w = Gdx.graphics.getWidth() - obj.getWidth();
	float h = Gdx.graphics.getHeight() - obj.getHeight();

	paths.add(new Bezier<Vector2>(new Vector2(0, 0), new Vector2(w, h)));
	paths.add(new Bezier<Vector2>(new Vector2(0, 0), new Vector2(0, h), new Vector2(w, h)));
	paths.add(new Bezier<Vector2>(new Vector2(0, 0), new Vector2(w, 0), new Vector2(0, h), new Vector2(w, h)));

	Vector2 cp[] = new Vector2[] {new Vector2(0, 0), new Vector2(w * 0.25f, h * 0.5f), new Vector2(0, h),
		new Vector2(w * 0.5f, h * 0.75f), new Vector2(w, h), new Vector2(w * 0.75f, h * 0.5f), new Vector2(w, 0),
		new Vector2(w * 0.5f, h * 0.25f)};
	paths.add(new BSpline<Vector2>(cp, 3, true));

	paths.add(new CatmullRomSpline<Vector2>(cp, true));

	pathLength = paths.get(currentPath).approxLength(500);
	avg_speed = speed * pathLength;

	Gdx.input.setInputProcessor(this);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:32,代码来源:PathTest.java


示例7: createWorld

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
private void createWorld() {
		dropRadius = 0.1f + dropRadiusK;
		dropRadiusPixel = (int) (dropRadius * PARTICLE_SIZE);
		dropRadiusPixel2 = dropRadiusPixel * dropRadiusPixel;
		if (IS_DESKTOP) {
//			dropTexture = new Texture("data/fluid_drop_red_64.png");
			dropTexture = new Texture("data/fluid_drop_64.png");
			dropTexture2 = new Texture("data/fluid_drop_blue_64.png");
			dropSprite = new Sprite(dropTexture);
			dropSprite.setSize(dropRadiusPixel, dropRadiusPixel);
		}
		if (IS_DESKTOP) {
			disposableParticles = new ArrayList<Particle>(SIZE);
		}
		defaultShader = new ShaderProgram(Gdx.files.internal("data/shaders/default.vert").readString(), 
				Gdx.files.internal("data/shaders/default.frag").readString());
		if (!defaultShader.isCompiled()) {
			Gdx.app.log("SHADER_LOG", "couldn't compile scene shader: " + defaultShader.getLog());
		}
		immediateRenderer = new ImmediateModeRenderer20(50000, false, true, 0);

		// On Android populate directly
		if (!IS_DESKTOP) {
			for (float j = INITIAL_HEIGHT + hpadding + 2; j < WORLD_HEIGHT - 2; j += 1.0f) {
				for (float i = -WORLD_WIDTH / 3; i < WORLD_WIDTH / 3; i += 1.0f) {
					particles.add(new Particle(i, j));
					tempParticle = particles.get(particles.size() - 1);
					tempParticle.type = (emitType);
					if (particles.size() >= ANDROID_SIZE)
						return;
				}
			}
		}
	}
 
开发者ID:omgware,项目名称:fluid-simulator-v2,代码行数:35,代码来源:FluidSimulatorSPH.java


示例8: FluidSimulatorGeneric

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public FluidSimulatorGeneric(FluidSimulatorStarter fluidSimulatorStarter) {
		this.game = fluidSimulatorStarter;
		// LibGDX single batches cannot have a size more than 5460
		batch = new SpriteBatch(IS_DESKTOP ? 5460 : ANDROID_SIZE);
		font = new BitmapFont();
		camera = new OrthographicCamera(WORLD_WIDTH, WORLD_HEIGHT);
		camera.position.set(0, (WORLD_HEIGHT / 2) - 1, 0);
		immediateRenderer = new ImmediateModeRenderer20(SIZE*6, false, true, 0);
		irt = new Renderer20(SIZE*6, false, true, 1);
		irt2 = new ImmediateModeRenderer20(SIZE*11, false, true, 1);
		shapeRenderer = new ShapeRenderer(SIZE);
		renderer = new Box2DDebugRenderer(true, true, false, true, false, false);
		
		//3D
		camera3D = new PerspectiveCamera(67, WORLD_WIDTH, WORLD_HEIGHT);
		camera3D.position.set(0, 130f, 250f);
		camera3D.lookAt(0,150f,0);
		camera3D.near = 0.1f;
		camera3D.far = 500f;
		camera3D.update();
		ModelBuilder modelBuilder = new ModelBuilder();
//        model = modelBuilder.createSphere(5f, 5f, 5f, 4, 4, GL10.GL_TRIANGLES,
//                new Material(ColorAttribute.createDiffuse(Color.GREEN)),
//                Usage.Position | Usage.Normal);
        model = modelBuilder.createBox(5f, 5f, 5f,
            new Material(ColorAttribute.createDiffuse(Color.GREEN)),
            Usage.Position | Usage.Normal);
        instance = new ModelInstance(model);
        modelBatch = new ModelBatch();
        environment = new Environment();
        environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));
        environment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, 0, -0.8f, -0.2f));
        camController = new Camera3DController(camera3D);
        camController.setFluidSimulator(this);
		
		world = new World(new Vector2(0, -9.8f), false);
		world.setContactListener(this);
	}
 
开发者ID:omgware,项目名称:fluid-simulator-v2,代码行数:39,代码来源:FluidSimulatorGeneric.java


示例9: create

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
@Override
public void create() {
	try {
		UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
	} catch (Exception e) {
		e.printStackTrace();
	}
	stage = new Stage(new ScreenViewport());
	fontBatch = new SpriteBatch();
	
	font = new BitmapFont();
	assets = new AssetManager();
	assets.load("img/gui/knob.png", Texture.class);
	assets.finishLoading();
	
	skin = new Skin(Gdx.files.internal("skin/default/uiskin.json"));
	skin.add("knob", assets.get("img/gui/knob.png", Texture.class));
	
	knobs = new Image[4];
	renderer = new ImmediateModeRenderer20(false, false, 0);
	
	Vector2[] v = new Vector2[4];
	Vector2[] w = new Vector2[4];
	
	for (int i = 0; i < knobs.length; i++) {
		knobs[i] = new Image(skin.getDrawable("knob"));
		knobs[i].setPosition(startPos[i].x, startPos[i].y);
		stage.addActor(knobs[i]);
		v[i] = new Vector2(startPos[i].x, startPos[i].y);
		w[i] = new Vector2((startPos[i].x - X) / SIZE, (startPos[i].y - X) / SIZE);
	}
	
	bezier = new Bezier<Vector2>(v);
	bezierLogic = new Bezier<Vector2>(w);
	
	stage.addListener(this);
	stage.getCamera().rotate(Vector3.Z, -270);
	
	Gdx.input.setInputProcessor(stage);
}
 
开发者ID:Dakror,项目名称:Vloxlands,代码行数:41,代码来源:BezierEditor.java


示例10: ShapeRenderer

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public ShapeRenderer (int maxVertices) {
	renderer = new ImmediateModeRenderer20(maxVertices, false, true, 0);
	projView.setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
	matrixDirty = true;
}
 
开发者ID:makigas,项目名称:tutorial-libgdx,代码行数:6,代码来源:ShapeRenderer.java


示例11: create

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
@Override
public void create () {
	renderer = new ImmediateModeRenderer20(false, true, 1);
	texture = new Texture(Gdx.files.internal("data/badlogic.jpg"));
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:6,代码来源:ImmediateModeRendererTest.java


示例12: SwipeTriStrip

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public SwipeTriStrip() {
    gl20 = new ImmediateModeRenderer20(false, true, 1);
}
 
开发者ID:lycying,项目名称:c2d-engine,代码行数:4,代码来源:FingerSwipeTest.java


示例13: DebugGeometryRenderer

import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20; //导入依赖的package包/类
public DebugGeometryRenderer() {
	renderer = new ImmediateModeRenderer20(5000, false, true, 0, new DebugShader());
}
 
开发者ID:gered,项目名称:gdx-toolbox,代码行数:4,代码来源:DebugGeometryRenderer.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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