本文整理汇总了Java中net.minecraft.client.renderer.OpenGlHelper.shadersSupported方法的典型用法代码示例。如果您正苦于以下问题:Java OpenGlHelper.shadersSupported方法的具体用法?Java OpenGlHelper.shadersSupported怎么用?Java OpenGlHelper.shadersSupported使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.OpenGlHelper
的用法示例。
在下文中一共展示了OpenGlHelper.shadersSupported方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onEnable
import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
@Override
public void onEnable()
{
if(!OpenGlHelper.shadersSupported)
{
wurst.events.add(UpdateListener.class, this);
return;
}
if(!(mc.getRenderViewEntity() instanceof EntityPlayer))
{
setEnabled(false);
return;
}
if(mc.entityRenderer.theShaderGroup != null)
mc.entityRenderer.theShaderGroup.deleteShaderGroup();
mc.entityRenderer.shaderIndex = 19;
mc.entityRenderer.loadShader(EntityRenderer.SHADERS_TEXTURES[19]);
}
示例2: onDisable
import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
@Override
public void onDisable()
{
if(!OpenGlHelper.shadersSupported)
{
wurst.events.remove(UpdateListener.class, this);
WPlayer.removePotionEffect(WPotionEffects.NAUSEA);
return;
}
if(mc.entityRenderer.theShaderGroup != null)
{
mc.entityRenderer.theShaderGroup.deleteShaderGroup();
mc.entityRenderer.theShaderGroup = null;
}
}
示例3: loadProgram
import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public int loadProgram(String vsh, String fsh) {
if (OpenGlHelper.shadersSupported) {
int vertexShader = createShader(vsh, OpenGlHelper.GL_VERTEX_SHADER);
int fragmentShader = createShader(fsh, OpenGlHelper.GL_FRAGMENT_SHADER);
int program = OpenGlHelper.glCreateProgram();
OpenGlHelper.glAttachShader(program, vertexShader);
OpenGlHelper.glAttachShader(program, fragmentShader);
OpenGlHelper.glLinkProgram(program);
return program;
}
return 0;
}
示例4: enableBitsShader
import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
@Override
public void enableBitsShader() {
if (OpenGlHelper.shadersSupported) {
Minecraft mc = Minecraft.getMinecraft();
EntityRenderer renderer = mc.entityRenderer;
if (renderer.getShaderGroup() != null)
renderer.getShaderGroup().deleteShaderGroup();
renderer.loadShader(this.shader);
}
}
示例5: disableBitsShader
import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
@Override
public void disableBitsShader() {
if (OpenGlHelper.shadersSupported) {
EntityRenderer renderer = Minecraft.getMinecraft().entityRenderer;
if (renderer.getShaderGroup() != null && renderer.getShaderGroup().getShaderGroupName().contains("bits.json"))
renderer.getShaderGroup().deleteShaderGroup();
}
}
示例6: onEnable
import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void onEnable() {
Wrapper.getMinecraft().renderGlobal.loadRenderers();
if (OpenGlHelper.shadersSupported)
if (Wrapper.getMinecraft().getRenderViewEntity() instanceof EntityPlayer) {
if (Wrapper.getMinecraft().entityRenderer.theShaderGroup != null)
Wrapper.getMinecraft().entityRenderer.theShaderGroup.deleteShaderGroup();
Wrapper.getMinecraft().entityRenderer.shaderIndex = 19;
if (Wrapper.getMinecraft().entityRenderer.shaderIndex != EntityRenderer.SHADER_COUNT)
Wrapper.getMinecraft().entityRenderer.loadShader(EntityRenderer.SHADERS_TEXTURES[19]);
else
Wrapper.getMinecraft().entityRenderer.theShaderGroup = null;
}
}
示例7: linkProgram
import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
public void linkProgram(int program) {
if (OpenGlHelper.shadersSupported) {
OpenGlHelper.glUseProgram(program);
}
}
示例8: onUpdate
import net.minecraft.client.renderer.OpenGlHelper; //导入方法依赖的package包/类
@Override
public void onUpdate()
{
if(!OpenGlHelper.shadersSupported)
WPlayer.addPotionEffect(WPotionEffects.NAUSEA);
}