本文整理汇总了Java中org.lwjgl.opengl.GL11.glGetFloat方法的典型用法代码示例。如果您正苦于以下问题:Java GL11.glGetFloat方法的具体用法?Java GL11.glGetFloat怎么用?Java GL11.glGetFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.glGetFloat方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rotateLocal
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void rotateLocal(float delta, int dim)
{
GL11.glPushMatrix();
GL11.glLoadIdentity();
rotate();
switch(dim)
{
case 0: GL11.glRotated(delta,1,0,0); break;
case 1: GL11.glRotated(delta,0,1,0); break;
case 2: GL11.glRotated(delta,0,0,1); break;
}
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, rotationMatrix);
updateRotationAnglesFromMatrix();
GL11.glPopMatrix();
}
示例2: setCamera
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void setCamera(float partialTicks)
{
Entity entity = mc.getRenderViewEntity();
double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks;
double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks;
double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks;
cameraPositionX = d0;
cameraPositionY = d1;
cameraPositionZ = d2;
GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, (FloatBuffer)projection.position(0));
SMath.invertMat4FBFA((FloatBuffer)projectionInverse.position(0), (FloatBuffer)projection.position(0), faProjectionInverse, faProjection);
projection.position(0);
projectionInverse.position(0);
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, (FloatBuffer)modelView.position(0));
SMath.invertMat4FBFA((FloatBuffer)modelViewInverse.position(0), (FloatBuffer)modelView.position(0), faModelViewInverse, faModelView);
modelView.position(0);
modelViewInverse.position(0);
checkGLError("setCamera");
}
示例3: setObliqueNearPlaneClip
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
Configures camera for World drawing, with customizable near-plane clip
*/
public static void setObliqueNearPlaneClip(float a, float b, float c, float d) {
float matrix[] = new float[16];
float x, y, z, w, dot;
FloatBuffer buf = makeBuffer(16);
GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, buf);
buf.get(matrix).rewind();
x = (sgn(a) + matrix[8]) / matrix[0];
y = (sgn(b) + matrix[9]) / matrix[5];
z = -1.0F;
w = (1.0F + matrix[10]) / matrix[14];
dot = a*x + b*y + c*z + d*w;
matrix[2] = a * (2f / dot);
matrix[6] = b * (2f / dot);
matrix[10] = c * (2f / dot) + 1.0F;
matrix[14] = d * (2f / dot);
buf.put(matrix).rewind();
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadMatrix(buf);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
}
示例4: getRayTrace
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static RayTrace getRayTrace()
{
FloatBuffer model = BufferUtils.createFloatBuffer(16);
FloatBuffer projection = BufferUtils.createFloatBuffer(16);
IntBuffer viewport = BufferUtils.createIntBuffer(16);
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, model);
GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projection);
GL11.glGetInteger(GL11.GL_VIEWPORT, viewport);
FloatBuffer posNearBuffer = BufferUtils.createFloatBuffer(3);
FloatBuffer posFarBuffer = BufferUtils.createFloatBuffer(3);
GLU.gluUnProject(Mouse.getX(), Mouse.getY(), 0.0F, model, projection, viewport, posNearBuffer);
GLU.gluUnProject(Mouse.getX(), Mouse.getY(), 1.0F, model, projection, viewport, posFarBuffer);
float[] posNear = new float[3];
float[] posFar = new float[3];
for(int i = 0; i < 3; i++)
{
posNear[i] = posNearBuffer.get(i);
posFar[i] = posFarBuffer.get(i);
}
Vec3d v = new Vec3d(posNear[0], posNear[1], posNear[2]);
Vec3d w = new Vec3d(posFar[0], posFar[1], posFar[2]);
return new RayTrace(v,w);
// entityModel.clearHighlights();
// PartObj p = entityModel.testRay(new RayTrace(v,w));
// if(p != null)
// hoveredPart = p.getName();
// else
// hoveredPart = null;
}
示例5: applyAnisotropicLevel
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void applyAnisotropicLevel()
{
if (GLContext.getCapabilities().GL_EXT_texture_filter_anisotropic)
{
float f = GL11.glGetFloat(34047);
float f1 = (float)Config.getAnisotropicFilterLevel();
f1 = Math.min(f1, f);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, 34046, f1);
}
}
示例6: call
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void call(RenderWorld event) {
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, MODELVIEW_BUFFER);
GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, PROJECTION_BUFFER);
GL11.glGetInteger(GL11.GL_VIEWPORT, VIEWPORT_BUFFER);
ScaledResolution scaledResolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
GLUProjection.getInstance().updateMatrices(VIEWPORT_BUFFER, MODELVIEW_BUFFER, PROJECTION_BUFFER,
scaledResolution.getScaledWidth() / (double) mc.displayWidth,
scaledResolution.getScaledHeight() / (double) mc.displayHeight);
}
示例7: postCelestialRotate
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void postCelestialRotate()
{
FloatBuffer floatbuffer = tempMatrixDirectBuffer;
floatbuffer.clear();
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, floatbuffer);
floatbuffer.get(tempMat, 0, 16);
SMath.multiplyMat4xVec4(sunPosition, tempMat, sunPosModelView);
SMath.multiplyMat4xVec4(moonPosition, tempMat, moonPosModelView);
System.arraycopy(shadowAngle == sunAngle ? sunPosition : moonPosition, 0, shadowLightPosition, 0, 3);
setProgramUniform3f("sunPosition", sunPosition[0], sunPosition[1], sunPosition[2]);
setProgramUniform3f("moonPosition", moonPosition[0], moonPosition[1], moonPosition[2]);
setProgramUniform3f("shadowLightPosition", shadowLightPosition[0], shadowLightPosition[1], shadowLightPosition[2]);
checkGLError("postCelestialRotate");
}
示例8: setUpPosition
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void setUpPosition()
{
FloatBuffer floatbuffer = tempMatrixDirectBuffer;
floatbuffer.clear();
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, floatbuffer);
floatbuffer.get(tempMat, 0, 16);
SMath.multiplyMat4xVec4(upPosition, tempMat, upPosModelView);
setProgramUniform3f("upPosition", upPosition[0], upPosition[1], upPosition[2]);
}
示例9: glGetFloat
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
* @see org.newdawn.slick.opengl.renderer.SGL#glGetFloat(int, java.nio.FloatBuffer)
*/
public void glGetFloat(int id, FloatBuffer ret) {
GL11.glGetFloat(id, ret);
}
示例10: getFloat
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void getFloat(int pname, FloatBuffer params)
{
GL11.glGetFloat(pname, params);
}