Jump to content

[1.8.9] Hard Time with rendering


Waabbuffet

Recommended Posts

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 :P). I would appreciate if someone could explain why it isnt working/how to get it to work.

 

Link to comment
Share on other sites

What you have here is an almost pure GL question. Try searching for applicable GL threads on the web.

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.

Link to comment
Share on other sites

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.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

All of your verts are the same.  You've drawn a 0-size...triangle.

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.

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.