本帖最后由 roj234 于 2019-3-13 20:26 编辑
最好还能教教怎么渲染
复制代码一点反应都没有,但是方法被调用了
可能是位置不对?
ModelBiped.render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
里面的参数都是干嘛的
复制代码
最好还能教教怎么渲染
- GL11.glPushMatrix();
- float Sizelogo = 1.5F;
- GL11.glDisable(2896);
- GL11.glDisable(2884);
- GL11.glScalef(Sizelogo, Sizelogo, Sizelogo);
- GL11.glTranslatef(0.0F, 0.4F + animate / 25.0F, 0.0F);
- bind("title");
- System.out.println("Renderering...");
- GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
- GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
- renderObj("title");
- GL11.glPopMatrix();
可能是位置不对?
ModelBiped.render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
里面的参数都是干嘛的
- protected void bind(String name){
- ResourceLocation loc = res.get(name);
- if(loc != null)
- Minecraft.getMinecraft().getRenderManager().renderEngine.bindTexture(loc);
- else
- System.out.println("IS NULL");
- }
- protected void renderObj(String name){
- this.res.getObj(name).renderAll();
- (这里返回的是1.7.10forge的OBJLoader的代码)当然了被我改过以支持1.12.2
- }
本帖最后由 森林蝙蝠 于 2019-3-13 02:32 编辑
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
//调用了setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor,
Entiity entityIn)方法,你的par变量可能是反混淆没到位导致的。
}
glTexImage2D没写,不是bind了之后立刻就可以开始渲染的;
以下吐槽:
1.12有OBJLoader,方法大同小异,不应写1.7的代码;
glDisable的时候最好写GL_LIGHTING这种预设值而不是直接数字,你看着爽了别人遭殃了,还得十进制转16进制去查。
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
//调用了setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor,
Entiity entityIn)方法,你的par变量可能是反混淆没到位导致的。
}
glTexImage2D没写,不是bind了之后立刻就可以开始渲染的;
以下吐槽:
1.12有OBJLoader,方法大同小异,不应写1.7的代码;
glDisable的时候最好写GL_LIGHTING这种预设值而不是直接数字,你看着爽了别人遭殃了,还得十进制转16进制去查。