List of usage examples for org.lwjgl.opengl GL11 GL_POINTS
int GL_POINTS
To view the source code for org.lwjgl.opengl GL11 GL_POINTS.
Click Source Link
From source file:espresso3d.engine.renderer.E3DGeometryRenderer.java
License:Open Source License
public void renderPoint(E3DPoint point) { E3DVector4F color = point.getColor(); E3DVector3F pos = point.getPos();//from w w w. j av a 2 s .c o m GL11.glPointSize(100f);//(float)point.getSize()); GL11.glBegin(GL11.GL_POINTS);// Begin Drawing The Line GL11.glColor4f((float) color.getA(), (float) color.getB(), (float) color.getC(), (float) color.getD()); //default all white color for the base polygon //Draw vertices GL11.glVertex3f((float) (pos.getX()), (float) (pos.getY()), (float) (pos.getZ())); GL11.glEnd(); }
From source file:espresso3d.engine.renderer.particle.E3DParticleRendererARBPointSprite.java
License:Open Source License
public void renderParticle(E3DParticle particle) { //Setup textures int glTextureID = -1; int detail0TextureID = -1; int detail1TextureID = -1; if (particle.getQuad().isTextureAvailable()) glTextureID = particle.getQuad().getTexture().getGlTextureID(); if (particle.getQuad().isTextureDetail0Available()) detail0TextureID = particle.getQuad().getTextureDetail0().getGlTextureID(); if (particle.getQuad().isTextureDetail1Available()) detail1TextureID = particle.getQuad().getTextureDetail1().getGlTextureID(); setupPointSpriteParameters(particle.getSize()); getEngine().getGeometryRenderer().disableAllTextureUnits(); // if(textured) getEngine().getGeometryRenderer().setupTextureUnits(glTextureID, detail0TextureID, detail1TextureID); E3DVector3F position = null;//from w w w . j a v a 2 s . c o m GL11.glBegin(GL11.GL_POINTS); { position = particle.getOrientation().getPosition(); GL14.glPointParameterf(GL14.GL_BLEND_SRC_ALPHA, (float) particle.getAlpha());//(float)particle.getSize());//1f ); GL11.glColor4f(1f, 1f, 1f, (float) particle.getAlpha()); GL11.glVertex3f((float) position.getX(), (float) position.getY(), (float) position.getZ()); } GL11.glEnd(); GL11.glDisable(ARBPointSprite.GL_POINT_SPRITE_ARB); }
From source file:espresso3d.engine.renderer.particle.E3DParticleRendererARBPointSprite.java
License:Open Source License
public void renderParticleList(List particleList, int renderMode) { if (particleList == null) return;/*from ww w . jav a2s . com*/ E3DParticle particle = null; List renderList; int listSize = particleList.size(); if (listSize <= 0) return; int bufferSize = listSize * 12; //use 12 to account for the quad (for vertex colors, etc) even though there aren't that many vertices if (bufferSize > E3DGeometryRenderer.MAX_BUFFER_SIZE) { int maxLength = (int) (E3DGeometryRenderer.MAX_BUFFER_SIZE / 12.0); renderParticleList(particleList.subList(maxLength, particleList.size()), renderMode); renderList = particleList.subList(0, maxLength); } else renderList = particleList; getEngine().getGeometryRenderer().vertexBuffer.clear(); getEngine().getGeometryRenderer().colorBuffer.clear(); E3DVector3F position = null; for (int i = 0; i < renderList.size(); i++) { particle = (E3DParticle) renderList.get(i); position = particle.getOrientation().getPosition(); getEngine().getGeometryRenderer().vertexBuffer.put((float) position.getX()); getEngine().getGeometryRenderer().vertexBuffer.put((float) position.getY()); getEngine().getGeometryRenderer().vertexBuffer.put((float) position.getZ()); particle.getQuad().appendVertexColorBuffer(getEngine().getGeometryRenderer().colorBuffer); } setupPointSpriteParameters(particle.getSize()); //Setup textures int glTextureID = -1; int detail0TextureID = -1; int detail1TextureID = -1; if (particle.getQuad().isTextureAvailable()) glTextureID = particle.getQuad().getTexture().getGlTextureID(); if (particle.getQuad().isTextureDetail0Available()) detail0TextureID = particle.getQuad().getTextureDetail0().getGlTextureID(); if (particle.getQuad().isTextureDetail1Available()) detail1TextureID = particle.getQuad().getTextureDetail1().getGlTextureID(); getEngine().getGeometryRenderer().disableAllTextureUnits(); // if(textured) getEngine().getGeometryRenderer().setupTextureUnits(glTextureID, detail0TextureID, detail1TextureID); // Put arrays in float buffers and REWIND them (very important). getEngine().getGeometryRenderer().vertexBuffer.rewind(); getEngine().getGeometryRenderer().colorBuffer.rewind(); GL11.glEnable(ARBPointSprite.GL_POINT_SPRITE_ARB); // Send float buffers to LWJGL. GL11.glVertexPointer(3, 0, getEngine().getGeometryRenderer().vertexBuffer); GL11.glColorPointer(3, 0, getEngine().getGeometryRenderer().colorBuffer); GL11.glDrawArrays(GL11.GL_POINTS, 0, renderList.size()); GL11.glDisable(ARBPointSprite.GL_POINT_SPRITE_ARB); }
From source file:fr.def.iss.vd2.lib_v3d.camera.V3DSimple2DCamera.java
License:Open Source License
private void displayTarget() { GL11.glColor4f(1.0f, 0.5f, 0.5f, 0.8f); GL11.glLineWidth(1.2f);//from w ww.java 2 s . co m GL11.glBegin(GL11.GL_LINES); { GL11.glColor4f(1.0f, 0.0f, 0.0f, 0.8f); GL11.glVertex3d(-1, 0, 0); GL11.glVertex3d(1, 0, 0); GL11.glVertex3d(0.9, 0.1, 0); GL11.glVertex3d(1, 0, 0); GL11.glVertex3d(0.9, -0.1, 0); GL11.glVertex3d(1, 0, 0); //y GL11.glColor4f(0.0f, 1.0f, 0.0f, 0.8f); GL11.glVertex3d(0, -1, 0); GL11.glVertex3d(0, 1, 0); GL11.glVertex3d(0.1, 0.9, 0); GL11.glVertex3d(0, 1, 0); GL11.glVertex3d(-0.1, 0.9, 0); GL11.glVertex3d(0, 1, 0); //z GL11.glColor4f(0.0f, 0.0f, 1.0f, 0.8f); GL11.glVertex3d(0, 0, -1); GL11.glVertex3d(0, 0, 1); GL11.glVertex3d(0.1, 0, 0.9); GL11.glVertex3d(0, 0, 1); GL11.glVertex3d(-0.1, 0, 0.9); GL11.glVertex3d(0, 0, 1); } GL11.glEnd(); GL11.glPointSize(1.2f); GL11.glBegin(GL11.GL_POINTS); { GL11.glVertex3d(position.x, position.y, 0); } GL11.glEnd(); }
From source file:fr.def.iss.vd2.lib_v3d.camera.V3DSimple3DCamera.java
License:Open Source License
private void displayTarget() { GL11.glColor4f(1.0f, 0.5f, 0.5f, 0.8f); GL11.glLineWidth(1.2f);/*ww w.ja v a 2 s.c o m*/ GL11.glBegin(GL11.GL_LINES); { GL11.glColor4f(1.0f, 0.0f, 0.0f, 0.8f); GL11.glVertex3d(-1, 0, 0); GL11.glVertex3d(1, 0, 0); GL11.glVertex3d(0.9, 0.1, 0); GL11.glVertex3d(1, 0, 0); GL11.glVertex3d(0.9, -0.1, 0); GL11.glVertex3d(1, 0, 0); //y GL11.glColor4f(0.0f, 1.0f, 0.0f, 0.8f); GL11.glVertex3d(0, -1, 0); GL11.glVertex3d(0, 1, 0); GL11.glVertex3d(0.1, 0.9, 0); GL11.glVertex3d(0, 1, 0); GL11.glVertex3d(-0.1, 0.9, 0); GL11.glVertex3d(0, 1, 0); //z GL11.glColor4f(0.0f, 0.0f, 1.0f, 0.8f); GL11.glVertex3d(0, 0, -1); GL11.glVertex3d(0, 0, 1); GL11.glVertex3d(0.1, 0, 0.9); GL11.glVertex3d(0, 0, 1); GL11.glVertex3d(-0.1, 0, 0.9); GL11.glVertex3d(0, 0, 1); } GL11.glEnd(); GL11.glPointSize(1.2f); GL11.glBegin(GL11.GL_POINTS); { GL11.glVertex3d(position.x, position.y, position.z); } GL11.glEnd(); }
From source file:fr.def.iss.vd2.lib_v3d.element.V3DBoundingBox.java
License:Open Source License
public void display() { if (showCenter) { GL11.glColor4f(centerColor.r, centerColor.g, centerColor.b, centerColor.a); GL11.glPointSize(4.0f);/*w ww. j a va2 s .c o m*/ GL11.glBegin(GL11.GL_POINTS); GL11.glVertex3d(center.x, center.y, center.z); GL11.glEnd(); } if (flat || size.z == 0) { displayFlat(); } else { displayThick(); } }
From source file:fr.def.iss.vd2.lib_v3d.element.V3DCircle.java
License:Open Source License
private void drawSolidCircle() { float step = 2f * (float) Math.PI / (float) quality; GL11.glBegin(GL11.GL_LINE_LOOP);/*w ww . ja v a 2 s . com*/ for (int i = 0; i <= quality; i++) { GL11.glVertex3f((float) (radius * Math.cos(step * i)), (float) (radius * Math.sin(step * i)), 0f); } GL11.glEnd(); GL11.glBegin(GL11.GL_POINTS); for (int i = 0; i <= quality; i++) { GL11.glVertex3f((float) (radius * Math.cos(step * i)), (float) (radius * Math.sin(step * i)), 0f); } GL11.glEnd(); }
From source file:fr.def.iss.vd2.lib_v3d.element.V3DPoint.java
License:Open Source License
@Override protected void doDisplay(I3dCamera camera) { GL11.glPointSize(size); GL11.glBegin(GL11.GL_POINTS); GL11.glVertex3d(0, 0, 0); GL11.glEnd(); }
From source file:fr.ign.cogit.geoxygene.appli.gl.GLComplexFactory.java
License:Open Source License
public static GLSimpleComplex createQuickPoints(String id, List<IGeometry> geometries, final Color color, final Parameterizer parameterizer, double minX, double minY) { GLSimpleComplex primitive = new GLSimpleComplex(id, minX, minY); GLMesh mesh = primitive.addGLMesh(GL11.GL_POINTS); for (IGeometry geometry : geometries) { createQuickPoints(primitive, mesh, geometry, color, parameterizer); }/*from w w w . j a v a 2s . co m*/ return primitive; }
From source file:fr.ign.cogit.geoxygene.util.gl.GLTools.java
License:Open Source License
public static void glDrawString(final String s, double x, double y) { double startX = x; GL11.glBegin(GL11.GL_POINTS); for (char c : s.toLowerCase().toCharArray()) { if (c == 'a') { for (int i = 0; i < 8; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 7, y - i); }//from ww w . ja va2 s . c o m for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 8); GL11.glVertex2d(x + i, y - 4); } x += 8; } else if (c == 'b') { for (int i = 0; i < 8; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 1; i <= 6; i++) { GL11.glVertex2d(x + i, y); GL11.glVertex2d(x + i, y - 4); GL11.glVertex2d(x + i, y - 8); } GL11.glVertex2d(x + 7, y - 5); GL11.glVertex2d(x + 7, y - 7); GL11.glVertex2d(x + 7, y - 6); GL11.glVertex2d(x + 7, y - 1); GL11.glVertex2d(x + 7, y - 2); GL11.glVertex2d(x + 7, y - 3); x += 8; } else if (c == 'c') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y); GL11.glVertex2d(x + i, y - 8); } GL11.glVertex2d(x + 6, y - 1); GL11.glVertex2d(x + 6, y - 2); GL11.glVertex2d(x + 6, y - 6); GL11.glVertex2d(x + 6, y - 7); x += 8; } else if (c == 'd') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y); GL11.glVertex2d(x + i, y - 8); } GL11.glVertex2d(x + 6, y - 1); GL11.glVertex2d(x + 6, y - 2); GL11.glVertex2d(x + 6, y - 3); GL11.glVertex2d(x + 6, y - 4); GL11.glVertex2d(x + 6, y - 5); GL11.glVertex2d(x + 6, y - 6); GL11.glVertex2d(x + 6, y - 7); x += 8; } else if (c == 'e') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 1; i <= 6; i++) { GL11.glVertex2d(x + i, y - 0); GL11.glVertex2d(x + i, y - 8); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y - 4); } x += 8; } else if (c == 'f') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 1; i <= 6; i++) { GL11.glVertex2d(x + i, y - 8); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y - 4); } x += 8; } else if (c == 'g') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y); GL11.glVertex2d(x + i, y - 8); } GL11.glVertex2d(x + 6, y - 1); GL11.glVertex2d(x + 6, y - 2); GL11.glVertex2d(x + 6, y - 3); GL11.glVertex2d(x + 5, y - 3); GL11.glVertex2d(x + 7, y - 3); GL11.glVertex2d(x + 6, y - 6); GL11.glVertex2d(x + 6, y - 7); x += 8; } else if (c == 'h') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 7, y - i); } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 4); } x += 8; } else if (c == 'i') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 3, y - i); } for (int i = 1; i <= 5; i++) { GL11.glVertex2d(x + i, y - 0); GL11.glVertex2d(x + i, y - 8); } x += 7; } else if (c == 'j') { for (int i = 1; i <= 8; i++) { GL11.glVertex2d(x + 6, y - i); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y - 0); } GL11.glVertex2d(x + 1, y - 3); GL11.glVertex2d(x + 1, y - 2); GL11.glVertex2d(x + 1, y - 1); x += 8; } else if (c == 'k') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); } GL11.glVertex2d(x + 6, y - 8); GL11.glVertex2d(x + 5, y - 7); GL11.glVertex2d(x + 4, y - 6); GL11.glVertex2d(x + 3, y - 5); GL11.glVertex2d(x + 2, y - 4); GL11.glVertex2d(x + 2, y - 3); GL11.glVertex2d(x + 3, y - 4); GL11.glVertex2d(x + 4, y - 3); GL11.glVertex2d(x + 5, y - 2); GL11.glVertex2d(x + 6, y - 1); GL11.glVertex2d(x + 7, y); x += 8; } else if (c == 'l') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 1; i <= 6; i++) { GL11.glVertex2d(x + i, y); } x += 7; } else if (c == 'm') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 7, y - i); } GL11.glVertex2d(x + 3, y - 6); GL11.glVertex2d(x + 2, y - 7); GL11.glVertex2d(x + 4, y - 5); GL11.glVertex2d(x + 5, y - 6); GL11.glVertex2d(x + 6, y - 7); GL11.glVertex2d(x + 4, y - 5); x += 8; } else if (c == 'n') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 7, y - i); } GL11.glVertex2d(x + 2, y - 7); GL11.glVertex2d(x + 2, y - 6); GL11.glVertex2d(x + 3, y - 5); GL11.glVertex2d(x + 4, y - 4); GL11.glVertex2d(x + 5, y - 3); GL11.glVertex2d(x + 6, y - 2); GL11.glVertex2d(x + 6, y - 1); x += 8; } else if (c == 'o' || c == '0') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 7, y - i); } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 8); GL11.glVertex2d(x + i, y - 0); } x += 8; } else if (c == 'p') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y - 8); GL11.glVertex2d(x + i, y - 4); } GL11.glVertex2d(x + 6, y - 7); GL11.glVertex2d(x + 6, y - 5); GL11.glVertex2d(x + 6, y - 6); x += 8; } else if (c == 'q') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + 1, y - i); if (i != 1) { GL11.glVertex2d(x + 7, y - i); } } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 8); if (i != 6) { GL11.glVertex2d(x + i, y - 0); } } GL11.glVertex2d(x + 4, y - 3); GL11.glVertex2d(x + 5, y - 2); GL11.glVertex2d(x + 6, y - 1); GL11.glVertex2d(x + 7, y); x += 8; } else if (c == 'r') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y - 8); GL11.glVertex2d(x + i, y - 4); } GL11.glVertex2d(x + 6, y - 7); GL11.glVertex2d(x + 6, y - 5); GL11.glVertex2d(x + 6, y - 6); GL11.glVertex2d(x + 4, y - 3); GL11.glVertex2d(x + 5, y - 2); GL11.glVertex2d(x + 6, y - 1); GL11.glVertex2d(x + 7, y); x += 8; } else if (c == 's') { for (int i = 2; i <= 7; i++) { GL11.glVertex2d(x + i, y - 8); } GL11.glVertex2d(x + 1, y - 7); GL11.glVertex2d(x + 1, y - 6); GL11.glVertex2d(x + 1, y - 5); for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 4); GL11.glVertex2d(x + i, y); } GL11.glVertex2d(x + 7, y - 3); GL11.glVertex2d(x + 7, y - 2); GL11.glVertex2d(x + 7, y - 1); GL11.glVertex2d(x + 1, y - 1); GL11.glVertex2d(x + 1, y - 2); x += 8; } else if (c == 't') { for (int i = 0; i <= 8; i++) { GL11.glVertex2d(x + 4, y - i); } for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + i, y - 8); } x += 7; } else if (c == 'u') { for (int i = 1; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 7, y - i); } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 0); } x += 8; } else if (c == 'v') { for (int i = 2; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 6, y - i); } GL11.glVertex2d(x + 2, y - 1); GL11.glVertex2d(x + 5, y - 1); GL11.glVertex2d(x + 3, y); GL11.glVertex2d(x + 4, y); x += 7; } else if (c == 'w') { for (int i = 1; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 7, y - i); } GL11.glVertex2d(x + 2, y); GL11.glVertex2d(x + 3, y); GL11.glVertex2d(x + 5, y); GL11.glVertex2d(x + 6, y); for (int i = 1; i <= 6; i++) { GL11.glVertex2d(x + 4, y - i); } x += 8; } else if (c == 'x') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + i, y - i); } for (int i = 7; i >= 1; i--) { GL11.glVertex2d(x + i, y - 8 + i); } x += 8; } else if (c == 'y') { GL11.glVertex2d(x + 4, y); GL11.glVertex2d(x + 4, y - 1); GL11.glVertex2d(x + 4, y - 2); GL11.glVertex2d(x + 4, y - 3); GL11.glVertex2d(x + 4, y - 4); GL11.glVertex2d(x + 3, y - 5); GL11.glVertex2d(x + 2, y - 6); GL11.glVertex2d(x + 1, y - 7); GL11.glVertex2d(x + 1, y - 8); GL11.glVertex2d(x + 5, y - 5); GL11.glVertex2d(x + 6, y - 6); GL11.glVertex2d(x + 7, y - 7); GL11.glVertex2d(x + 7, y - 8); x += 8; } else if (c == 'z') { for (int i = 1; i <= 6; i++) { GL11.glVertex2d(x + i, y); GL11.glVertex2d(x + i, y - 8); GL11.glVertex2d(x + i, y - i); } GL11.glVertex2d(x + 6, y - 7); x += 8; } else if (c == '1') { for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y); } for (int i = 1; i <= 8; i++) { GL11.glVertex2d(x + 4, y - i); } GL11.glVertex2d(x + 3, y - 7); x += 8; } else if (c == '2') { for (int i = 1; i <= 6; i++) { GL11.glVertex2d(x + i, y); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y - 8); } GL11.glVertex2d(x + 1, y - 7); GL11.glVertex2d(x + 1, y - 6); GL11.glVertex2d(x + 6, y - 7); GL11.glVertex2d(x + 6, y - 6); GL11.glVertex2d(x + 6, y - 5); GL11.glVertex2d(x + 5, y - 4); GL11.glVertex2d(x + 4, y - 3); GL11.glVertex2d(x + 3, y - 2); GL11.glVertex2d(x + 2, y - 1); x += 8; } else if (c == '3') { for (int i = 1; i <= 5; i++) { GL11.glVertex2d(x + i, y - 8); GL11.glVertex2d(x + i, y); } for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + 6, y - i); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y - 4); } x += 8; } else if (c == '4') { for (int i = 2; i <= 8; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 2; i <= 7; i++) { GL11.glVertex2d(x + i, y - 1); } for (int i = 0; i <= 4; i++) { GL11.glVertex2d(x + 4, y - i); } x += 8; } else if (c == '5') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + i, y - 8); } for (int i = 4; i <= 7; i++) { GL11.glVertex2d(x + 1, y - i); } GL11.glVertex2d(x + 1, y - 1); GL11.glVertex2d(x + 2, y); GL11.glVertex2d(x + 3, y); GL11.glVertex2d(x + 4, y); GL11.glVertex2d(x + 5, y); GL11.glVertex2d(x + 6, y); GL11.glVertex2d(x + 7, y - 1); GL11.glVertex2d(x + 7, y - 2); GL11.glVertex2d(x + 7, y - 3); GL11.glVertex2d(x + 6, y - 4); GL11.glVertex2d(x + 5, y - 4); GL11.glVertex2d(x + 4, y - 4); GL11.glVertex2d(x + 3, y - 4); GL11.glVertex2d(x + 2, y - 4); x += 8; } else if (c == '6') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y); } for (int i = 2; i <= 5; i++) { GL11.glVertex2d(x + i, y - 4); GL11.glVertex2d(x + i, y - 8); } GL11.glVertex2d(x + 7, y - 1); GL11.glVertex2d(x + 7, y - 2); GL11.glVertex2d(x + 7, y - 3); GL11.glVertex2d(x + 6, y - 4); x += 8; } else if (c == '7') { for (int i = 0; i <= 7; i++) { GL11.glVertex2d(x + i, y - 8); } GL11.glVertex2d(x + 7, y - 7); GL11.glVertex2d(x + 7, y - 6); GL11.glVertex2d(x + 6, y - 5); GL11.glVertex2d(x + 5, y - 4); GL11.glVertex2d(x + 4, y - 3); GL11.glVertex2d(x + 3, y - 2); GL11.glVertex2d(x + 2, y - 1); GL11.glVertex2d(x + 1, y); x += 8; } else if (c == '8') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + 1, y - i); GL11.glVertex2d(x + 7, y - i); } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 8); GL11.glVertex2d(x + i, y - 0); } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 4); } x += 8; } else if (c == '9') { for (int i = 1; i <= 7; i++) { GL11.glVertex2d(x + 7, y - i); } for (int i = 5; i <= 7; i++) { GL11.glVertex2d(x + 1, y - i); } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 8); GL11.glVertex2d(x + i, y - 0); } for (int i = 2; i <= 6; i++) { GL11.glVertex2d(x + i, y - 4); } GL11.glVertex2d(x + 1, y - 0); x += 8; } else if (c == '.') { GL11.glVertex2d(x + 1, y); x += 2; } else if (c == ',') { GL11.glVertex2d(x + 1, y); GL11.glVertex2d(x + 1, y - 1); x += 2; } else if (c == '\n') { y -= 10; x = startX; } else if (c == ' ') { x += 8; } } GL11.glEnd(); }