public static gluQuadricTexture ( |
||
quadObject | ||
textureCoords | byte | |
return | void |
private void DrawIsland() { float moveSphere = GlobalProperties.islandRadius - GlobalProperties.islandHeight; float rotate = 45.0f; GL.glEnable(GL.GL_CLIP_PLANE0); double[] clipPalane0 = { 0.0, 0.0, 1.0, 0.0 }; GL.glClipPlane(GL.GL_CLIP_PLANE0, clipPalane0); GL.glTranslatef(0.0f, 0.0f, -moveSphere); GL.glEnable(GL.GL_TEXTURE_2D); GL.glColor3f(1.0f, 1.0f, 1.0f); GL.glBindTexture(GL.GL_TEXTURE_2D, Textures[1]); GL.glRotatef(rotate, 1.0f, 1.0f, 0.0f); GLUquadric obj = GLU.gluNewQuadric(); GLU.gluQuadricTexture(obj, 1); GLU.gluSphere(obj, GlobalProperties.islandRadius, 32, 32); GLU.gluDeleteQuadric(obj); GL.glRotatef(-rotate, 1.0f, 1.0f, 0.0f); GL.glDisable(GL.GL_TEXTURE_2D); GL.glTranslatef(0.0f, 0.0f, moveSphere); GL.glDisable(GL.GL_CLIP_PLANE0); }
public void draw_moon() { GL.glPushMatrix(); GL.glColor3d(1, 1, 1); GL.glEnable(GL.GL_TEXTURE_2D); GL.glBindTexture(GL.GL_TEXTURE_2D, Textures[1]); quad = GLU.gluNewQuadric(); GLU.gluQuadricTexture(quad, 40); GL.glTranslatef(-200, 200, -300); // rotating moon as well as all planets to Y axis GL.glTranslatef(0.0f + (float)speed * 0.01f, 0.0f, 0.0f); GL.glTranslatef(0.0f, 0.0f + (float)speed * 0.01f, 0.0f); GL.glRotatef((float)moon++ *0.5f, 1.0f, 1.0f, 0.0f); GLU.gluSphere(quad, 18, 200, 200); GL.glPopMatrix(); }
public void draw_sun() { GL.glPushMatrix(); GL.glColor3d(1, 1, 1); GL.glEnable(GL.GL_TEXTURE_2D); GL.glBindTexture(GL.GL_TEXTURE_2D, Textures[6]); quad = GLU.gluNewQuadric(); GLU.gluQuadricTexture(quad, 40); GL.glTranslatef(pos[0], pos[1], pos[2]); // rotating sun as well as all planets to Y axis GL.glTranslatef(0.0f, 0.0f + (float)-speed * 0.03f, 0.0f); //y - up down GL.glTranslatef(0.0f, 0.0f, 0.0f + (float)-speed * 0.01f); //z - back forward GL.glRotatef((float)moon, 0.0f, 1.0f, 0.0f); GLU.gluSphere(quad, 45, 1000, 1000); GL.glPopMatrix(); moon += 0.04f; }
private void DrawPillar(double baseRadius, double topRadius, double height) { GL.glEnable(GL.GL_TEXTURE_2D); GL.glColor3f(1.0f, 1.0f, 1.0f); GL.glBindTexture(GL.GL_TEXTURE_2D, Textures[2]); GLUquadric obj = GLU.gluNewQuadric(); GLU.gluQuadricTexture(obj, 2); GLU.gluCylinder(obj, baseRadius, topRadius, height, 32, 32); GLU.gluDeleteQuadric(obj); GL.glDisable(GL.GL_TEXTURE_2D); }
private void DrawBackground() { GL.glDisable(GL.GL_LIGHTING); GL.glEnable(GL.GL_TEXTURE_2D); GL.glColor4f(1.0f, 1.0f, 1.0f, 0.5f); GL.glBindTexture(GL.GL_TEXTURE_2D, Textures[4]); float cor = GlobalProperties.seaSize / 2; GLUquadric obj = GLU.gluNewQuadric(); GLU.gluQuadricTexture(obj, 4); GLU.gluCylinder(obj, cor, cor, cor, 32, 32); GLU.gluDeleteQuadric(obj); GL.glDisable(GL.GL_TEXTURE_2D); GL.glEnable(GL.GL_LIGHTING); }
private void DrawWindow() { float windowRadius = GlobalProperties.windowRadius, wondowHeight = GlobalProperties.windowHeight; GL.glEnable(GL.GL_TEXTURE_2D); GL.glColor3f(1.0f, 1.0f, 1.0f); GL.glBindTexture(GL.GL_TEXTURE_2D, Textures[5]); GLUquadric obj = GLU.gluNewQuadric(); GLU.gluQuadricTexture(obj, 5); GLU.gluCylinder(obj, windowRadius, windowRadius, wondowHeight, 32, 32); GL.glTranslatef(0.0f, 0.0f, wondowHeight); GLU.gluCylinder(obj, windowRadius, 0, wondowHeight * 2 / 3, 32, 32); GL.glTranslatef(0.0f, 0.0f, -wondowHeight / 2); GLU.gluDeleteQuadric(obj); GL.glDisable(GL.GL_TEXTURE_2D); }
void DrawSky(float skysize) { float mid = skysize; GL.glEnable(GL.GL_TEXTURE_2D); GL.glBindTexture(GL.GL_TEXTURE_2D, Textures[6]); GL.glDisable(GL.GL_LIGHTING); GL.glTranslatef(0, 0, -mid); GL.glRotatef(90, 0, 0, 1); GL.glRotatef(zavit, 1, 0, 0); GLU.gluQuadricTexture(obj, 1); GLU.gluSphere(obj, skysize * 1.5f, 50, 50); GL.glRotatef(-zavit, 1, 0, 0); GL.glRotatef(-90, 0, 0, 1); GL.glTranslatef(0, 0, mid); GL.glEnable(GL.GL_LIGHTING); GL.glDisable(GL.GL_TEXTURE_2D); zavit += 0.02f; }
private void DrawDisk(double diskHeight, double diskRadius) { GL.glEnable(GL.GL_TEXTURE_2D); GL.glColor3f(1.0f, 1.0f, 1.0f); GL.glBindTexture(GL.GL_TEXTURE_2D, Textures[3]); GL.glPushMatrix(); GLUquadric obj = GLU.gluNewQuadric(); GLU.gluQuadricTexture(obj, 3); GLU.gluDisk(obj, 0, diskRadius, 60, 20); GLU.gluCylinder(obj, diskRadius, diskRadius, diskHeight, 32, 32); GL.glTranslatef(0.0f, 0.0f, (float)diskHeight); GLU.gluDisk(obj, 0, diskRadius, 60, 20); GL.glPopMatrix(); // GL.glTranslatef(0.0f, 0.0f, -(float)diskHeight); GLU.gluDeleteQuadric(obj); GL.glDisable(GL.GL_TEXTURE_2D); }