Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Fortran/f90gl-1.2.15/examples/   (NIST Fortran ©)  Datei vom 6.8.2005 mit Größe 1 kB image not shown  

Quelle  fbitfont.f90   Sprache: Fortran

 
subroutine output(x,y,s)
  use opengl_gl
  use opengl_glut
  real :: x,y
  character :: s*(*)
  character :: c
  integer :: i,lenc
  
  call glrasterpos2f(x,y)
  lenc = len(s)
  do i=1,lenc
     c = s(i:i)
     call glutbitmapcharacter(GLUT_BITMAP_TIMES_ROMAN_24, &
          ichar(c))
  end do
end subroutine output

subroutine display
  use opengl_gl
  call glclear(GL_COLOR_BUFFER_BIT)
  call output(0.0,24.0, &
         'This is written in a GLUT bitmap font.')
  call output(100.0,100.0,'ABCDEFGabcdefg')
  call output(50.0,145.0, &
       '(positioned in pixels with upper-left origin)')
  call glflush
end subroutine display

subroutine reshape(w,h)
  use opengl_gl
  use opengl_glu
  integerintent(inout) :: w, h
  call glviewport(0, 0, w, h)
  call glmatrixmode(GL_PROJECTION)
  call glloadidentity
  call gluortho2d(dble(0.0), dble(w), dble(0.0), dble(h))
  call glscalef(1.0, -1.0, 1.0)
  call gltranslatef(real(0.0), real(-h), real(0.0))
  call glmatrixmode(GL_MODELVIEW)
end subroutine reshape

program main
  use opengl_glut
  use opengl_gl
  implicit none
  integer :: win
  interface
    subroutine display()
    end subroutine display
    subroutine reshape(w,h)
    integerintent(inout):: w, h
    end subroutine reshape
  end interface
  call glutinitdisplaymode(GLUT_RGB + GLUT_SINGLE)
  call glutinitwindowsize(500, 150)
  call glutinit
  win = glutcreatewindow('Fortran GLUT bitmap A')
  call glclearcolor(0.0, 0.0, 0.0, 1.0)
  call glutdisplayfunc(display)
  call glutreshapefunc(reshape)
  call glutmainloop
end program main

91%


¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.