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


Java GL11.glVertex2f方法代码示例

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


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

示例1: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void render(float alpha)
{
    graph.update(env);
    layout.render(alpha);
    
    Vec2 pos = getPos();
    Vec2 radius = getRadius();
    float x0 = pos.x - radius.x, x1 = pos.x + radius.x;
    float y0 = pos.y - radius.y, y1 = pos.y + radius.y;
    
    GL11.glLineWidth(1.0f);
    GL11.glColor4f(1.0f, 1.0f, 1.0f, alpha);
    GL11.glBegin(GL11.GL_LINE_LOOP);
    GL11.glVertex2f(x0, y0);
    GL11.glVertex2f(x0, y1);
    GL11.glVertex2f(x1, y1);
    GL11.glVertex2f(x1, y0);
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:21,代码来源:EnvelopeEditor.java

示例2: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
 * Game loop render
 */
public void render() {
	Color.white.bind();
	texture.bind(); // or GL11.glBind(texture.getTextureID());
	
	GL11.glBegin(GL11.GL_QUADS);
		GL11.glTexCoord2f(0,0);
		GL11.glVertex2f(100,100);
		GL11.glTexCoord2f(1,0);
		GL11.glVertex2f(100+texture.getTextureWidth(),100);
		GL11.glTexCoord2f(1,1);
		GL11.glVertex2f(100+texture.getTextureWidth(),100+texture.getTextureHeight());
		GL11.glTexCoord2f(0,1);
		GL11.glVertex2f(100,100+texture.getTextureHeight());
	GL11.glEnd();
	
	font.drawString(150, 300, "HELLO LWJGL WORLD", Color.yellow);
}
 
开发者ID:IngSW-unipv,项目名称:Progetto-C,代码行数:21,代码来源:TestUtils.java

示例3: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void render(float alpha)
{
    Vec2 p = scrollBox.getPos();
    Vec2 r = scrollBox.getRadius();
    
    float x0 = p.x - r.x, x1 = p.x + r.x;
    float y0 = p.y - r.y, y1 = p.y + r.y;
    
    GL11.glColor4f(0.4375f, 0.4375f, 0.4375f, 0.875f*alpha);
    GL11.glBegin(GL11.GL_QUADS);
    GL11.glVertex2f(x0, y0);
    GL11.glVertex2f(x0, y1);
    GL11.glVertex2f(x1, y1);
    GL11.glVertex2f(x1, y0);
    GL11.glEnd();
    
    scrollBox.render(alpha);
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:20,代码来源:DeviceMenu.java

示例4: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void render(float alpha)
{
    columns.render(alpha);
    
    Vec2 pos = getPos();
    Vec2 radius = getRadius();
    
    GL11.glLineWidth(1.0f);
    GL11.glColor4f(1.0f, 1.0f, 1.0f, alpha);
    GL11.glBegin(GL11.GL_LINE_LOOP);
    GL11.glVertex2f(pos.x - radius.x, pos.y - radius.y);
    GL11.glVertex2f(pos.x - radius.x, pos.y + radius.y);
    GL11.glVertex2f(pos.x + radius.x, pos.y + radius.y);
    GL11.glVertex2f(pos.x + radius.x, pos.y - radius.y);
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:18,代码来源:RadioButtons.java

示例5: drawGradientBorderedRectReliant

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawGradientBorderedRectReliant(float x, float y, float x1, float y1, float lineWidth, int border, int bottom, int top) {
    RenderUtils.enableGL2D();
    RenderUtils.drawGradientRect(x, y, x1, y1, top, bottom);
    RenderUtils.glColor(border);
    GL11.glEnable((int)3042);
    GL11.glDisable((int)3553);
    GL11.glBlendFunc((int)770, (int)771);
    GL11.glLineWidth((float)lineWidth);
    GL11.glBegin((int)3);
    GL11.glVertex2f((float)x, (float)y);
    GL11.glVertex2f((float)x, (float)y1);
    GL11.glVertex2f((float)x1, (float)y1);
    GL11.glVertex2f((float)x1, (float)y);
    GL11.glVertex2f((float)x, (float)y);
    GL11.glEnd();
    GL11.glEnable((int)3553);
    GL11.glDisable((int)3042);
    RenderUtils.disableGL2D();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:RenderUtils.java

示例6: drawCircle

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawCircle(int xx, int yy, int radius, int col) {
	float f = (col >> 24 & 0xFF) / 255.0F;
	float f2 = (col >> 16 & 0xFF) / 255.0F;
	float f3 = (col >> 8 & 0xFF) / 255.0F;
	float f4 = (col & 0xFF) / 255.0F;
	GL11.glPushMatrix();
	GL11.glEnable(3042);
	GL11.glDisable(3553);
	GL11.glBlendFunc(770, 771);
	GL11.glEnable(2848);
	GL11.glShadeModel(7425);
	GL11.glBegin(2);
	for (int i = 0; i < 70; i++) {
		float x = (float) (radius * Math.cos(i * 0.08975979010256552D));
		float y = (float) (radius * Math.sin(i * 0.08975979010256552D));
		GL11.glColor4f(f2, f3, f4, f);
		GL11.glVertex2f(xx + x, yy + y);
	}
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	GL11.glEnd();
	GL11.glEnable(3553);
	GL11.glDisable(3042);
	GL11.glDisable(2848);
	GL11.glPopMatrix();
}
 
开发者ID:Moudoux,项目名称:EMC,代码行数:26,代码来源:RenderUtils.java

示例7: drawBorderedRectReliant

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void drawBorderedRectReliant(float x, float y, float x1, float y1, float lineWidth, int inside, int border) {
	GlStateManager.enableBlend();
    GlStateManager.disableTexture2D();
    GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
    RenderUtils.drawRect(x, y, x1, y1, inside);
    RenderUtils.glColor(border);
    GL11.glEnable((int)3042);
    GL11.glDisable((int)3553);
    GL11.glBlendFunc((int)770, (int)771);
    GL11.glLineWidth((float)lineWidth);
    GL11.glBegin((int)3);
    GL11.glVertex2f((float)x, (float)y);
    GL11.glVertex2f((float)x, (float)y1);
    GL11.glVertex2f((float)x1, (float)y1);
    GL11.glVertex2f((float)x1, (float)y);
    GL11.glVertex2f((float)x, (float)y);
    GL11.glEnd();
    GL11.glEnable((int)3553);
    GL11.glDisable((int)3042);
    GlStateManager.enableTexture2D();
    GlStateManager.disableBlend();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:23,代码来源:RenderUtils.java

示例8: render

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void render(float alpha)
{
    AAB2 bounds = getBounds();
    
    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.glVertex2f(bounds.x0, bounds.y0);
    GL11.glVertex2f(bounds.x0, bounds.y1);
    GL11.glVertex2f(bounds.x1, bounds.y1);
    GL11.glVertex2f(bounds.x1, bounds.y0);
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:15,代码来源:ScrollBox.java

示例9: drawK

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private static void drawK(float scale, float startX, float y)
{
       convert(scale * (startX - 0.5f), scale * (y),scale * (startX - 0.5f), scale * (y - 1.1f));

       GL11.glLineWidth(3.5f);
       GL11.glBegin(GL11.GL_LINE_STRIP);
       GL11.glEnable(GL11.GL_LINE_WIDTH);
       GL11.glVertex2f(scale * (startX - 0.4f), scale * (y-0.45f));
       GL11.glVertex2f(scale * (startX), scale * (y - 1));
       GL11.glVertex2f(scale * (startX - 0.4f), scale * (y-0.45f));
       GL11.glVertex2f(scale * (startX), scale * (y  - 0.1f));
       GL11.glEnd();
       
}
 
开发者ID:TauOmicronMu,项目名称:TeamProject,代码行数:15,代码来源:Text.java

示例10: drawV

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private static void drawV(float scale, float startX, float y)
{
	GL11.glLineWidth(3.5f);
       GL11.glBegin(GL11.GL_LINE_STRIP);
       GL11.glEnable(GL11.GL_LINE_WIDTH);
       GL11.glVertex2f(scale * (startX - 0.3f), scale * (y-0.4f));
       GL11.glVertex2f(scale * (startX - 0.15f), scale * (y - 1));
       GL11.glVertex2f(scale*(startX - 0.15f), scale * (y - 1));
       GL11.glVertex2f(scale * (startX), scale * (y-0.4f));
       GL11.glEnd();
}
 
开发者ID:TauOmicronMu,项目名称:TeamProject,代码行数:12,代码来源:Text.java

示例11: renderSymbol

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void renderSymbol()
{
    GL11.glBegin(GL11.GL_LINE_LOOP);
    for (float t = 0.0f; t < T_END; t += DT)
    {
        Vec2 p = Util.squareDir(t).normalize().mult(radius*0.5f);
        GL11.glVertex2f(p.x, p.y);
    }
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:12,代码来源:AudioOutputJack.java

示例12: drawStopSymbol

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void drawStopSymbol()
{
    GL11.glBegin(GL11.GL_LINE_LOOP);
    GL11.glVertex2f(-0.75f, -0.75f);
    GL11.glVertex2f(-0.75f, 0.75f);
    GL11.glVertex2f(0.75f, 0.75f);
    GL11.glVertex2f(0.75f, -0.75f);
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:10,代码来源:MidiSequencer.java

示例13: renderCrosshair

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public void renderCrosshair()
{
    GL11.glLineWidth(1.0f);
    GL11.glColor4f(1.0f, 1.0f, 1.0f, 0.5f);
    GL11.glBegin(GL11.GL_LINES);
    GL11.glVertex2f(-CROSSHAIR_WIDTH, -0.5f);
    GL11.glVertex2f(-CROSSHAIR_INNER_WIDTH, -0.5f);
    GL11.glVertex2f(CROSSHAIR_WIDTH + 1.0f, -0.5f);
    GL11.glVertex2f(CROSSHAIR_INNER_WIDTH + 1.0f, -0.5f);
    GL11.glVertex2f(0.5f, -CROSSHAIR_WIDTH - 1.0f);
    GL11.glVertex2f(0.5f, -CROSSHAIR_INNER_WIDTH - 1.0f);
    GL11.glVertex2f(0.5f, CROSSHAIR_WIDTH);
    GL11.glVertex2f(0.5f, CROSSHAIR_INNER_WIDTH);
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:16,代码来源:Crosshair.java

示例14: drawQuad

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
private void drawQuad(float drawX, float drawY, float drawX2, float drawY2,
                      float srcX, float srcY, float srcX2, float srcY2) {
    float DrawWidth = drawX2 - drawX;
    float DrawHeight = drawY2 - drawY;
    float TextureSrcX = srcX / textureWidth;
    float TextureSrcY = srcY / textureHeight;
    float SrcWidth = srcX2 - srcX;
    float SrcHeight = srcY2 - srcY;
    float RenderWidth = (SrcWidth / textureWidth);
    float RenderHeight = (SrcHeight / textureHeight);
    //WorldRenderer worldRenderer = Tessellator.getInstance().getWorldRenderer();

    //worldRenderer.setColorRGBA_F(0f, 0f, 0f, 1f);

    //worldRenderer.pos(drawX, drawY, 0).tex(TextureSrcX, TextureSrcY).endVertex();
    GL11.glTexCoord2f(TextureSrcX, TextureSrcY);
    GL11.glVertex2f(drawX, drawY);

    //worldRenderer.pos(drawX, drawY + DrawHeight, 0).tex(TextureSrcX, TextureSrcY + RenderHeight).endVertex();
    GL11.glTexCoord2f(TextureSrcX, TextureSrcY + RenderHeight);
    GL11.glVertex2f(drawX, drawY + DrawHeight);

    //worldRenderer.pos(drawX + DrawWidth, drawY + DrawHeight, 0).tex(TextureSrcX + RenderWidth, TextureSrcY + RenderHeight).endVertex();
    GL11.glTexCoord2f(TextureSrcX + RenderWidth, TextureSrcY + RenderHeight);
    GL11.glVertex2f(drawX + DrawWidth, drawY + DrawHeight);

    //worldRenderer.pos(drawX + DrawWidth, drawY, 0).tex(TextureSrcX + RenderWidth, TextureSrcY).endVertex();
    GL11.glTexCoord2f(TextureSrcX + RenderWidth, TextureSrcY);
    GL11.glVertex2f(drawX + DrawWidth, drawY);
}
 
开发者ID:McJty,项目名称:Lector,代码行数:31,代码来源:TrueTypeFont.java

示例15: renderSymbol

import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
@Override
public void renderSymbol()
{
    GL11.glBegin(GL11.GL_LINES);
    GL11.glVertex2f(0.0f, -radius*0.5f);
    GL11.glVertex2f(0.0f, radius*0.5f);
    GL11.glEnd();
}
 
开发者ID:SmashMaster,项目名称:KraftigAudio,代码行数:9,代码来源:AudioInputJack.java


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