| |
|
|
| 4 plains Parallax Scrolling with vSync
Download: [...]
the demonstration have I on wish prepares.
The application benötig of OpenGL The permit on the VSync the Bildschirmes Waiting To can.
is these option not Anwendungsgesteuert set then becomes a Error Message outputted.
The code is messy and only fix gepinselt - it went only therefore To show the on able Systemen loosly 60fps possible are.
Exe in the attachment. CompileMarkSeparation {$cleq}
const apptitle=oglscrl
#include oglhelper.inc
ogl.window(apptitle,1,800,600,,,,,60)
long tex.bg1=ogl.loadTex(bild1.tex,,,false),
tex.bg2=ogl.loadTex(bild2.tex,,,false),
tex.bg3=ogl.loadTex(bild3.tex,,,false),
float t,y
casenot ogl.vsync(true)==true : err(Cant init V-Sync.)
do {
ogl.main()
t=t+2
y=y+(mousey-y)*0.1
case mousePressed : break
}
ogl.done()
ogl.main(){
ogl.clear
ogl.2dnow()
ogl(color,1,1,1,1)
ogl.scrollPlane(tex.bg2,-t mod 6400*0.25,600)
ogl(color,1,1,1,0.7)
ogl.scrollPlane(tex.bg2,(-t mod 3200)*0.5,1200)
ogl(color,1,1,1,1)
ogl.2dmove(0,y*-0.1)
ogl.scrollPlane(tex.bg1,(-t mod 1600),700)
ogl.2dmove(0,370-y*0.5)
ogl.scrollPlane(tex.bg3,(-t mod 800)*2,600)
ogl.show
}
ogl.scrollPlane(long tex,float p,y){
ogl(texture,tex,1)
ogl.rectangle(p+0,0,p+800,y)
ogl.rectangle(p+1600,0,p+2400,y)
ogl.rectangle(p+1600,0,p+800,y)
}
err(string s){
messagebox(s,apptitle,4096)
end
}
|
|
|
| |
|
|
|
Frank Abbing | Yes, nice! |
|
|
| |
|
|
|
| could it on slower Computern testing (1,6ghz and 2,2ghz) and it working. |
|
|
| |
|
|
|
Peter Max Müller | Testumgebung: Notebook Windows XP SP1 Pentium 4 Mobile 2,4Ghz NVidia Map 17-232
Result: like a beetle.....runs and runs and runs and .................
Fazit: cordial Glückwunsch
Mfg Peter |
|
|
| |
|
|
|
Jac de Lad | During the Scrollens is a flackernder Strich on the edge the Katzenbildes To see. it disappears but then same to so of/ one second again. |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 01/24/08 ▲ |
|
|
|
|
Jörg Sellmeyer | means on my Athlon with 2 gh runs astrein. it sees but relatively unspekakulär from (lines on schwarzem background, which overtake), therefore be I do not sure, whether the so must. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 01/24/08 ▲ |
|
|
|
|
| lines on the Textures are correctly because I have me with whom Textures no Müh given!
One Image How on the Screenshot ought to however To see his - means not only lines!
It can his that I The Texturauflösung with 512x512 something To high proportion have, 256x256 runs sure on More GraKarten.
only whether the Scrolling liquid is is for me definitive. |
|
|
| |
|
|
|
| Thank you!
functions well with hardly someone anderem what? [...] |
|
|
| |
|
|
|
Jörg Sellmeyer | Ah! now! sees super from - my cat is keen. was the because at first time the same and you have what changed, or what? |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 01/24/08 ▲ |
|
|
|
|
Jörg Sellmeyer | interestingly: sometimes see I The Images not, to Program Start. If I then Enter press, funktionierts again. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 01/24/08 ▲ |
|
|
|
|
| nothing changed - objectively I had too once a Start which quite no Textures indicating. I have no idea How the zustande comes I weder subclasse or something other do what XProfan confusion bring could.
Textures must in the Ausführungsverzeichnis lying - vlt. lying it on it. |
|
|
| |
|
|
|
Jörg Sellmeyer | Nö - everything from the zipper-File in a directory entpackt and launched. is Yes then in ongoing pursued with Enter again i. O. come... |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 01/24/08 ▲ |
|
|
|