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

Java Attributes类代码示例

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

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



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

示例1: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
public void render(final Renderable renderable, final Attributes combinedAttributes)  {
    boolean firstCall = true;
    for(final LightWrapper light : lights) {
        light.applyToShader(program);
        if(firstCall){
            context.setDepthTest(GL20.GL_LEQUAL);
            context.setBlending(false, GL20.GL_ONE, GL20.GL_ONE);
            super.render(renderable, combinedAttributes);
            firstCall = false;
        }else{
            context.setDepthTest(GL20.GL_EQUAL);
            context.setBlending(true, GL20.GL_ONE, GL20.GL_ONE);
            renderable.meshPart.render(program, false);
        }
    }
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:18,代码来源:ShadowMapShader.java


示例2: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
public void render(final Renderable renderable, final Attributes combinedAttributes) {
    renderable.meshPart.primitiveType = GL20.GL_TRIANGLES;
    final boolean[] firstCall = {true};
    lights.forEach(l -> {
        l.applyToShader(program);
        if(Gdx.input.isKeyJustPressed(Input.Keys.L))
        for (String s : program.getUniforms()) {
            System.out.println(s);
        }
        if(true) {
            context.setDepthTest(GL20.GL_LEQUAL);
            context.setBlending(false, GL20.GL_ONE, GL20.GL_ONE);
            super.render(renderable, combinedAttributes);
            firstCall[0] = false;
        }else{
            context.setDepthTest(GL20.GL_EQUAL);
            context.setBlending(true, GL20.GL_ONE, GL20.GL_ONE);
            MeshPart part = renderable.meshPart;
            part.mesh.render(program, part.primitiveType, part.offset, part.size, false);
        }
    });
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:24,代码来源:VolumetricDepthShader.java


示例3: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
	public void render(Renderable renderable, Attributes combinedAttributes)
	{

//		context.setCullFace(GL_BACK);
		// Classic depth test
		context.setDepthTest(GL20.GL_LEQUAL);
		// Deactivate blending on first pass
		context.setBlending(false, GL20.GL_ONE, GL20.GL_ONE);

		context.setDepthMask(true);

		if (!combinedAttributes.has(BlendingAttribute.Type))
			context.setBlending(false, GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);

		super.render(renderable, combinedAttributes);


//		program.begin();
//		super.render(renderable, combinedAttributes);
//		program.end();
	}
 
开发者ID:arksu,项目名称:origin,代码行数:23,代码来源:ShadowShader.java


示例4: set

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
public void set (BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
	if (renderable.environment == null)
		shader.program.setUniform3fv(shader.loc(inputID), ones, 0, ones.length);
	else {
		renderable.worldTransform.getTranslation(tmpV1);
		if (renderable.environment.has(ColorAttribute.AmbientLight))
			cacheAmbientCubemap.set(((ColorAttribute)renderable.environment.get(ColorAttribute.AmbientLight)).color);

		for (int i = dirLightsOffset; i < renderable.environment.directionalLights.size; i++)
			cacheAmbientCubemap.add(renderable.environment.directionalLights.get(i).color,
				renderable.environment.directionalLights.get(i).direction);

		for (int i = pointLightsOffset; i < renderable.environment.pointLights.size; i++)
			cacheAmbientCubemap.add(renderable.environment.pointLights.get(i).color,
				renderable.environment.pointLights.get(i).position, tmpV1,
				renderable.environment.pointLights.get(i).intensity);

		cacheAmbientCubemap.clamp();

		shader.program.setUniform3fv(shader.loc(inputID), cacheAmbientCubemap.data, 0, cacheAmbientCubemap.data.length);
	}
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:24,代码来源:DefaultShader.java


示例5: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
public void render(final Renderable renderable, final Attributes combinedAttributes)  {
    try{
        super.render(renderable, combinedAttributes);
    }catch (NullPointerException npe) {

    }
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:9,代码来源:SimpleTextureShader.java


示例6: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override public void render(final Renderable renderable, final Attributes combinedAttributes) {
    renderable.meshPart.primitiveType = info.primitive.id;
    try {

        super.render(renderable, combinedAttributes);
    }catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:10,代码来源:DynamicShader.java


示例7: set

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
public void set(BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes)
{
	if (com.a2client.Config.getInstance()._renderShadows)
	{
		shader.set(inputID, Render.toShadowMapSpace);
	}
}
 
开发者ID:arksu,项目名称:origin,代码行数:9,代码来源:ModelShader.java


示例8: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
public void render (Renderable renderable, final Attributes combinedAttributes) {
	for (int u, i = 0; i < localUniforms.size; ++i)
		if (setters.get(u = localUniforms.get(i)) != null) setters.get(u).set(this, u, renderable, combinedAttributes);
	if (currentMesh != renderable.mesh) {
		if (currentMesh != null) currentMesh.unbind(program, tempArray.items);
		currentMesh = renderable.mesh;
		currentMesh.bind(program, getAttributeLocations(renderable.mesh.getVertexAttributes()));
	}
	renderable.mesh.render(program, renderable.primitiveType, renderable.meshPartOffset, renderable.meshPartSize, false);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:11,代码来源:BaseShader.java


示例9: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
public void render(final Renderable renderable, final Attributes combinedAttributes)  {
    super.render(renderable, combinedAttributes);
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:5,代码来源:NormalTextureShader.java


示例10: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
public void render(final Renderable renderable, final Attributes combinedAttributes)
{
    super.render(renderable, combinedAttributes);
}
 
开发者ID:ncguy2,项目名称:Argent,代码行数:6,代码来源:DepthMapShader.java


示例11: render

import com.badlogic.gdx.graphics.g3d.Attributes; //导入依赖的package包/类
@Override
public void render(Renderable renderable, Attributes combinedAttributes) {
    setPrimitiveType(renderable);
    super.render(renderable, combinedAttributes);
    restorePrimitiveType(renderable);
}
 
开发者ID:msk610,项目名称:Chemtris,代码行数:7,代码来源:WireframeShader.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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