blob: b12e1ea6c484ffb3e6be2b614ed2bf5b47ced4ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package ru.olamedia.olacraft.picker;
import java.nio.FloatBuffer;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import ru.olamedia.olacraft.world.block.Block;
import ru.olamedia.olacraft.world.provider.WorldProvider;
public class joglBlockPicker {
WorldProvider provider;
public joglBlockPicker(WorldProvider provider) {
this.provider = provider;
}
public Block pickBlock(GLAutoDrawable drawable) {
GL2 gl = drawable.getGL().getGL2();
FloatBuffer projMatrix = FloatBuffer.allocate(16);
FloatBuffer modelMatrix = FloatBuffer.allocate(16);
gl.glGetFloatv(GL2.GL_PROJECTION, projMatrix);
gl.glGetFloatv(GL2.GL_MODELVIEW, modelMatrix);
return null;
}
}
|