Hey there everyone! Have you ever wanted to create some seriously cool looking effects and/or GUIs in minecraft. Because I have! And guess what? I am gonna show the whole world how to do it!
I am planning to make this series of tutorials a very in-depth, yet straight to the point, series. I hope you like it.
What is LWJGL and OpenGL?
The Lightweight Java Game Library (LWJGL) is an extremely fast and advanced (compared to Java's) Graphics, Audio and Input external library. "It exposes OpenGL (Open Graphics Library), OpenAL (Open Audio Library), OpenCL (Open Computing Language) and allows access to controllers such as gamepads, steering wheels and joysticks in a platform-neutral way." [From en.wikipedia.org]
Minecraft uses GL 1.1 All methods from OpenGL 1.1 are found in the class org.lwjgl.opengl.GL11
TUTORIAL 1: The very basics.
Before we can draw random lines and shapes all over the screen, we need to set up the drawing
Guessing you have the IDE eclipse, open up GuiIngame.java we are going to need to import a few packages for what we are going to do later, so why not import all of what we need.
Hey there everyone! Have you ever wanted to create some seriously cool looking effects and/or GUIs in minecraft. Because I have! And guess what? I am gonna show the whole world how to do it!
I am planning to make this series of tutorials a very in-depth, yet straight to the point, series. I hope you like it.
What is LWJGL and OpenGL?
Minecraft uses GL 1.1 All methods from OpenGL 1.1 are found in the class org.lwjgl.opengl.GL11
TUTORIAL 1: The very basics.
Before we can draw random lines and shapes all over the screen, we need to set up the drawing
Guessing you have the IDE eclipse, open up GuiIngame.java we are going to need to import a few packages for what we are going to do later, so why not import all of what we need.
Import these two packages:
You should know what this does. If not, come back after you have learned java.
If you are like me and like everything to be nice and even and straight and easy to read, then create a method something like
and call it after
in the method
This calls our method renderCustomGL() once per tick.
After this we need to start setting up the parameters. You should be able to see what they do by looking at their names.
These should go right before you call your method renderCustomGL() or at the start of it (it does not really matter).
Once we have drawn stuff all over the screen, we are gonna want to set back our parameters so we dont screw up the rest of the GUI.
Lets put this after we call renderCustomGL()
Now we have set up our parameters we are able to draw everything correctly.
TUTORIAL 2: Lines and Quads.
Coming Very Soon
Thanks! ~ JF46784
I wish Dr. Zhark made tutorials, he knows rotations very well, or at least I think he does good rotations.
http://www.minecraftforum.net/topic/1631309-cjborcharles-mod-mod-version-16-146/#entry20114004
My $200* rig - http://pcpartpicker.com/b/IsU