fixed server warning
This commit is contained in:
parent
b615089a9b
commit
1a2bc3a964
1 changed files with 11 additions and 3 deletions
|
@ -372,9 +372,10 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
|
||||
public static float diffX, diffY, diffZ;
|
||||
|
||||
static FloatBuffer modelviewF = GLAllocation.createDirectFloatBuffer(16);
|
||||
static FloatBuffer projectionF = GLAllocation.createDirectFloatBuffer(16);
|
||||
static IntBuffer viewport = GLAllocation.createDirectIntBuffer(16);
|
||||
static FloatBuffer modelviewF;
|
||||
static FloatBuffer projectionF;
|
||||
static IntBuffer viewport;
|
||||
|
||||
static FloatBuffer pos = ByteBuffer.allocateDirect(3 * 4).asFloatBuffer();
|
||||
|
||||
@SubscribeEvent
|
||||
|
@ -397,6 +398,13 @@ public class BuildCraftCore extends BuildCraftMod {
|
|||
* See EntityUrbanist#rayTraceMouse for a usage example.
|
||||
*/
|
||||
|
||||
if (modelviewF == null) {
|
||||
modelviewF = GLAllocation.createDirectFloatBuffer(16);
|
||||
projectionF = GLAllocation.createDirectFloatBuffer(16);
|
||||
viewport = GLAllocation.createDirectIntBuffer(16);
|
||||
|
||||
}
|
||||
|
||||
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelviewF);
|
||||
GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projectionF);
|
||||
GL11.glGetInteger(GL11.GL_VIEWPORT, viewport);
|
||||
|
|
Loading…
Reference in a new issue