@Override public void pop(GLGraphics2D parentG2d) { gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); gl.glPopMatrix(); }
protected void endDrawing(DrawContext dc) { GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility. if (!dc.isPickingMode()) dc.endStandardLighting(); gl.glPopMatrix(); gl.glPopAttrib(); }
gl2.glPopMatrix(); gl2.glTranslatef(0,0,5); glut.glutSolidCone(15f, 50f, 12, 12); gl2.glPopMatrix(); gl2.glPushMatrix(); gl2.glRotatef(90f, 0, 1, 0); gl2.glTranslatef(0,0,5); glut.glutSolidCone(15f, 50f, 12, 12); gl2.glPopMatrix(); gl2.glColor4f(1.4f + (0.01f+slowFeedback)/2f,0.7f,.0f,(0.001f + angle / 360f)); gl2.glTranslatef(0f, 0, 60f); glut.glutSolidCone(10f, 30f, 12, 12); gl2.glPopMatrix();
@Override public void endPoly() { super.endPoly(); gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); gl.glPopMatrix(); }
@Override public void endPoly() { super.endPoly(); gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); gl.glPopMatrix(); }
gl2.glVertex3f(-width/2f, height/2f, 0); gl2.glEnd(); gl2.glPopMatrix(); textures[i].disable(gl2); gl2.glVertex3f(-width/2f, height/2f, 0); gl2.glEnd(); gl2.glPopMatrix(); textures[i].disable(gl2); gl2.glVertex3f(-shortSideHalf, shortSideHalf, 0); gl2.glEnd(); gl2.glPopMatrix(); gl2.glVertex3f(-shortSideHalf, shortSideHalf, 0); gl2.glEnd(); gl2.glPopMatrix(); texYantra.disable(gl2);
@Override protected void end(Texture texture) { gl.glPopMatrix(); texture.disable(gl); Color color = g2d.getColor(); if(color!=null){ g2d.getColorHelper().setColorRespectComposite(color); }else{ System.err.println("GL2ImageDrawer - NULL Color"); } }
public void drawBoundingBox(BoundingBox box, Matrix4 transform) { gl.glPushMatrix(); gl.glMultMatrixf(transform.val, 0); drawBoundingBox(box); gl.glPopMatrix(); }
@Override public void endPoly() { drawLine(false); gl.glDisable(GL2.GL_LINE_STIPPLE); gl.glPopMatrix(); gl.glPopAttrib(); } }
protected void end(TextRenderer renderer) { renderer.end3DRendering(); GL2 gl = g2d.getGLContext().getGL().getGL2(); gl.glPopMatrix(); }
public void render(GL2 gl2) { paintBackground(gl2); paintCamera(gl2); gl2.glPushMatrix(); if (robot != null) { robot.render(gl2); } gl2.glPopMatrix(); } }
protected void end(TextRenderer renderer) { renderer.end3DRendering(); GL2 gl = g2d.getGLContext().getGL().getGL2(); gl.glPopMatrix(); }
protected void after(GL gl) { gl.glDisable(GL.GL_TEXTURE_2D); gl.getGL2().glTexEnvi(GL2ES1.GL_TEXTURE_ENV, GL2ES1.GL_TEXTURE_ENV_MODE, GL2ES1.GL_MODULATE); // gl.glDisable(GL2.GL_ALPHA); // gl.glDisable(GL2.GL_BLEND); gl.getGL2().glPopMatrix(); }
public void drawCylinder(double baseRadius, double topRadius, double height, double x, double y, double z) { final int slices = DEFAULT_RESOLUTION; final int stacks = DEFAULT_RESOLUTION; gl.glPushMatrix(); // Draw sphere (possible styles: FILL, LINE, POINT). //gl.glColor3f(0.3f, 0.5f, 1f); gl.glTranslated(x, y, z); GLUquadric cylinder = generateQuadric(glu); glu.gluCylinder(cylinder, baseRadius, topRadius, height, slices, stacks); glu.gluDeleteQuadric(cylinder); gl.glPopMatrix(); }
@Override protected void paintMotors(GL2 gl2,MakelangeloRobotSettings settings) { double top = settings.getLimitTop(); double bottom = settings.getLimitBottom(); double right = settings.getLimitRight(); double left = settings.getLimitLeft(); gl2.glPushMatrix(); gl2.glTranslated(left , top , 0); gl2.glRotated(270, 0, 0, 1); paintOneMotor(gl2); gl2.glPopMatrix(); gl2.glPushMatrix(); gl2.glTranslated(right, top , 0); gl2.glRotated(180, 0, 0, 1); paintOneMotor(gl2); gl2.glPopMatrix(); gl2.glPushMatrix(); gl2.glTranslated(right, bottom, 0); gl2.glRotated( 90, 0, 0, 1); paintOneMotor(gl2); gl2.glPopMatrix(); gl2.glPushMatrix(); gl2.glTranslated(left , bottom, 0); gl2.glRotated( 0, 0, 0, 1); paintOneMotor(gl2); gl2.glPopMatrix(); }
@Override public void draw(Graphics3D g) { AWTGraphics3D graphics = (AWTGraphics3D) g; GL2 gl = graphics.getGL2(); gl.glPushMatrix(); setupTextureAttribs(gl); renderTextured(gl); resetTextureAttribs(gl); gl.glPopMatrix(); }
@Override public void draw(GL2 pGl, Camera camera) { pGl.glPushMatrix(); pGl.glTranslated(getGlobalX(), 0, -getGlobalY()); try { modelRender.render(pGl, model); } finally { pGl.glPopMatrix(); } }
public void drawSphere(double radius, double x, double y, double z, int resolution, Color color) { final int slices = resolution; final int stacks = resolution; gl.glPushMatrix(); glSetColor(color); gl.glTranslated(x, y, z); GLUquadric sphere = generateQuadric(glu); glu.gluSphere(sphere, radius, slices, stacks); glu.gluDeleteQuadric(sphere); gl.glPopMatrix(); }
public void rotateText(GL gl, Coord3d posReal) { gl.getGL2().glPushMatrix(); gl.getGL2().glMatrixMode(GLMatrixFunc.GL_MODELVIEW); loadIdentity(gl); rotateOf(gl, 90, AXE_Z); translateTo(gl, posReal, false); gl.getGL2().glScalef(scale.x, scale.y, scale.z); gl.getGL2().glPopMatrix(); }