Forum | | | | Tango | now be I with my Latein end. I get it simply not there. How can I because Files, Images, Texts in the background recharge? goes the at all and if so, How? me missing simply the Ansatz moreover.
any try The I made have lay all Animationen gammy until loaded are.
How can the in principle solve? |
| | | | |
| | Georg Teles | day,
say time very, what You to have, best with a example and which Profanversion You using. so far I know, there a Helpfile with xProfan with, such there zB to Bildhandle
I login me later, if I daheim be.
Hello |
| | | | |
| | Tango | Georg Teles (10.03.2017)
day,
say time very, what You to have, best with a example and which Profanversion You using. so far I know, there a Helpfile with xProfan with, such there zB to Bildhandle
I login me later, if I daheim be.
Hello
Hello Georg,
I have large Problems my Diashow on OpenGL-Base liquid To operate. The oGL-story runs super and so How I me the virtual have. load I now a Bilderserie or only one Image, stoppt all Animation and of course such a long time To the/The Image(it) loaded are/is. thereafter works everything. therefore was my Überlegung The Bilderserie ebend in the background into Memory loading during The Animation in the Vordergund already runs and something other shows as The Images.
I slopes time my kompletten Wurstel-Test-code on.
whom You whom Testest lay time in the Programmverzeichnis The subesquent Ordner on:
X:/Programmverzeichnis/Images/1/1.....20.jpg etc.
and a Ordner namens Sound and pack there a mp3 with "1.mp3" into.
Achso: I use XProfan 3.1
Var number% = 0
Var position! = 25
Var color! = 0
Declare hfont&, font&
Declare end%, The%'Variable for Abbruchbedingung
Declare pos!, ruddy!'Positions- and RotationsVariablen
Declare textur%, bullet#
Declare texture%[500]
Declare time&
declare r!
'places The Fensterform solid
'Window Style 64 + 16 'Window without welt and
Window %MaxX, %MaxY'Window on Desktopauflösung adjust
CLS 0
'Initialisiert OpenGL
oGL("Init", %hWnd, 0, 0, 0, 0)
oGL("BlendMode",1)
'oGL("LoadXPGL", "Linie.xpgl") 'loading Linienpunkte from File line.xpgl
'oGL("UseXPGL", 1) 'uses these Linienpunkte
'places Lauftschrift solid
hfont& = create("Font", "Courier New", 32, 0, 0, 10, 0)'loading Font in Variable hfont&
font& = oGL("OutlineFont", hfont&, 0.3)'points hfont& oGL To
deleteobject hfont&'destroy Objekt hfont& again, because it to Zuweisung not any more needed becomes
directory 1'reads Bilddaten one
'game Mukke ex
MIDI("Play", $PROGDIR + "Sound\" + "1.mp3", -1)
SetTimer 5'max. 50 Frames /sek.
WhileNot end%'If no Abbruchbedingung recognized watts, durchlauf the Timers
If IsKey(27)'is Abbruchbedingung "Escape-Taste" erfüllt, then
end% = 1'setting Variable end% on 1
EndIf'and finish these request
'print "noch one test"
Case position! < -100 : position! = 25'If Text behind linkem Bildschirmrand disappeared then starte it again of in front
Case color! = 90 : color!=1'If Rotationswinkel 90strain access, then on 0 settle
OpenGL()'draw derweil OpenGL
EndWhile'spring To WhileNot
KillTimer'finish to 5ms whom Timer or rather said: spring to 5ms again to that SetTimer
End
Proc directory
Parameters Folder$'The Parameter Passing the current Verzeichnisses
Var counter% = 0 : Var i% = 0'Zählvariablen to that reading the Images
Declare File$, bild&'File and Bildnummer
Declare way$, Images$'way the current Verzeichnisses and Bilddaten in Vaiable Save
'Bildverzeichnis Initialisieren
way$ = $PROGDIR + "Bilder\" + Folder$ + "\"
ChDir way$
way$ = way$ + "*.jpg"
Images$ = FindFirst$(way$)
AddFiles Images$
'seek to Images and points These the Variable Images$ To
WhileNot %IOResult
Images$=FindNext$()
addfiles Images$
inc counter%
EndWhile
'orders The loaded Images the TexturArray To
whilenot number% = counter%
FILE$ = ListBoxItem$(number%)
bild& = Create("hsizedPic",-1, File$,1280,1024,1)
casenot bild& : continue
texture%[i% + 1] = oGL("getTextureBMP",bild&,1)
deleteObject bild&
inc i%
inc number%
endwhile
ENDPROC
proc OpenGL
position! = position! - 0.05
color! = color! + 0.05
oGL("Clear")
' oGL("Origin", 0.0, 0.0, -9.0) 'setting position the XPGL-lines
' oGL("DrawXPGL", 0, 4) 'draw ebend these lines
oGL("Origin", 0, 0, -30)
oGL("Color", cos(color!), sin(color!), 1 - 0.5*cos(color!/30), 1)
oGL("Move", position!, 11.7, 0)
oGL("Print", font&, " DiaShow V1.0 lorem ipsum...........")
'oGL("Fog",3,0,25 + sin(rotation!))
oGL("Origin", 0, 0, -30)
oGL("Color", cos(color!/10), sin(color!/3), 1 - 0.5*cos(color!), 1)
oGL("Move", position!/0.7, -12.2, 0)
oGL("Print", font&, " lorem ipsum ................................................................ ")
'Sprites
'oGL("Origin", -3.4, -0.1, -6.0)
'oGL("Color", 10, 10, 10, 1)
'oGL("Quad", %MaxX, 0.1)
'oGL("Origin", 0, 0, -12)
'oGL("Draw", bullet#)
'oGL("Origin", 0, 0, -6)
' oGL("Origin", 0, -4.5, -18)
' oGL("Draw", bullet#)
if &GetTickCount - time& >= 5000'5 sec are rum
r! = r! + 1
case r! = number% : r! = 1
time& = &GetTickCount
endif
'Images loading
oGL("Origin", 0, -4, -12)
oGl("color",1,1,1,1)
oGl("move",-5.8, 0, -7.5)
oGL("Rotate", 0, 30, sin(color!))
oGl("push")
oGL("Texture", texture%[r!], 1)
oGL("Quad", 13, 8)
oGl("pop")
oGL("Origin", 0, -4, -12)
oGl("color",1,1,1,1)
oGl("move",5.8, 0, -7.5)
oGL("Rotate", 0, -30+sin(color!)/0.5, cos(color!))
oGl("push")
oGL("Texture", texture%[r!+2], 1)
oGL("Quad", 13, 8)
oGl("pop")
oGL("Show")'shows any Objects
ENDPROC
|
| | | | |
| | Georg Teles | day,
if you already something other Show want during The Images loaded go, there verschidene Opportunities:
try can You with Multiprocessing of XProfan, that one paralleler Process The Images loading and the primäre The Animation undertaking. have straight no example sry.
Callback function can itself too look at, have unfortunately too no example, must basteln.
Have but what discover: with the Loop between SetTimer and KillTimer füge Please one WaitInput, so takes your Program The whole Processor performance
SetTimer 5'max. 50 Frames /sek.
WhileNot end%'If no Abbruchbedingung recognized watts, durchlauf the Timers
Waitinput'<- here
If IsKey(27)'is Abbruchbedingung "Escape-Taste" erfüllt, then
end% = 1'setting Variable end% on 1
EndIf'and finish these request
'print "noch one test"
Case position! < -100 : position! = 25'If Text behind linkem Bildschirmrand disappeared then starte it again of in front
Case color! = 90 : color!=1'If Rotationswinkel 90strain access, then on 0 settle
OpenGL()'draw derweil OpenGL
EndWhile'spring To WhileNot
KillTimer'finish to 5ms whom Timer or rather said: spring to 5ms again to that SetTimer
End
|
| | | | |
| | Tango | Hello too,
have strain The Help ready. it schein as would there Multiprocessing the right lane. still understand I do not really what there of me wants. but i think, I The LadeProc the Images into Module pack, the runs then parallel to that Hauptprogramm what about me can then The Bilddaten on the Hauptprogramm to Laufzeit transfer.
see I the so correctly.?
Verwirrend find I there only The Auzssage with Multiprocessing and Callback, "Das Program power first moreover, if the Process exits ist".
so have I still the same in green or? |
| | | | |
| | Sub-Topic: Multiprozessing [...] created. |
| | | | |
|
AnswerThemeninformationenthis Topic has 2 subscriber: |