Hi,
da ich gerade am OpenGL lernen bin (statt GDI+ :D) wollte ich euch mal meinen Progress vorstellen.
Den Sourcecode gibt es hier schon zu sehen, jedoch muss man das .zip Archiv downloaden, da dort 3 .dlls und die .au3, welche benötigt wird, enthalten sind.
Ist noch nicht wirklich kompliziert, jedoch bin ich ja auch gerade erst am lernen
Hier der Source:
Spoiler anzeigen
#include "GlPluginUtils.au3"
[/autoit] [autoit][/autoit] [autoit]AutoItSetOption("TrayIconHide", 1)
AdlibRegister("_CheckWindow", 1000)
$Title = "Simple Progessbar with OpenGL by Pinguin94"
$Scale = 0.5
$Translate = -142
$Change = 0
$Stop = 0
$Percent = 0
$Old = 0
DefineGlWindow($Title, 440, 300)
SetClearColor( 0.5, 0.5, 0.5)
CreateLight(0, 200, 1000, 400)
SetLightAmbient(0, 0.2, 0.2, 0.2)
SetLightDiffuse(0, 1, 1, 1)
$Text1 = ObjectCreate()
AddStrokeText($Text1, 0, 0, 0, 1.0, 1, 0, "0%")
ObjectScale($Text1, 0.2, 0.2, 0.2)
ObjectTranslate($Text1, -20, 75, 0)
SetPrint($Text1)
$Cube1 = ObjectCreate()
$Box = AddCube($Cube1, 30, 30, 30, 0, 1, 0, 1)
ObjectTranslate($Cube1, -138, 25, 0)
SetPrint($Cube1)
$Cube2 = ObjectCreate()
_CreateWireCube($Cube2, -20, 20, -20, 20, -20, 20 , 1, 0, 0)
ObjectTranslate($Cube2, 0, 25, 0)
ObjectScale($Cube2, 8, 1, 1)
SetPrint($Cube2)
SetCamera(0, 100, 300, 0, 30, 0)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
SceneDraw()
Sleep(25)
If $Percent <> $Old Then
ObjectDelete($Text1)
$Text1 = ObjectCreate()
AddStrokeText($Text1, 0, 0, 0, 1.0, 1.0, 0.0, $Percent)
ObjectScale($Text1, 0.2, 0.2, 0.2)
ObjectTranslate($Text1, -20, 75, 0)
SetPrint($Text1)
$old = $Percent
EndIf
ObjectTranslate($Cube1, $Translate + $Change, 25, 0 )
ObjectScale($Cube1, $Scale, 1, 1)
If $Stop = 0 Then
$Scale += 0.02
$Change += 0.3
EndIf
If $Scale >= 10 Then $Stop = 1
$Percent = Floor(100/10 * $Scale) & "%"
WEnd
Func _CheckWindow()
If Not WinExists($Title) Then Exit
EndFunc
Ich hoffe es gefällt euch
MfG