📄 sglbad.f90
字号:
module sgl_util
use sgl
implicit none
contains
subroutine display()
integer, parameter :: size = 200
real, parameter :: rinc = 0.002
real, save :: radian = 0.0
integer :: x,y
x = int(sin(radian)*size)
y = int(cos(radian)*size)
radian = radian + rinc
call sglClearBuffer()
call sglDrawLine(200-x, 200-y, 200+x, 200+y)
call sglUpdateBuffer()
return
end subroutine
end module
! 这是错误范例
program main
use sgl_util
implicit none
integer i
call sglCreateWindow(100,100,400,400,1)
call sglColor3i(255,255,255)
do i=1,5000
call display()
end do
stop
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -