Waabbuffet Posted March 6, 2016 Posted March 6, 2016 I am having a hard time getting a box to render around a structure like http://imgur.com/1FIvlbA... Right now I am just trying to get something to show up on the screen here is what I have public void renderBox(){ GlStateManager.pushMatrix(); Tessellator tessellator = Tessellator.getInstance(); WorldRenderer wr = tessellator.getWorldRenderer(); wr.pos(d26, d18, d19).color(200, 0, 0, 100).endVertex(); wr.pos(d26, d18, d19).color(200, 0, 0, 100).endVertex(); wr.pos(d26, d18, d19).color(200, 0, 0, 100).endVertex(); tessellator.draw(); GlStateManager.popMatrix(); } I dont really understand using tessellator or Worldrenderer (as you can prob tell from my code ). I would appreciate if someone could explain why it isnt working/how to get it to work. Quote
jeffryfisher Posted March 6, 2016 Posted March 6, 2016 What you have here is an almost pure GL question. Try searching for applicable GL threads on the web. Quote The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
Ernio Posted March 7, 2016 Posted March 7, 2016 Tesselator (currently rather WorldRenderer) is a "mirror" of standard GL drawing. Basic examples can be found in Gui.class methods. Sadly they are using int params and RGB or I think ARGB (I prefere RGBA). This is prettu much how tess works in GL format: https://en.wikibooks.org/wiki/OpenGL_Programming/GLStart/Tut3 Note: QUADS are anti-clockwise. Quote 1.7.10 is no longer supported by forge, you are on your own.
Draco18s Posted March 7, 2016 Posted March 7, 2016 All of your verts are the same. You've drawn a 0-size...triangle. Quote 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.
Waabbuffet Posted March 7, 2016 Author Posted March 7, 2016 All of your verts are the same. You've drawn a 0-size...triangle. Oh yea thanks...I changed it but it didnt work im not to sure Tesselator (currently rather WorldRenderer) is a "mirror" of standard GL drawing. Basic examples can be found in Gui.class methods. Sadly they are using int params and RGB or I think ARGB (I prefere RGBA). This is prettu much how tess works in GL format: https://en.wikibooks.org/wiki/OpenGL_Programming/GLStart/Tut3 Note: QUADS are anti-clockwise. thanks...Ill take a look at it Quote
Waabbuffet Posted March 7, 2016 Author Posted March 7, 2016 Ok I give up...Been trying to get this to work for hours im not sure. Quote
Recommended Posts
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.