products/sources/formale Sprachen/Fortran/f90gl-1.2.15/examples image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: fbitfont.f90   Sprache: Fortran

Original von: f90gl©

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

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ¤





Kontakt
Drucken
Kontakt
sprechenden Kalenders

in der Quellcodebibliothek suchen




schauen Sie vor die Tür

Fenster


Die Firma ist wie angegeben erreichbar.

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff