当前位置: 首页>>代码示例>>Java>>正文


Java GL11.glVertex3f方法代码示例

本文整理汇总了Java中org.lwjgl.opengl.GL11.glVertex3f方法的典型用法代码示例。如果您正苦于以下问题:Java GL11.glVertex3f方法的具体用法?Java GL11.glVertex3f怎么用?Java GL11.glVertex3f使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.lwjgl.opengl.GL11的用法示例。


在下文中一共展示了GL11.glVertex3f方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onWorldDraw

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
protected void onWorldDraw(float delta, float x, float y, float z) {
    float mx, my, mz;
    if (!safeShow) return;
    if (--safeUpdate < 0) {
        safeUpdate = 13;
        reCheckSafe(fix(x), fix(y), fix(z));
    }
    if (safeGhost) GL11.glDisable(GL11.GL_DEPTH_TEST);
    else           GL11.glEnable( GL11.GL_DEPTH_TEST);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glDisable(GL11.GL_BLEND);
    GL11.glDisable(GL11.GL_FOG);
    GL11.glBegin(GL11.GL_LINES);
    for (int i = 0; i < safeCur; ++i) {
        Vec3i pos   = safePoses[i];
        Color color = safeMarks[i];
        GL11.glColor3ub(color.rb, color.gb, color.bb);
        mx = pos.getX() - x; my = pos.getY() - y; mz = pos.getZ() - z;
        GL11.glVertex3f(mx+0.9f,my+0.01f,mz+0.9f);
        GL11.glVertex3f(mx+0.1f,my+0.01f,mz+0.1f);
        GL11.glVertex3f(mx+0.9f,my+0.01f,mz+0.1f);
        GL11.glVertex3f(mx+0.1f,my+0.01f,mz+0.9f);
    }
    GL11.glEnd();
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:27,代码来源:Safe.java

示例2: renderTieTop

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static final void renderTieTop(float width){
	GL11.glTexCoord2f(tieTopMinU, tieTopMinV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(-width/2, height, length/2);

	GL11.glTexCoord2f(tieTopMaxU, tieTopMinV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(width/2, height, length/2);

	GL11.glTexCoord2f(tieTopMaxU, tieTopMaxV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(width/2, height, -length/2);

	GL11.glTexCoord2f(tieTopMinU, tieTopMaxV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(-width/2, height, -length/2);
}
 
开发者ID:DonBruce64,项目名称:OpenFlexiTrack,代码行数:19,代码来源:DefaultSleeperType.java

示例3: renderTieRear

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static final void renderTieRear(float width){
	GL11.glTexCoord2f(tieSideMinU, tieSideMinV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(width/2, height, -length/2);

	GL11.glTexCoord2f(tieSideMinU, tieSideMaxV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(width/2, 0, -length/2);

	GL11.glTexCoord2f(tieSideMaxU, tieSideMaxV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(-width/2, 0, -length/2);

	GL11.glTexCoord2f(tieSideMaxU, tieSideMinV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(-width/2, height, -length/2);
}
 
开发者ID:DonBruce64,项目名称:OpenFlexiTrack,代码行数:19,代码来源:DefaultSleeperType.java

示例4: renderTieLeft

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static final void renderTieLeft(float width){
	GL11.glTexCoord2f(tieEndMinU, tieEndMinV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(-width/2, height, -length/2);

	GL11.glTexCoord2f(tieEndMinU, tieEndMaxV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(-width/2, 0, -length/2);

	GL11.glTexCoord2f(tieEndMaxU, tieEndMaxV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(-width/2, 0, length/2);

	GL11.glTexCoord2f(tieEndMaxU, tieEndMinV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(-width/2, height, length/2);
}
 
开发者ID:DonBruce64,项目名称:OpenFlexiTrack,代码行数:19,代码来源:DefaultSleeperType.java

示例5: renderTieRight

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private static final void renderTieRight(float width){
	GL11.glTexCoord2f(tieEndMinU, tieEndMinV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(width/2, height, length/2);

	GL11.glTexCoord2f(tieEndMinU, tieEndMaxV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(width/2, 0, length/2);

	GL11.glTexCoord2f(tieEndMaxU, tieEndMaxV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(width/2, 0, -length/2);

	GL11.glTexCoord2f(tieEndMaxU, tieEndMinV);
	GL11.glNormal3f(0, 1, 0);
	GL11.glVertex3f(width/2, height, -length/2);
}
 
开发者ID:DonBruce64,项目名称:OpenFlexiTrack,代码行数:19,代码来源:DefaultSleeperType.java

示例6: drawBox

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private static void drawBox(float sx, float sy, float sz,
                            float ex, float ey, float ez) {
    GL11.glVertex3f(sx,sy,sz); GL11.glVertex3f(sx,sy,ez); 
    GL11.glVertex3f(sx,ey,ez); GL11.glVertex3f(sx,ey,sz);

    GL11.glVertex3f(ex,sy,sz); GL11.glVertex3f(ex,sy,ez); 
    GL11.glVertex3f(ex,ey,ez); GL11.glVertex3f(ex,ey,sz);

    GL11.glVertex3f(sx,sy,sz); GL11.glVertex3f(sx,ey,sz); 
    GL11.glVertex3f(ex,ey,sz); GL11.glVertex3f(ex,sy,sz);

    GL11.glVertex3f(sx,sy,ez); GL11.glVertex3f(sx,ey,ez); 
    GL11.glVertex3f(ex,ey,ez); GL11.glVertex3f(ex,sy,ez);

    GL11.glVertex3f(sx,sy,sz); GL11.glVertex3f(ex,sy,sz); 
    GL11.glVertex3f(ex,sy,ez); GL11.glVertex3f(sx,sy,ez);

    GL11.glVertex3f(sx,ey,sz); GL11.glVertex3f(ex,ey,sz); 
    GL11.glVertex3f(ex,ey,ez); GL11.glVertex3f(sx,ey,ez);
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:21,代码来源:GuiHelper.java

示例7: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
void render()
{
    GL11.glLineWidth(1.0f);
    GL11.glColor3f(COLOR, COLOR, COLOR);
    GL11.glBegin(GL11.GL_LINES);
    for (int ix = -WIDTH; ix <= WIDTH; ix++)
    {
        float x = ix*SIZE;
        GL11.glVertex3f(x, FLOOR_HEIGHT, -REAL_WIDTH);
        GL11.glVertex3f(x, FLOOR_HEIGHT, REAL_WIDTH);
    }
    
    for (int iz = -WIDTH; iz <= WIDTH; iz++)
    {
        float z = iz*SIZE;
        GL11.glVertex3f(-REAL_WIDTH, FLOOR_HEIGHT, z);
        GL11.glVertex3f(REAL_WIDTH, FLOOR_HEIGHT, z);
    }
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:21,代码来源:Grid.java

示例8: renderDefaultChar

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
    * Render a single character with the default.png font at current (posX,posY) location...
    */
   private float renderDefaultChar(int p_78266_1_, boolean p_78266_2_)
   {
float var3 = (float) (p_78266_1_ % 16 * 8);
float var4 = (float) (p_78266_1_ / 16 * 8);
float var5 = p_78266_2_ ? 1.0F : 0.0F;
this.renderEngine.bindTexture(this.locationFontTexture);
float var6 = 7.99F;
GL11.glBegin(GL11.GL_TRIANGLE_STRIP);
GL11.glTexCoord2f(var3 / 128.0F, var4 / 128.0F);
GL11.glVertex3f(this.posX + var5, this.posY, 0.0F);
GL11.glTexCoord2f(var3 / 128.0F, (var4 + 7.99F) / 128.0F);
GL11.glVertex3f(this.posX - var5, this.posY + 7.99F, 0.0F);
GL11.glTexCoord2f((var3 + var6 - 1.0F) / 128.0F, var4 / 128.0F);
GL11.glVertex3f(this.posX + var6 - 1.0F + var5, this.posY, 0.0F);
GL11.glTexCoord2f((var3 + var6 - 1.0F) / 128.0F, (var4 + 7.99F) / 128.0F);
GL11.glVertex3f(this.posX + var6 - 1.0F - var5, this.posY + 7.99F, 0.0F);
GL11.glEnd();
return this.charWidth[p_78266_1_];
   }
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:23,代码来源:FontRenderer.java

示例9: drawComposite

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawComposite()
{
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glBegin(GL11.GL_QUADS);
    GL11.glTexCoord2f(0.0F, 0.0F);
    GL11.glVertex3f(0.0F, 0.0F, 0.0F);
    GL11.glTexCoord2f(1.0F, 0.0F);
    GL11.glVertex3f(1.0F, 0.0F, 0.0F);
    GL11.glTexCoord2f(1.0F, 1.0F);
    GL11.glVertex3f(1.0F, 1.0F, 0.0F);
    GL11.glTexCoord2f(0.0F, 1.0F);
    GL11.glVertex3f(0.0F, 1.0F, 0.0F);
    GL11.glEnd();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:Shaders.java

示例10: renderUnicodeChar

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
 * Render a single Unicode character at current (posX,posY) location using one of the /font/glyph_XX.png files...
 */
private float renderUnicodeChar(char p_78277_1_, boolean p_78277_2_)
{
    if (this.glyphWidth[p_78277_1_] == 0)
    {
        return 0.0F;
    }
    else
    {
        int i = p_78277_1_ / 256;
        this.loadGlyphTexture(i);
        int j = this.glyphWidth[p_78277_1_] >>> 4;
        int k = this.glyphWidth[p_78277_1_] & 15;
        float f = (float)j;
        float f1 = (float)(k + 1);
        float f2 = (float)(p_78277_1_ % 16 * 16) + f;
        float f3 = (float)((p_78277_1_ & 255) / 16 * 16);
        float f4 = f1 - f - 0.02F;
        float f5 = p_78277_2_ ? 1.0F : 0.0F;
        GL11.glBegin(GL11.GL_TRIANGLE_STRIP);
        GL11.glTexCoord2f(f2 / 256.0F, f3 / 256.0F);
        GL11.glVertex3f(this.posX + f5, this.posY, 0.0F);
        GL11.glTexCoord2f(f2 / 256.0F, (f3 + 15.98F) / 256.0F);
        GL11.glVertex3f(this.posX - f5, this.posY + 7.99F, 0.0F);
        GL11.glTexCoord2f((f2 + f4) / 256.0F, f3 / 256.0F);
        GL11.glVertex3f(this.posX + f4 / 2.0F + f5, this.posY, 0.0F);
        GL11.glTexCoord2f((f2 + f4) / 256.0F, (f3 + 15.98F) / 256.0F);
        GL11.glVertex3f(this.posX + f4 / 2.0F - f5, this.posY + 7.99F, 0.0F);
        GL11.glEnd();
        return (f1 - f) / 2.0F + 1.0F;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:35,代码来源:FontRenderer.java

示例11: flushBuffer

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
 * Flush the currently cached data down to the card 
 */
private void flushBuffer() {	
	if (vertIndex == 0) {
		return;
	}
	if (currentType == NONE) {
		return;
	}
	
	if (vertIndex < TOLERANCE) {
		GL11.glBegin(currentType);
		for (int i=0;i<vertIndex;i++) {
			GL11.glColor4f(cols[(i*4)+0], cols[(i*4)+1], cols[(i*4)+2], cols[(i*4)+3]);
			GL11.glTexCoord2f(texs[(i*2)+0], texs[(i*2)+1]);
			GL11.glVertex3f(verts[(i*3)+0], verts[(i*3)+1], verts[(i*3)+2]);
		}
		GL11.glEnd();
		currentType = NONE;
		return;
	}
	vertices.clear();
	colors.clear();
	textures.clear();
	
	vertices.put(verts,0,vertIndex*3);
	colors.put(cols,0,vertIndex*4);
	textures.put(texs,0,vertIndex*2);
	
	vertices.flip(); 
	colors.flip(); 
	textures.flip(); 
	
	GL11.glVertexPointer(3,0,vertices);     
	GL11.glColorPointer(4,0,colors);     
	GL11.glTexCoordPointer(2,0,textures);     
	
	GL11.glDrawArrays(currentType, 0, vertIndex);
	currentType = NONE;
}
 
开发者ID:IngSW-unipv,项目名称:Progetto-C,代码行数:42,代码来源:VAOGLRenderer.java

示例12: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void render()
{
    GL11.glClearColor(SKY_COLOR, SKY_COLOR, SKY_COLOR, 0.0f);
    GL11.glClearStencil(0);
    GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_STENCIL_BUFFER_BIT);
    
    GL11.glColor3f(GROUND_COLOR, GROUND_COLOR, GROUND_COLOR);
    GL11.glBegin(GL11.GL_QUADS);
    GL11.glVertex3f(-1.0f, -1.0f, 1.0f);
    GL11.glVertex3f(-1.0f, 0.0f, 1.0f);
    GL11.glVertex3f(1.0f, 0.0f, 1.0f);
    GL11.glVertex3f(1.0f, -1.0f, 1.0f);
    
    GL11.glVertex3f(-1.0f, -1.0f, -1.0f);
    GL11.glVertex3f(-1.0f, 0.0f, -1.f);
    GL11.glVertex3f(1.0f, 0.0f, -1.0f);
    GL11.glVertex3f(1.0f, -1.0f, -1.0f);
    
    GL11.glVertex3f(1.0f, -1.0f, -1.0f);
    GL11.glVertex3f(1.0f, 0.0f, -1.0f);
    GL11.glVertex3f(1.0f, 0.0f, 1.0f);
    GL11.glVertex3f(1.0f, -1.0f, 1.0f);
    
    GL11.glVertex3f(-1.0f, -1.0f, -1.0f);
    GL11.glVertex3f(-1.0f, 0.0f, -1.0f);
    GL11.glVertex3f(-1.0f, 0.0f, 1.0f);
    GL11.glVertex3f(-1.0f, -1.0f, 1.0f);
    
    GL11.glVertex3f(-1.0f, -1.0f, -1.0f);
    GL11.glVertex3f(-1.0f, -1.0f, 1.0f);
    GL11.glVertex3f(1.0f, -1.0f, 1.0f);
    GL11.glVertex3f(1.0f, -1.0f, -1.0f);
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:35,代码来源:Skybox.java

示例13: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void render()
{
    float alpha = dragged ? 0.5f : 1.0f;
    
    Camera3D camera = Main.instance().getCamera();
    Vec2 cameraDir = new Vec2(pos.x, pos.z).sub(new Vec2(camera.pos.x, camera.pos.z));
    Vec2 frontDir2 = new Vec2(frontDir.x, frontDir.z);
    boolean facingFront = cameraDir.dot(frontDir2) <= 0.0f;
    
    GL11.glPushMatrix();
    GL11.glTranslatef(pos.x, pos.y, pos.z);
    GL11.glRotatef(Util.toDegrees(yaw), 0.0f, 1.0f, 0.0f);
    
    //Background
    GL11.glColor4f(0.4375f, 0.4375f, 0.4375f, 0.875f*alpha);
    GL11.glBegin(GL11.GL_QUADS);
    GL11.glVertex3f(-width, -height, 0.0f);
    GL11.glVertex3f(-width, height, 0.0f);
    GL11.glVertex3f(width, height, 0.0f);
    GL11.glVertex3f(width, -height, 0.0f);
    GL11.glEnd();
    
    //Outline
    GL11.glLineWidth(1.0f);
    float color = Main.instance().getFocus() == this ? 0.75f : 1.0f;
    GL11.glColor4f(color, color, 1.0f, alpha);
    GL11.glBegin(GL11.GL_LINE_LOOP);
    GL11.glVertex3f(-width, -height, 0.0f);
    GL11.glVertex3f(-width, height, 0.0f);
    GL11.glVertex3f(width, height, 0.0f);
    GL11.glVertex3f(width, -height, 0.0f);
    GL11.glEnd();
    
    //Shadow
    GL11.glLineWidth(1.0f);
    GL11.glColor4f(0.0f, 0.0f, 0.0f, 0.5f*alpha);
    GL11.glBegin(GL11.GL_LINES);
    GL11.glVertex3f(-width, Grid.FLOOR_HEIGHT - pos.y, 0.0f);
    GL11.glVertex3f(width, Grid.FLOOR_HEIGHT - pos.y, 0.0f);
    GL11.glEnd();
    
    GL11.glScalef(UI_SCALE, UI_SCALE, UI_SCALE);
    if (facingFront) frontInterface.render(alpha);
    else
    {
        GL11.glScalef(-1.0f, 1.0f, -1.0f);
        rearInterface.render(alpha);
    }
    
    GL11.glPopMatrix();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:53,代码来源:Panel.java

示例14: glVertex3f

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
 * @see org.newdawn.slick.opengl.renderer.SGL#glVertex3f(float, float, float)
 */
public void glVertex3f(float x, float y, float z) {
	GL11.glVertex3f(x, y, z);
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:7,代码来源:ImmediateModeOGLRenderer.java

示例15: setTopData

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void setTopData(float x, float y, float z, float lx, float ly, float lz) {
    GL11.glVertex3f(x + lx, y + ly, z);
    GL11.glVertex3f(x, y + ly, z);
    GL11.glVertex3f(x, y + ly, z + lz);
    GL11.glVertex3f(x + lx, y + ly, z + lz);
}
 
开发者ID:Vinetos,项目名称:FreeWorld,代码行数:7,代码来源:BlockRenderer.java


注:本文中的org.lwjgl.opengl.GL11.glVertex3f方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。