Posted July 9, 20169 yr I've been stuck on this problem for a while now and I can't figure it out. Probs this will have and awfully easy solution, but I'm in a hurry now and I need help. What I'm trying to do is render a pole block. For the sake of getting help and not confusing you let's say it contains two parts: 1) pole part on Y axis (is basically looks like a fence post) 2) a tiny chunk facing north The problem is, when I render it just on the whole axis or just the chunk, it's normally rendered, but if I try both, the rotations get messed up and basically both parts are rotated the way and then they overlap. I'm using a rendering helper I made myself and here are a lot of custom methods, booleans, etc, so here it is with what it looks like *places inside renderTileEntityAt* vertexBuffer.begin(7, DefaultVertexFormats.POSITION_TEX); GlStateManager.pushMatrix(); GlStateManager.translate(x, y, z); renderPoleOnAxis(EnumAxis.Yaxis); **** renderPolePart(EnumDirection.NORTH); **** Tessellator.getInstance().draw(); GlStateManager.popMatrix(); **** methods contain following: 1) translation to the middle of the block 2) rotation on all axes 3) translation back to the original point 4) pushing Matrix 5) setting block bounds and textures (my customized code that does nothing special) 6) popping matrix
July 9, 20169 yr 2) rotation on all axes 4) pushing Matrix ....really? You save the state AFTER you modify it? Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
July 9, 20169 yr Author WOW, how did I not notice that, thank you Anyway, after changing the order to: 1) pushing Matrix 2) translation to the middle of the block 3) rotation on all axes 4) translation back to the original point 5) setting block bounds and textures (my customized code that does nothing special) 6) popping matrix the part of it doesn't rotate at all...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.