! This is a fortran 90 programin fixed source form.
! In a risky move, this program assumes that the default kind of
! integer is the same as glint and glsizei and also that the
! default real is the same kind as glfloat
subroutine display use opengl_gl use opengl_glu use opengl_glut call glclear(GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT) call glpushmatrix call glscalef(1.3, 1.3, 1.3) call glrotatef(20.0, 1.0, 0.0, 0.0)
subroutine reshape(w,h) use opengl_gl use opengl_glu use opengl_glut integer, intent(inout) :: w,h real(gldouble) wr,hr doubleprecision d call glviewport(0, 0, w, h) call glmatrixmode(GL_PROJECTION) call glloadidentity
wr = w
hr = h
d = 1.0d0 if ( w .le. h ) then call glortho(-2.5_gldouble, 2.5_gldouble, &
-2.5_gldouble * hr/wr, 2.5_gldouble * hr/wr, &
-10.0_gldouble, 10.0_gldouble) else call glortho(-2.5_gldouble * hr/wr, &
2.5_gldouble * hr/wr, &
-2.5_gldouble, 2.5_gldouble, -10.0_gldouble, &
10.0_gldouble) endif call glmatrixmode(GL_MODELVIEW) end
subroutine submenu(value) use opengl_gl use opengl_glu use opengl_glut integer, intent(inout) :: value if ( value .eq. 1 ) then call glenable(GL_DEPTH_TEST) call glenable(GL_LIGHTING) call gldisable(GL_BLEND) call glpolygonmode(GL_FRONT_AND_BACK, GL_FILL) else call gldisable(GL_DEPTH_TEST) call gldisable(GL_LIGHTING) call glcolor3f(1.0, 1.0, 1.0) call glpolygonmode(GL_FRONT_AND_BACK, GL_LINE) call glenable(GL_LINE_SMOOTH) call glenable(GL_BLEND) call glblendfunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) endif call glutpostredisplay end
subroutine mainmenu(value) integer, intent(inout) :: value if (value == 666) stop end
subroutine myinit use opengl_gl use opengl_glu use opengl_glut real lambient(4), ldiffuse(4), lspecular(4), lposition(4) data lambient /0.0, 0.0, 0.0, 1.0/ data ldiffuse /1.0, 0.0, 0.0, 1.0/ data lspecular /1.0, 1.0, 1.0, 1.0/ data lposition /1.0, 1.0, 1.0, 0.0/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.