Can someone explain me the basics of OpenGL programming? The only things I know are those:
GL11.glPushMatrix(); is the beginning of OpenGL Rendering, GL11.glPopMatrix(); is the end
and some things
What I need to know:
What does those methods do:
addVertexWithUV(...)
glNormal3f(...)
startDrawingQuads(...)
setColorOpaque_F(...)
GL11.glTranslatef(...)
GL11.glColor3f
and the parameters of the renderBoomerang(...)
and last but not least: What should I do, when I want to render a cube (I mean an entity with the form of a cube)
I am really looking forward to your answer! I need every help!
Other websites don't explain it the way I understand...
Minecraft has some wrapper methods for gl11 I believe, it might be good to use those in the event of an OpenGL or lwjgl change in the future. Looking through some of the vanilla classes, especially in the client.renderer.entity folder has helped me out in the past. When you can, use techne to create models, minecraft will do all the hard stuff for you. Sorry this isn't a lot, but it's better than none.
Rollback Post to RevisionRollBack
Don't hesitate to ask me a Forge Modding question. If you can create a thread for the question instead of a PM, so others can learn from it, and PM me the link so I can find it.
The Meaning of Life, the Universe, and Everything.
Location:
Bavaria
Join Date:
4/29/2013
Posts:
166
Location:
Germany
Minecraft:
ThexXTURBOXx
Xbox:
Zocker4Live999
Member Details
I a,ready knew this link, but thanks anyway. I will definetly look through the vanilla classes. But could you explain me more about techne? I had it installed already, but i can only use it fornormal entities i believe. Because when I save a java code, it extends some mob classes.
The Meaning of Life, the Universe, and Everything.
Join Date:
5/1/2015
Posts:
52
Minecraft:
RangerPJ
Member Details
Yeah, techne only really helps for basic mob shapes, cubes and such. Not quite sure what the class you gave a link to is trying to do... If you are trying to make an entity throwable minecraft has a render class for you to use, you just pass in the item (and metadata in 1.7).
Rollback Post to RevisionRollBack
Don't hesitate to ask me a Forge Modding question. If you can create a thread for the question instead of a PM, so others can learn from it, and PM me the link so I can find it.
The Meaning of Life, the Universe, and Everything.
Location:
Bavaria
Join Date:
4/29/2013
Posts:
166
Location:
Germany
Minecraft:
ThexXTURBOXx
Xbox:
Zocker4Live999
Member Details
I tried to use my techne model for my EntityThrowable... But I can't get it working. Here is my code (under java/org/silvercatcher/reforged/render/ModelBulletMusket): https://github.com/ThexXTURBOXx/Reforged/
Don't hesitate to ask me a Forge Modding question. If you can create a thread for the question instead of a PM, so others can learn from it, and PM me the link so I can find it.
Hello guys,
I am getting really confused now...
I need someone who can explain me OpenGL Rendering. I already have an entity which extends EntityThrowable.
The only thing I have right now is this code (copied it from there out of the method "renderBoomerang"): https://github.com/Ckathode/balkons-weaponmod/blob/master/src/main/java/ckathode/weaponmod/render/RenderBoomerang.java
Can someone explain me the basics of OpenGL programming? The only things I know are those:
GL11.glPushMatrix(); is the beginning of OpenGL Rendering, GL11.glPopMatrix(); is the end
and some things
What I need to know:
What does those methods do:
addVertexWithUV(...)
glNormal3f(...)
startDrawingQuads(...)
setColorOpaque_F(...)
GL11.glTranslatef(...)
GL11.glColor3f
and the parameters of the renderBoomerang(...)
and last but not least: What should I do, when I want to render a cube (I mean an entity with the form of a cube)
I am really looking forward to your answer! I need every help!
Other websites don't explain it the way I understand...
Direct work with OpenGL can be a bit of a pain. I don't know a lot about it but here is a good start.
http://greyminecraftcoder.blogspot.co.at/2014/12/the-tessellator-and-worldrenderer-18.html
Minecraft has some wrapper methods for gl11 I believe, it might be good to use those in the event of an OpenGL or lwjgl change in the future. Looking through some of the vanilla classes, especially in the client.renderer.entity folder has helped me out in the past. When you can, use techne to create models, minecraft will do all the hard stuff for you. Sorry this isn't a lot, but it's better than none.
Don't hesitate to ask me a Forge Modding question. If you can create a thread for the question instead of a PM, so others can learn from it, and PM me the link so I can find it.
I a,ready knew this link, but thanks anyway. I will definetly look through the vanilla classes. But could you explain me more about techne? I had it installed already, but i can only use it fornormal entities i believe. Because when I save a java code, it extends some mob classes.
Techne? It is basically just a helper for vertices and normals. Instead of doing
GL11.glPushMatrix():
GL11.glRotatef(....);
GL11.glRotatef(....);
GL11.glRotatef(....);
WorldRenderer.addVericies to make a square Kinda like this but without all the try and catch
Tessellator.instance.draw(); (why mc? Why do I have to use 2 classes at the same time to render stuff in 1.8?)
GL11.glPopMatrix():
you can do
box.setRotationAngles(....);
box.draw();
Not doing mc modding that much anymore because I am making a full blown game that does not have limitations that mc has. (rip Magiology for now)
I may come back if MC fixes it's rendering pipeline.
Yeah, techne only really helps for basic mob shapes, cubes and such. Not quite sure what the class you gave a link to is trying to do... If you are trying to make an entity throwable minecraft has a render class for you to use, you just pass in the item (and metadata in 1.7).
Don't hesitate to ask me a Forge Modding question. If you can create a thread for the question instead of a PM, so others can learn from it, and PM me the link so I can find it.
The class adds a Renderer for a boomerang...
I tried to use my techne model for my EntityThrowable... But I can't get it working. Here is my code (under java/org/silvercatcher/reforged/render/ModelBulletMusket): https://github.com/ThexXTURBOXx/Reforged/
What part isn't working?
Edit: I tired it and everything seems to work.
Don't hesitate to ask me a Forge Modding question. If you can create a thread for the question instead of a PM, so others can learn from it, and PM me the link so I can find it.
I already fixed my code It was 5 days ago. But thanks anyway, friend ^^