| |
|
|
| what mach I wrong the glOrtho by me crashes? CompileMarkSeparation {$cleq}
cls
ogl("init",hwnd,0.0,0.0,0.0,0)
ogl("glMatrixMode",GL_PROJECTION)
ogl("glLoadIdentity")
ogl("glViewport",0,0,width(hwnd),height(hwnd))
ogl("glOrtho",0,640,0,480, 0,128)
oGL("Clear")
ogl("show")
waitkey
| 11/09/06 ▲ | |
|
|
|
|
Uwe ''Pascal'' Niemeier | Hello iF!
The worth double is in this drop literally To nehmen; eachone 64-bit-Parameter becomes in two Hälften To apiece 4 Bytes transfer. CompileMarkSeparation!
cls
ogl("init",%hwnd,0.0,0.0,0.0,0)
ogl("glMatrixMode",~GL_PROJECTION)
ogl("glLoadIdentity")
ogl("glViewport",0,0,width(%hwnd),height(%hwnd))
declare a!,b!,c!,d!,e!,f!
declare a&,b&,c&,d&,e&,f&
a!=0
b!=640
c!=0
d!=480
e!=0
f!=128
a&=addr(a!)
b&=addr(b!)
c&=addr(c!)
d&=addr(d!)
e&=addr(e!)
f&=addr(f!)
ogl("glOrtho",
long(a&,0),long(a&,4),
long(b&,0),long(b&,4),
long(c&,0),long(c&,4),
long(d&,0),long(d&,4),
long(e&,0),long(e&,4),
long(f&,0),long(f&,4)
)
oGL("Clear")
ogl("show")
waitkey
end
here another something elegantere Possibility: CompileMarkSeparation!
declare a#
dim a#,48
float a#,0 =0
float a#,8 =640
float a#,16=0
float a#,24=480
float a#,32=0
float a#,40=128
ogl("glOrtho",
long(a#,0 ),long(a#,4 ),
long(a#,8 ),long(a#,12),
long(a#,16),long(a#,20),
long(a#,24),long(a#,28),
long(a#,32),long(a#,36),
long(a#,40),long(a#,44)
)
HTH Pascal |
|
|
| |
|
|
|
| Argh there pressing the shoe!
Vielen Thanks the klärt naturally some such of my Problemchen. |
|
|
| |
|
|