OpenCL meets OpenGL in AutoIt

  • Hi zusammen,

    vor gut einem Jahr habe ich OpenCL mit OpenGL kombiniert.
    Mit OpenCL werden gut parallelisierbare Berechnungen auf der Grafikkarte oder einem Grafikprozessor oder einer CPU ausgeführt. Diese Berechnungen erfolgen aufgrund der Leistungsfähigkeit der modernen Grafik-Prozessoren wesentlich schneller als auf einer Hightech-CPU. Der "Flaschenhals" ist idR. der Transport der Daten aus dem RAM in den Speicher der Grafikkarte und wieder zurück ins RAM.
    Bei grafischen Berechnungen bietet es sich also an, die Daten, die ja schon fertig berechnet im Speicher der Grafikkarte stehen, von dort direkt anzuzeigen. Und hier kommt OpenGL ins Spiel!

    Ich verwende die mit OpenCL berechneten "Bilder" einfach als OpenGL-Textur, und lasse diese dann im OpenGL-Kontext darstellen. Die berechneten Daten verbleiben also im Speicher der Grafikkarte!
    Das beschleunigt die Darstellung gegenüber dem Verfahren "per GDI blitten" (also Daten aus der Graka in den RAM schreiben und das dann wieder per GDI auf die Graka blitten) um den Faktor 3-5!
    Um das Ganze auch handlebar zu machen, habe ich versucht, die Funktionen so weit wie möglich zu wrappern, damit sich der Anwender nicht mit den OpenCL- und GL-Interna auseinandersetzen muss. Die entsprechenden (meist C++) Beispiele in den OpenCL/GL-SDK´s sind (jedenfalls für mich) extrem unübersichtlich, weiß der Teufel, wieso da keiner auf die Idee kommt, hunderte ewig gleich ablaufende Funktionsschritte in eine Handvoll gewrapperte Funktionen zu schreiben....

    Bei den Beispielen weden die aus den ASM- und OpenCL-Threads bekannten Scriptbeispiele Tunnelflug und Flug durch die Mandelbrotmenge einmal im Fenster komplett und dann als Projektion auf die Oberflächen von mehreren drehenden Würfeln verwendet. Selbst auf meinem Billigrechner mit Low-Lvl-GPU läuft der Tunnelflug in einem 768x768 Fenster mit sehr knapp unter 1000FPS 8o , die Projektion des Fluges durch die Mandelbrotmenge auf den Oberflächen der rotierenden Würfel mit ca. 120FPS.

    Fürs OpenGL habe ich die Funktionen von minx´ens UDF verwendet und ggf. angepasst.
    Die OpenCL-Funktionen kennt der eine oder andere vielleicht schon aus den entsprechenden Threads.
    Verfahrensweg ist folgender:
    - OpenGL-Fenster und -Textur erstellen
    - Mit OpenCL die Textur mit Bilddaten (Pixeln) füllen
    - Textur im OpenGL-Fenster darstellen.

    Spoiler anzeigen
    [autoit]

    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_usex64=n
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include "..\Includes\opengl.au3"
    #include <opencl_easy.au3>
    #include <GUIConstantsEx.au3>
    #include <WinAPI.au3>
    #include <GDIConstants.au3>
    #include <Misc.au3>
    #include <CLGL_easy.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;INFOS!!!
    ;erst textur in openGL erstellen und binden, dann erst CL-context erstellen

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;programmspezifisch...
    $CL_DEBUGFLAG = 1 ;1 debug aus
    Global $width = 256 * 3 ;breite und höhe des Fensters
    Global $height = 256 * 3
    Local $iAlpha = 0.00 ; Rotationswinkel um den Würfel zu drehen.

    [/autoit] [autoit][/autoit] [autoit]

    Global $textur_width = $width, $textur_height = $height ;texturmaße = Fenstermaße

    [/autoit] [autoit][/autoit] [autoit]

    Local $step = 1.02 ;das ist die Schrittweite, um die der Tunnelflug ein Frame weiter gezeichnet wird
    Local $steps = 0 ;Beginn des Fluges...

    [/autoit] [autoit][/autoit] [autoit]

    $KernelSource = FileRead("Tunnelflug.cl") ;kernelsource aus datei laden
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $KernelSource = ' & $KernelSource & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;OpenGL und extensions initialisieren
    glInit()
    ;gluInit()
    glfwInit()

    [/autoit] [autoit][/autoit] [autoit]

    ;Fenster einrichten
    glfwOpenWindowHint($GLFW_WINDOW_NO_RESIZE, 1) ; Resize nicht möglich
    glfwOpenWindow($width, $height, 8, 8, 8, 0, 8, 0, $GLFW_WINDOW) ; Fenster öffnen
    glfwSetWindowTitle("tunnelflug ") ; Titel setzen

    [/autoit] [autoit][/autoit] [autoit]

    glMatrixMode($GL_PROJECTION) ; Projektionseinstellungen
    ;gluPerspective(14, $width / $height, 5, 40) ; Perspektive
    glOrtho(0, $width, 0, $height, 0, 128)
    glViewport(0, 0, $width, $height) ; Viewport
    glMatrixMode($GL_MODELVIEW) ; Betrachtungsmodus

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;GLCL context erstellen und an hdc (window) binden
    setGLCLcontext() ;aktuellen gl-context an dc (window) binden

    [/autoit] [autoit][/autoit] [autoit]

    ;leere textur erstellen mit höhe und breite
    Local $textur1 = createGLCLtexturebuffer($textur_width, $textur_height)

    [/autoit] [autoit][/autoit] [autoit]

    ;textur bereitstellen
    glEnable($GL_TEXTURE_2D) ; aktuelle Textur einschalten
    ;glEnable($GL_DEPTH_TEST) ;tiefentest bei 3d, unbedingt beim drehenden würfel mal auskommentieren^^

    [/autoit] [autoit][/autoit] [autoit]

    setGLCLautokernel() ;CL-equipment initialisieren, kernel kompilieren usw

    [/autoit] [autoit][/autoit] [autoit]

    ;bevor GL auf die Buffer zugreift, MUSS CL der Zugriff entzogen werden!!!
    clFinish($command_queue)

    [/autoit] [autoit][/autoit] [autoit]

    ;debugflag ausschalten 1=einschalten ;erzeugt debugausgabe in der console
    $CL_DEBUGFLAG = 0 ;Debug-Ausgabe ausschalten, um Geschwindigkeit zu erhöhen

    [/autoit] [autoit][/autoit] [autoit]

    glClear($GL_COLOR_BUFFER_BIT + $GL_DEPTH_BUFFER_BIT) ;Fenster clear
    glLoadIdentity() ;Ersetzt die aktuelle Matrix durch die Einheitsmatrix
    ;gldisable($GL_CULL_FACE)
    ;
    glTranslatef($width / 2, $height / 2, 0)

    [/autoit] [autoit][/autoit] [autoit]

    AdlibRegister("fps", 1000) ;1x pro sekunde die FPS darstellen
    _CL_SetArg(0, "ptr*", $writetoimage) ;erstes argument für den kernel ist das IMG
    ;hauptschleife
    While glfwGetWindowParam($GLFW_OPENED) And Not glfwGetKey($GLFW_KEY_ESC);
    ; Sleep(10)
    glFlush() ;GL erlaubt CL den Zugriff auf die Buffer

    [/autoit] [autoit][/autoit] [autoit]

    ;Kernel Parameter
    $steps += $step

    [/autoit] [autoit][/autoit] [autoit]

    _CL_SetArg(1, "float*", $steps) ;...und an kernel übergeben

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;ACHTUNG, da SIMD-kernel, nur 1/4 der daten benötigt!!! s. $globalDS !!!!
    executeCLkernel() ;Opencl-kernel ausführen, berechnet die Textur"pixel"

    [/autoit] [autoit][/autoit] [autoit]

    ;glClear($GL_COLOR_BUFFER_BIT + $GL_DEPTH_BUFFER_BIT) ;
    glBindTexture($GL_TEXTURE_2D, $textur1) ;

    [/autoit] [autoit][/autoit] [autoit]

    glBegin($GL_QUADS) ;
    glTexCoord2f(0, 1) ;
    glVertex2f(-$width / 2, -$height / 2) ;
    glTexCoord2f(1, 1) ;
    glVertex2f(+$width / 2, -$height / 2) ;
    glTexCoord2f(1, 0) ;
    glVertex2f(+$width / 2, +$height / 2) ;
    glTexCoord2f(0, 0) ;
    glVertex2f(-$width / 2, +$height / 2) ;
    glEnd() ;
    glFlush()

    [/autoit] [autoit][/autoit] [autoit]

    glfwSwapBuffers() ; Buffer tauschen.
    $fps += 1 ;FPS FTW :o)

    [/autoit] [autoit][/autoit] [autoit]

    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ; Aufräumen:
    glDeleteTextures(1, $textur1)
    glfwTerminate()
    glTerminate()

    [/autoit] [autoit][/autoit] [autoit]

    ;**********************Ende*********************

    [/autoit]

    Ich habe die von mir verwendeten OpenGL-DLL´s und deren Erweiterungen mitgegeben, wahrscheinlich kann man auf diese verzichten, wenn OpenGL und CL auf dem Rechner installiert sind.

    autoit.de/wcf/attachment/20862/ bspw. in den Ordner Examples aus minx´s OpenGL UDF kopieren

    autoit.de/wcf/attachment/20867/autoit.de/wcf/attachment/20872/autoit.de/wcf/attachment/20877/
    Wer Lust hat, kann ja 2 Texturen erstellen, schön wäre der durch den Tunnel fliegende mit der Mandelbrot-Oberfläche rotierende Würfel....ob das was für die nächste Revision in 1K wäre^^

  • Hi Andy,
    die Screenshots sehen gut aus, aber das Ganze funktioniert bei mir nicht:
    Ich hab hier die Mandelbrot-Würfel-Datei ausgeführt (nach den MsgBoxes kommt dann eine Animation mit weißen Würfeln)

    MsgBox: Error in Function clCreateFromGLBuffer Returncode: CL_INVALID_CONTEXT

    Console Output:

    Spoiler anzeigen

    @@ Debug(45) : $KernelSource = /**
    * original by AMD-SDK
    * modified for interop OpenCL/OpenGL by andy@autoit.de
    *
    * changed:
    * __global uchar4 * mandelbrotImage
    * to
    * write_only image2d_t output
    * and all positions were are writing back the pixels
    * because OpenGL interacts with image2d_t
    */

    /*============================================================ */

    /**
    * A fractal generator that calculates the mandlebrot set
    * http://en.wikipedia.org/wiki/Mandelbrot_set
    * @param mandelbrotImage mandelbrot images is stored in this
    * @param scale Represents the distance from which the fractal
    * is being seen if this is greater more area and
    * less detail is seen
    * @param maxIterations More iterations gives more accurate mandelbrot image
    * @param width size of the image
    */

    __kernel void mandelbrot_image2d (write_only image2d_t output,
    const float posx,
    const float posy,
    const float stepSizeX,
    const float stepSizeY,
    const uint maxIterations
    )
    {
    // int tid = get_global_id(0);
    int i = get_global_id(0) ; // x-coord
    int j = get_global_id(1) ; // y-coord Pixelkoordinaten

    int width = get_global_size(0);


    // height = get_global_size(1); //hoehe und breite

    // int i = tid % (width / 4);
    // int j = tid / (width / 4);

    int4 veci = {4 * i, 4 * i + 1, 4 * i + 2, 4 * i + 3};
    int4 vecj = {j, j, j, j};

    float4 x0;
    x0.s0 = (float)(posx + stepSizeX * (float)veci.s0);
    x0.s1 = (float)(posx + stepSizeX * (float)veci.s1);
    x0.s2 = (float)(posx + stepSizeX * (float)veci.s2);
    x0.s3 = (float)(posx + stepSizeX * (float)veci.s3);
    float4 y0;
    y0.s0 = (float)(posy + stepSizeY * (float)vecj.s0);
    y0.s1 = (float)(posy + stepSizeY * (float)vecj.s1);
    y0.s2 = (float)(posy + stepSizeY * (float)vecj.s2);
    y0.s3 = (float)(posy + stepSizeY * (float)vecj.s3);

    float4 x = x0;
    float4 y = y0;

    uint iter=0;
    float4 tmp;
    int4 stay;
    int4 ccount = 0;

    stay.s0 = (x.s0 * x.s0 + y.s0 * y.s0) <= 4.0f;
    stay.s1 = (x.s1 * x.s1 + y.s1 * y.s1) <= 4.0f;
    stay.s2 = (x.s2 * x.s2 + y.s2 * y.s2) <= 4.0f;
    stay.s3 = (x.s3 * x.s3 + y.s3 * y.s3) <= 4.0f;
    float4 savx = x;
    float4 savy = y;
    for(iter=0; (stay.s0 | stay.s1 | stay.s2 | stay.s3) && (iter < maxIterations); iter+= 16)
    {
    x = savx;
    y = savy;

    // Two iterations
    tmp = x * x + x0 - y * y;
    y = 2.0f * x * y + y0;
    x = tmp * tmp + x0 - y * y;
    y = 2.0f * tmp * y + y0;

    // Two iterations
    tmp = x * x + x0 - y * y;
    y = 2.0f * x * y + y0;
    x = tmp * tmp + x0 - y * y;
    y = 2.0f * tmp * y + y0;

    // Two iterations
    tmp = x * x + x0 - y * y;
    y = 2.0f * x * y + y0;
    x = tmp * tmp + x0 - y * y;
    y = 2.0f * tmp * y + y0;

    // Two iterations
    tmp = x * x + x0 - y * y;
    y = 2.0f * x * y + y0;
    x = tmp * tmp + x0 - y * y;
    y = 2.0f * tmp * y + y0;

    // Two iterations
    tmp = x * x + x0 - y * y;
    y = 2.0f * x * y + y0;
    x = tmp * tmp + x0 - y * y;
    y = 2.0f * tmp * y + y0;

    // Two iterations
    tmp = x * x + x0 - y * y;
    y = 2.0f * x * y + y0;
    x = tmp * tmp + x0 - y * y;
    y = 2.0f * tmp * y + y0;

    // Two iterations
    tmp = x * x + x0 - y * y;
    y = 2.0f * x * y + y0;
    x = tmp * tmp + x0 - y * y;
    y = 2.0f * tmp * y + y0;

    // Two iterations
    tmp = x * x + x0 - y * y;
    y = 2.0f * x * y + y0;
    x = tmp * tmp + x0 - y * y;
    y = 2.0f * tmp * y + y0;

    stay.s0 = (x.s0 * x.s0 + y.s0 * y.s0) <= 4.0f;
    stay.s1 = (x.s1 * x.s1 + y.s1 * y.s1) <= 4.0f;
    stay.s2 = (x.s2 * x.s2 + y.s2 * y.s2) <= 4.0f;
    stay.s3 = (x.s3 * x.s3 + y.s3 * y.s3) <= 4.0f;

    savx.s0 = (stay.s0 ? x.s0 : savx.s0);
    savx.s1 = (stay.s1 ? x.s1 : savx.s1);
    savx.s2 = (stay.s2 ? x.s2 : savx.s2);
    savx.s3 = (stay.s3 ? x.s3 : savx.s3);
    savy.s0 = (stay.s0 ? y.s0 : savy.s0);
    savy.s1 = (stay.s1 ? y.s1 : savy.s1);
    savy.s2 = (stay.s2 ? y.s2 : savy.s2);
    savy.s3 = (stay.s3 ? y.s3 : savy.s3);
    ccount += stay*16;
    }
    // Handle remainder
    if (!(stay.s0 & stay.s1 & stay.s2 & stay.s3))
    {
    iter = 16;
    do
    {
    x = savx;
    y = savy;
    stay.s0 = ((x.s0 * x.s0 + y.s0 * y.s0) <= 4.0f) &&
    (ccount.s0 < maxIterations);
    stay.s1 = ((x.s1 * x.s1 + y.s1 * y.s1) <= 4.0f) &&
    (ccount.s1 < maxIterations);
    stay.s2 = ((x.s2 * x.s2 + y.s2 * y.s2) <= 4.0f) &&
    (ccount.s2 < maxIterations);
    stay.s3 = ((x.s3 * x.s3 + y.s3 * y.s3) <= 4.0f) &&
    (ccount.s3 < maxIterations);
    tmp = x;
    x = x * x + x0 - y * y;
    y = 2.0f * tmp * y + y0;
    ccount += stay;
    iter--;
    savx.s0 = (stay.s0 ? x.s0 : savx.s0);
    savx.s1 = (stay.s1 ? x.s1 : savx.s1);
    savx.s2 = (stay.s2 ? x.s2 : savx.s2);
    savx.s3 = (stay.s3 ? x.s3 : savx.s3);
    savy.s0 = (stay.s0 ? y.s0 : savy.s0);
    savy.s1 = (stay.s1 ? y.s1 : savy.s1);
    savy.s2 = (stay.s2 ? y.s2 : savy.s2);
    savy.s3 = (stay.s3 ? y.s3 : savy.s3);
    } while ((stay.s0 | stay.s1 | stay.s2 | stay.s3) && iter);
    }
    x = savx;
    y = savy;
    float4 fc = convert_float4(ccount);
    fc.s0 = (float)ccount.s0 + 1 -
    native_log2(native_log2(x.s0 * x.s0 + y.s0 * y.s0));
    fc.s1 = (float)ccount.s1 + 1 -
    native_log2(native_log2(x.s1 * x.s1 + y.s1 * y.s1));
    fc.s2 = (float)ccount.s2 + 1 -
    native_log2(native_log2(x.s2 * x.s2 + y.s2 * y.s2));
    fc.s3 = (float)ccount.s3 + 1 -
    native_log2(native_log2(x.s3 * x.s3 + y.s3 * y.s3));

    float c = fc.s0 * 2.0f * 3.1416f / 256.0f;
    float4 color0;
    color0.s0 = ((1.0f + native_cos(c)) * 0.5f) ;
    color0.s1 = ((1.0f + native_cos(2.0f * c + 2.0f * 3.1416f / 3.0f)) * 0.5f) ;
    color0.s2 = ((1.0f + native_cos(c - 2.0f * 3.1416f / 3.0f)) * 0.5f) ;
    color0.s3 = 0.0f;
    if (ccount.s0 == maxIterations)
    {
    color0.s0 = 0.0f;
    color0.s1 = 0.0f;
    color0.s2 = 0.0f;
    }

    // mandelbrotImage[4 * tid] = color[0];
    write_imagef( output, (int2)( i*4, j ), color0 );

    float4 color1;
    c = fc.s1 * 2.0f * 3.1416f / 256.0f;
    color1.s0 = ((1.0f + native_cos(c)) * 0.5f) ;
    color1.s1 = ((1.0f + native_cos(2.0f * c + 2.0f * 3.1416f / 3.0f)) * 0.5f) ;
    color1.s2 = ((1.0f + native_cos(c - 2.0f * 3.1416f / 3.0f)) * 0.5f) ;
    color1.s3 = 0.0f;
    if (ccount.s1 == maxIterations)
    {
    color1.s0 = 0.0f;
    color1.s1 = 0.0f;
    color1.s2 = 0.0f;
    }

    //mandelbrotImage[4 * tid + 1] = color[1];
    write_imagef( output, (int2)( i*4+1, j ), color1 );

    float4 color2;
    c = fc.s2 * 2.0f * 3.1416f / 256.0f;
    color2.s0 = ((1.0f + native_cos(c)) * 0.5f) ;
    color2.s1 = ((1.0f + native_cos(2.0f * c + 2.0f * 3.1416f / 3.0f)) * 0.5f) ;
    color2.s2 = ((1.0f + native_cos(c - 2.0f * 3.1416f / 3.0f)) * 0.5f) ;
    color2.s3 = 0.0f;
    if (ccount.s2 == maxIterations)
    {
    color2.s0 = 0.0f;
    color2.s1 = 0.0f;
    color2.s2 = 0.0f;
    }

    //mandelbrotImage[4 * tid + 2] = color[2];
    write_imagef( output, (int2)( i*4+2, j ), color2 );

    float4 color3;
    c = fc.s3 * 2.0f * 3.1416f / 256.0f;
    color3.s0 = ((1.0f + native_cos(c)) * 0.5f) ;
    color3.s1 = ((1.0f + native_cos(2.0f * c + 2.0f * 3.1416f / 3.0f)) * 0.5f) ;
    color3.s2 = ((1.0f + native_cos(c - 2.0f * 3.1416f / 3.0f)) * 0.5f) ;
    color3.s3 = 0.0f;
    if (ccount.s3 == maxIterations)
    {
    color3.s0 = 0.0f;
    color3.s1 = 0.0f;
    color3.s2 = 0.0f;
    }
    //mandelbrotImage[4 * tid + 3] = color[3];
    write_imagef( output, (int2)( i*4+3, j ), color3 );

    }

    >Error code: 0
    @@ Debug(451) : $gl_context = 65536
    >Error code: 0
    @@ Debug(454) : $gl_hdc = 1661014353
    >Error code: 0
    @@ Debug(458) : $ret = No error
    >Error code: 0
    @@ Debug(201) : $genbuff = 1
    >Error code: 0
    @@ Debug(202) : $genbuff = Missing GL version
    >Error code: 0
    @@ Debug(204) : $textur_Obj = 1
    >Error code: 0
    @@ Debug(208) : $bind = 8464064
    >Error code: 0
    @@ Debug(214) : glewbufferdata = Unknown error
    >Error code: 0
    clGetPlatformIDs CL_SUCCESS
    >Number Platforms = 2
    @@ Debug(247) : $platform[$i] = 141913368
    >Error code: 0
    clGetGLContextInfoKHR CL_SUCCESS
    @@ Debug(267) : $ret = 8091008
    >Error code: 0
    clGetGLContextInfoKHR CL_SUCCESS
    clGetGLContextInfoKHR CL_SUCCESS
    @@ Debug(294) : $deviceid = 0
    >Error code: 1
    clCreateContext CL_SUCCESS
    @@ Debug(300) : $context = 0
    >Error code: 0
    clCreateCommandQueue CL_SUCCESS
    @@ Debug(343) : $command_queue = 0
    >Error code: 0
    @@ Debug(351) : $posBuf = 0
    >Error code: 0
    @@ Debug(399) : $kernel = 0
    >Error code: 0
    @@ Debug(411) : $MAX_WORK_GROUP_SIZE = 0
    >Error code: 0
    @@ Debug(417) : $GL_TEXTURE_2D = 3553
    >Error code: 0
    @@ Debug(418) : $CL_MEM_WRITE_ONLY = 2
    >Error code: 0
    @@ Debug(421) : $writetoimage = 0
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 0.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 0.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 1.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 1.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 2.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 2.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 3.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 3.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 4.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 4.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 5.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 5.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 6.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 6.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 7.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 7.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 8.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 8.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 9.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 9.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 10
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 10.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 10.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 11.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 11.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 12
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 12.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 12.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 13.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 13.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 14
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 14.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 14.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 15.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 15.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 16
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 16.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 16.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 17.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 17.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 18
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 18.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 18.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 19.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 19.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 20
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 20.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 20.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 21.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 21.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 22
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 22.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 22.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 23.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 23.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 24
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 24.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 24.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 25.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 25.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 26
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 26.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 26.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 27.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 27.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 28
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 28.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 28.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 29.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 29.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 30
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 30.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 30.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 31.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 31.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 32
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 32.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 32.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 33.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 33.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 33.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 34.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 34.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 35.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 35.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 35.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 36.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 36.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 37.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 37.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 37.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 38.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 38.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 39.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 39.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 39.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 40.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 40.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 41.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 41.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 41.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 42.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 42.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 43.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 43.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 43.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 44.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 44.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 45.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 45.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 45.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 46.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 46.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 47.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 47.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 47.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 48.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 48.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 49.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 49.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 49.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 50.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 50.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 51.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 51.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 51.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 52.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 52.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 53.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 53.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 53.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 54.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 54.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 55.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 55.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 55.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 56.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 56.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 57.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 57.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 57.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 58.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 58.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 59.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 59.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 59.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 60.3999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 60.7999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 61.1999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 61.5999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 61.9999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 62.3999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 62.7999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 63.1999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 63.5999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 63.9999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 64.3999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 64.7999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 65.1999999999998
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 65.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 65.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 66.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 66.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 67.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 67.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 67.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 68.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 68.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 69.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 69.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 69.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 70.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 70.7999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 71.1999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 71.5999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 71.9999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 72.3999999999999
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 72.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 73.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 73.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 74
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 74.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 74.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 75.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 75.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 76
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 76.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 76.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 77.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 77.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 78
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 78.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 78.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 79.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 79.6000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 80.0000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 80.4000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 80.8000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 81.2000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 81.6000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 82.0000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 82.4000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 82.8000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 83.2000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 83.6000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 84.0000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 84.4000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 84.8000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 85.2000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 85.6000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 86.0000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 86.4000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 86.8000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 87.2000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 87.6000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 88.0000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 88.4000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 88.8000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 89.2000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 89.6000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 90.0000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 90.4000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 90.8000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 91.2000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 91.6000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 92.0000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 92.4000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 92.8000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 93.2000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 93.6000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 94.0000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 94.4000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 94.8000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 95.2000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 95.6000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 96.0000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 96.4000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 96.8000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 97.2000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 97.6000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 98.0000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 98.4000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 98.8000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 99.2000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 99.6000000000003
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 100
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 100.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 100.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 101.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 101.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 102
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 102.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 102.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 103.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 103.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 104
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 104.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 104.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 105.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 105.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 106
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 106.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 106.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 107.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 107.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 108
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 108.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 108.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 109.2
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 109.6
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 110
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 110.4
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 110.8
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 111.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 111.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 112.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 112.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 112.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 113.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 113.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 114.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 114.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 114.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 115.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 115.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 116.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 116.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 116.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 117.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 117.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 118.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 118.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 118.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 119.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 119.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 120.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 120.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 120.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 121.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 121.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 122.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 122.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 122.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 123.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 123.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 124.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 124.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 124.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 125.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 125.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 126.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 126.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 126.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 127.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 127.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 128.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 128.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 128.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 129.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 129.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 130.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 130.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 130.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 131.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 131.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 132.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 132.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 132.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 133.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 133.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 134.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 134.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 134.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 135.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 135.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 136.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 136.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 136.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 137.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 137.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 138.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 138.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 138.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 139.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 139.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 140.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 140.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 140.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 141.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 141.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 142.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 142.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 142.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 143.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 143.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 144.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 144.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 144.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 145.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 145.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 146.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 146.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 146.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 147.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 147.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 148.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 148.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 148.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 149.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 149.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 150.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 150.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 150.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 151.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 151.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 152.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 152.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 152.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 153.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 153.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 154.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 154.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 154.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 155.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 155.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 156.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 156.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 156.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 157.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 157.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 158.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 158.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 158.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 159.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 159.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 160.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 160.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 160.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 161.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 161.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 162.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 162.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 162.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 163.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 163.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 164.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 164.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 164.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 165.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 165.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 166.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 166.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 166.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 167.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 167.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 168.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 168.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 168.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 169.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 169.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 170.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 170.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 170.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 171.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 171.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 172.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 172.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 172.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 173.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 173.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 174.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 174.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 174.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 175.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 175.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 176.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 176.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 176.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 177.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 177.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 178.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 178.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 178.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 179.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 179.600000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 180.000000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 180.400000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 180.800000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 181.200000000001
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 181.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 182.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 182.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 182.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 183.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 183.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 184.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 184.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 184.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 185.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 185.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 186.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 186.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 186.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 187.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 187.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 188.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 188.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 188.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 189.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 189.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 190.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 190.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 190.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 191.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 191.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 192.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 192.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 192.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 193.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 193.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 194.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 194.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 194.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 195.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 195.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 196.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 196.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 196.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 197.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 197.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 198.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 198.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 198.800000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 199.200000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 199.600000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 200.000000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 200.400000000002
    >Error code: 0
    @@ Debug(138) : $ibeta = 0
    >Error code: 0
    @@ Debug(139) : $iAlpha = 200.800000000002
    >Error code: 0

    Das sacht die Devices64:
    autoit.de/wcf/attachment/20882/

    Ich hoffe die Infos helfen.
    mfg

  • Andy! Du und deine GDIConstants.au3 :rolleyes: ... Wo soll ich die denn jetzt hernehmen? :D
    Der Devices64 Test funktioniert bei meiner GTX 570 und meiner i5 2500K CPU problemlos, aber das haben wir ja schon getestet. ;)

    Die Theorie klingt super, aber jetzt will ich es auch testen :D.

  • Hi,
    name22
    Sorry, alte Angewohnheiten...
    ersetze einfach

    [autoit]

    #include <GDIConstants.au3>

    [/autoit]

    durch

    [autoit]

    global $DIB_RGB_COLORS = 0

    [/autoit]

    , dann sollte es passen....

    TheShadowAE
    deine GPU wird ja laut Devices64 unterstützt, aber die Fehlermeldung kommt wohl daher, dass deine CPU als OpenCL-Device ausgesucht wird, ich versuche das mal abzufangen!

  • TheShadowAE
    versuche mal, in der CLGL_easy.au3 in Zeile 107

    [autoit]

    $num_platform = 2

    [/autoit]


    könnte sein, dass bei dir die erste Platform die CPU und die zweite die GPU ist...

  • Andy Danke ;). Mit der Variable meckert AutoIt zwar nicht mehr rum, aber leider habe ich nun ein ähnliches Problem wie TSAE.
    Jedes deiner Beispiele wirft mir eine ganze Kette von Fehlermeldungen aus, die sich aber scheinbar alle auf OpenCL beziehen.
    Ich habe das ganze mal visuell dokumentiert und in ein Archiv gepackt: autoit.de/wcf/attachment/20892/ :D

    Ich mache bestimmt irgendwas falsch, aber leider weiß ich nicht was ^^.

  • name22
    du machst bestimmt nichts falsch^^, ich verwende einen AMD-Prozessor und eine AMD Graka sowohl am PC als auch im Laptop...daher geht der Kelch mit Nvidia/Intel komplett an mir vorbei, so dass ich für diese Fälle auch keine Workarounds im Script implementieren kann :huh:
    Ich kämpfe mich mal durch die Logs, vielen Dank dafür!

    //EDIT//
    name22, starte mal pls das GLCL_Tunnelflug.au3 und poste die Consolenausgabe

    minx, die beiden bekommen keinen Rendercontext, wohl deswegen, weil die Intel-CPU als erste Platform vom Treiber geladen wird....ich muss das im Script irgendwie so hinbekommen, dass sämtliche Devices auf allen verfügbaren Platformen so lange durchprobiert werden, bis eins gefunden wird, das funktioniert.

    ciao
    Andy


    "Schlechtes Benehmen halten die Leute doch nur deswegen für eine Art Vorrecht, weil keiner ihnen aufs Maul haut." Klaus Kinski
    "Hint: Write comments after each line. So you can (better) see what your program does and what it not does. And we can see what you're thinking what your program does and we can point to the missunderstandings." A-Jay

    Wie man Fragen richtig stellt... Tutorial: Wie man Script-Fehler findet und beseitigt...X-Y-Problem

    Einmal editiert, zuletzt von Andy (27. April 2013 um 20:08)

  • Andy Bitte:

    Spoiler anzeigen


    Die Warnungen am Anfang bekomme ich bei den anderen Beispielen nicht.

  • Danke, genau wie ich es gedacht hatte....
    Es funktioniert alles bis zur Device-ID.
    Der Versuch aus Post 5 funktioniert bei dir nicht?

    Komisch, wenn Devices64.au3 bei dir fehlerfrei läuft, könntest du die Console daraus mal posten?

    ah noch etwas ist bei euch beiden anders als bei mir!

    Code
    @@ Debug(76) : glewbufferdata = Unknown error

    da sollte kein Fehler kommen! Ich häng mich mal dran

  • Ich sehe nur schwarz. Es wird zwar was berechnet, aber die GUI bleibt schwarz (GLCL_mandelbrot_flug.au3). Vielleicht häng's an meiner Onboard Gfx Karte...

    Bei den anderen Beispielen tunnelflug_GLCL_*.au3 und wuerfel_GLCL_*.au3 bekomme ich eine Menge Fehlermeldungen.

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Danke für die Hinweise!
    Was mich wundert ist die Fehlerausgabe bei euch:

    Code
    @@ Debug(76) : glewbufferdata = Unknown error

    da wird nichts weiter gemacht, als einen Buffer zu erstellen.
    Noch seltsamer ist, dass die DLL ja beigelegt ist und somit Systemunabhängig bei gleichen Eingabeparametern auch ein gleiches Ergebnis ausgeben müsste?!

    Bitte mal folgendes kurzes Script testen und Consolenoutput posten:

    Spoiler anzeigen
    [autoit]

    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_usex64=n
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include "..\Includes\opengl.au3"
    #include <opencl_easy.au3>
    #include <GUIConstantsEx.au3>
    #include <WinAPI.au3>
    ;#include <GDIConstants.au3>
    #include <Misc.au3>
    ;#include <CLGL_easy.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    global $DIB_RGB_COLORS = 0
    Global $glew_hDLL = DllOpen("glew32.dll")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global Const $GL_ARRAY_BUFFER = 0x8892 ;gehört in include
    Global Const $GL_DYNAMIC_DRAW = 0x88E8 ;gehört in include
    Global Const $GL_BGRA = 0x80E1
    ;INFOS!!!
    ;erst textur in openGL erstellen und binden, dann erst CL-context erstellen

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;programmspezifisch...
    $CL_DEBUGFLAG = 1 ;1 debug aus
    Global $width = 256 * 3 ;breite und höhe des Fensters
    Global $height = 256 * 3

    [/autoit] [autoit][/autoit] [autoit]

    Global $bufferdatasize=$width*$height*4

    [/autoit] [autoit][/autoit] [autoit]

    Global $textur_width = $width, $textur_height = $height ;texturmaße = Fenstermaße
    Global $Textur1

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;OpenGL und extensions initialisieren
    glInit()
    ;gluInit()
    glfwInit()

    [/autoit] [autoit][/autoit] [autoit]

    $a=glewinit()
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Fenster einrichten
    glfwOpenWindowHint($GLFW_WINDOW_NO_RESIZE, 1) ; Resize nicht möglich
    glfwOpenWindow($width, $height, 8, 8, 8, 0, 8, 0, $GLFW_WINDOW) ; Fenster öffnen
    glfwSetWindowTitle("tunnelflug ") ; Titel setzen

    [/autoit] [autoit][/autoit] [autoit]

    glMatrixMode($GL_PROJECTION) ; Projektionseinstellungen
    ;gluPerspective(14, $width / $height, 5, 40) ; Perspektive
    glOrtho(0, $width, 0, $height, 0, 128)
    glViewport(0, 0, $width, $height) ; Viewport
    glMatrixMode($GL_MODELVIEW) ; Betrachtungsmodus

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;GLCL context erstellen und an hdc (window) binden
    ;setGLCLcontext() ;aktuellen gl-context an dc (window) binden

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $a=glewinit()
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    ;GL-Version überprüfen
    $erg = _glewIsSupported("GL_VERSION_2_0")
    $erg1 = _glewIsSupported("GL_ARB_pixel_buffer_object")
    If $erg = False Or $erg1 = False Then
    MsgBox(0, "GLEW", "GL_VERSION_2_0 or GL_ARB_pixel_buffer_object is not supported!")
    Exit
    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Buffer erstellen....
    $textur_obj_struct = _DllStructCreate16("int[100]")
    $textur_obj_ptr = DllStructGetPtr($textur_obj_struct)

    [/autoit] [autoit][/autoit] [autoit]

    ;bufferhandle holen
    $genbuff = glewGenBuffers(1, $textur_obj_ptr) ;
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $genbuff = ' & $genbuff & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
    $textur_Obj = DllStructGetData($textur_obj_struct, 1, 1)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $textur_Obj = ' & $textur_Obj & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    ;.....und an den arraybuffer binden
    $bind = glBindBuffer($GL_ARRAY_BUFFER, $textur_Obj) ;
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $bind = ' & $bind & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    ;Buffergrösse und pointer festlegen und an arraybuffer binden
    $struct = _dllstructcreate16("float[" & $bufferdatasize & "]") ;width * height * 4
    $textur_ptrbuffer = DllStructGetPtr($struct)

    [/autoit] [autoit][/autoit] [autoit]

    $a = glewBufferData($GL_ARRAY_BUFFER, $bufferdatasize, 0, $GL_DYNAMIC_DRAW);
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : glewbufferdata = ' & glewGetErrorString($a) & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $a = glewBufferData($GL_ARRAY_BUFFER, $bufferdatasize, $textur_ptrbuffer, $GL_DYNAMIC_DRAW);
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : glewbufferdata = ' & glewGetErrorString($a) & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func glewGetErrorString($nr)
    $aCall = DllCall($glew_hDLL, "str", "_glewGetErrorString@4", 'int', $nr)
    Return $aCall[0]
    EndFunc ;==>glewGetErrorString

    [/autoit] [autoit][/autoit] [autoit]

    Func glewGenBuffers($nr, $ptr) ; by [email='Andy@autoit.de'][/email]
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : get_glew_address("__glewGenBuffers") = ' & get_glew_address("__glewGenBuffers") & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    $aCall = DllCallAddress("int", get_glew_address("__glewGenBuffers"), "int", 1, "uint", $ptr)
    Return $aCall[0]
    EndFunc ;==>glewGenBuffers

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func glBindBuffer($target, $buffer) ; by [email='Andy@autoit.de'][/email]
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : get_glew_address("__glewBindBuffer") = ' & get_glew_address("__glewBindBuffer") & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    $aCall = DllCallAddress("int", get_glew_address("__glewBindBuffer"), "int", $target, "uint", $buffer)
    Return $aCall[0]
    EndFunc ;==>glBindBuffer

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func glewBufferData($target, $size, $data, $usage) ; by [email='Andy@autoit.de'][/email]
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : get_glew_address("__glewBufferData") = ' & get_glew_address("__glewBufferData") & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $aCall = DllCallAddress("int", get_glew_address("__glewBufferData"), "uint", $target, "uint", $size, "ptr", $data, "uint", $usage)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $aCall = ' & $aCall & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    Return $aCall[0]
    EndFunc ;==>glewBufferData

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func glewInit()

    [/autoit] [autoit][/autoit] [autoit]

    Local $ret = DllCall($glew_hDLL, "int", "_glewInit@0")
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ret = ' & $ret & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    Return $ret[0]
    EndFunc ;==>glewInit

    [/autoit] [autoit][/autoit] [autoit]

    Func _glewIsSupported($str)
    ; ---
    Local $ret = DllCall($glew_hDLL, "int", "_glewIsSupported@4", "str", $str)
    Return SetError($ret[0] = 0, 0, $ret[0] = 1)
    EndFunc ;==>_glewIsSupported

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func get_glew_address($func) ; by [email='Andy@autoit.de'][/email]
    $ret = DllCall("kernel32.dll", "ptr", "GetProcAddress", "ptr", _WinAPI_GetModuleHandle("glew32.dll"), "str", $func)
    ;_arraydisplay($ret)
    $struct = DllStructCreate("dword", $ret[0]) ;einsprungadresse, hier steht der pointer zur funktion
    Return DllStructGetData($struct, 1, 1)
    EndFunc ;==>get_glew_address

    [/autoit]
  • Ergebnis:

    Spoiler anzeigen
  • Und hier das von mir:

    Spoiler anzeigen

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Andy in der Devices64 kommt zuerst die Graka zum Vorchein, dann kommt die Fehlermeldung (siehe Bild letzter Post) und dann kommt die CPU, allerdings haben beide in der Tabelle die Device-Nr. 1

    Wenn ich kompiliert habe kommt folgende Fehlermeldung:
    wglMakeCurrent
    Error!

    Die Änderung in Zeile 107 hat nur bewirkt, dass ich nichtmal mehr die weißen Würfel sehe.


    Hier auch das Ergebnis von mir:

    Spoiler anzeigen
  • Vielen Dank ihr beiden!

    UEZ,
    verstehe ich ehrlich gesagt nicht, die Adressen innerhalb der GLEW32.DLL werden erkannt und die Funktionen dort wohl auch ausgeführt (ohne Fehlermeldung) aber es wird kein Ergebnis zurückgegeben...
    Ich vermute, entweder wird dein (integrierter ? ) Grafik-chip nicht von OpenGL bzw dem Treiber unterstützt, oder es gibt Trouble mit der CPU Verbindung mit der Darstellung über OpenGL. Da werde ich mich mal drum kümmern.
    Funktionieren die Beispiele von minx´s UDF?

    Es hört sich vielleicht etwas komisch an, den CL-Part auf einer CPU rechnen zu lassen, aber gerade bei Systemen mit in der CPU integriertem Grafikchip macht das Sinn, denn es entfällt komplett der (zeitaufwendige) Transport der Daten zum Grafik-RAM, denn die integrierten Grafikchips benutzen ja einen Teil des RAM, indem wiederum per OpenCL (auf der CPU) gerendert wird!
    Genauso sieht es aus, wenn ich auf meinem Laptop mit AMD-Fusion-Prozessor(integriertem Grafikchip) und zusätzlicher externer Grafik rechne. Beide sind, bei Kombination CL/GL gleich schnell, obwohl der externe Grafikchip doppelt so leistungsfähig ist!
    Erkennbar und erklärbar, wenn man sich die Ergebnisse von Devices64 anschaut, dort sieht man, dass die MEMtime, also die Zeit des Datentransports zum und vom Grafikspeicher beim integriertem Grafikchip NULL beträgt! Logisch, und clever von AMD gemacht, denn es muss kein Speicher verschoben werden, der Grafikchip nutzt ja das RAM der CPU (samt integriertem Grafikchip)!

    @Name 22,
    funktionieren bei dir die Beispiele in minx´s UDF?

  • okay, davon gehe ich aus^^

    Bitte nochmal folgendes Script testen und die Consolenausgabe posten, dort werden eure OpenGL-Versionen ermittelt und die für GL erforderlichen Extensions abgefragt.

    Spoiler anzeigen
    [autoit]

    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_usex64=n
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include "..\Includes\opengl.au3"
    #include <opencl_easy.au3>
    #include <GUIConstantsEx.au3>
    #include <WinAPI.au3>
    ;#include <GDIConstants.au3>
    #include <Misc.au3>
    ;#include <CLGL_easy.au3>
    #include<array.au3>

    [/autoit] [autoit][/autoit] [autoit]

    global $DIB_RGB_COLORS = 0
    Global $glew_hDLL = DllOpen("glew32.dll")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global Const $GL_ARRAY_BUFFER = 0x8892 ;gehört in include
    Global Const $GL_DYNAMIC_DRAW = 0x88E8 ;gehört in include
    Global Const $GL_BGRA = 0x80E1
    ;INFOS!!!
    ;erst textur in openGL erstellen und binden, dann erst CL-context erstellen

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;programmspezifisch...
    $CL_DEBUGFLAG = 1 ;1 debug aus
    Global $width = 256 * 3 ;breite und höhe des Fensters
    Global $height = 256 * 3

    [/autoit] [autoit][/autoit] [autoit]

    Global $bufferdatasize=$width*$height*4

    [/autoit] [autoit][/autoit] [autoit]

    Global $textur_width = $width, $textur_height = $height ;texturmaße = Fenstermaße
    Global $Textur1

    [/autoit] [autoit][/autoit] [autoit]

    ;GL_VENDOR, GL_RENDERER, GL_VERSION, or GL_SHADING_LANGUAGE_VERSION.

    [/autoit] [autoit][/autoit] [autoit]

    ;OpenGL und extensions initialisieren
    glInit()
    ;gluInit()
    glfwInit()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $a=glewinit()
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Fenster einrichten
    glfwOpenWindowHint($GLFW_WINDOW_NO_RESIZE, 1) ; Resize nicht möglich
    glfwOpenWindow($width, $height, 8, 8, 8, 0, 8, 0, $GLFW_WINDOW) ; Fenster öffnen
    glfwSetWindowTitle("tunnelflug ") ; Titel setzen

    [/autoit] [autoit][/autoit] [autoit]

    glMatrixMode($GL_PROJECTION) ; Projektionseinstellungen
    ;gluPerspective(14, $width / $height, 5, 40) ; Perspektive
    glOrtho(0, $width, 0, $height, 0, 128)
    glViewport(0, 0, $width, $height) ; Viewport
    glMatrixMode($GL_MODELVIEW) ; Betrachtungsmodus

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;GL-context holen
    $gl_context = wglGetCurrentContext()
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $gl_context = ' & $gl_context & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
    ;GL-DC vom Fenster holen
    $gl_hdc = wglGetCurrentDC()
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $gl_hdc = ' & $gl_hdc & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    ;jetzt erst glew initialisieren!
    $init = glewinit()
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $init = ' & $init & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ret = ' & glewGetErrorString($init) & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    ;Context an aktuellen DC binden
    $err = wglMakeCurrent($gl_hdc, $gl_context)
    If $err = 0 Then
    MsgBox(0, " wglMakeCurrent", "Error!")
    Exit
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ;GLCL context erstellen und an hdc (window) binden
    ;setGLCLcontext() ;aktuellen gl-context an dc (window) binden

    [/autoit] [autoit][/autoit] [autoit]

    GLOBAL $GL_SHADING_LANGUAGE_VERSION=0x8B8C

    [/autoit] [autoit][/autoit] [autoit]

    $vendor=glGetString($GL_VENDOR)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $vendor = ' & $vendor & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $renderer=glGetString($GL_RENDERER)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $renderer = ' & $renderer & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    $version=glGetString($GL_VERSION)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $version = ' & $version & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $version=glGetString($GL_SHADING_LANGUAGE_VERSION)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $version = ' & $version & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $extensions=glGetString($GL_EXTENSIONS)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $extensions = ' & $extensions & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $a=glewinit()
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    ;GL-Version überprüfen
    $erg = _glewIsSupported("GL_VERSION_2_0")
    $erg1 = _glewIsSupported("GL_ARB_pixel_buffer_object")
    If $erg = False Or $erg1 = False Then
    MsgBox(0, "GLEW", "GL_VERSION_2_0 or GL_ARB_pixel_buffer_object is not supported!")
    Exit
    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Buffer erstellen....
    $textur_obj_struct = _DllStructCreate16("int[100]")
    $textur_obj_ptr = DllStructGetPtr($textur_obj_struct)

    [/autoit] [autoit][/autoit] [autoit]

    ;bufferhandle holen
    $genbuff = glewGenBuffers(1, $textur_obj_ptr) ;
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $genbuff = ' & $genbuff & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
    $textur_Obj = DllStructGetData($textur_obj_struct, 1, 1)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $textur_Obj = ' & $textur_Obj & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $bind = glBindBuffer($GL_ARRAY_BUFFER, 0) ;
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $bind = ' & $bind & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;.....und an den arraybuffer binden
    $bind = glBindBuffer($GL_ARRAY_BUFFER, $textur_Obj) ;
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $bind = ' & $bind & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    ;Buffergrösse und pointer festlegen und an arraybuffer binden
    $struct = _dllstructcreate16("float[" & $bufferdatasize & "]") ;width * height * 4
    $textur_ptrbuffer = DllStructGetPtr($struct)

    [/autoit] [autoit][/autoit] [autoit]

    $a = glewBufferData($GL_ARRAY_BUFFER, $bufferdatasize, 0, $GL_DYNAMIC_DRAW);
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : glewbufferdata = ' & glewGetErrorString($a) & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $a = glewBufferData($GL_ARRAY_BUFFER, $bufferdatasize, $textur_ptrbuffer, $GL_DYNAMIC_DRAW);
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : glewbufferdata = ' & glewGetErrorString($a) & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    global const $GL_STATIC_DRAW = 0x88E4

    [/autoit] [autoit][/autoit] [autoit]

    $a = glewBufferData($GL_ARRAY_BUFFER, $bufferdatasize, 0, $GL_STATIC_DRAW);
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : glewbufferdata = ' & glewGetErrorString($a) & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $a = glewBufferData($GL_ARRAY_BUFFER, $bufferdatasize, $textur_ptrbuffer, $GL_STATIC_DRAW);
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $a = ' & $a & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : glewbufferdata = ' & glewGetErrorString($a) & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func glewGetErrorString($nr)
    $aCall = DllCall($glew_hDLL, "str", "_glewGetErrorString@4", 'int', $nr)
    Return $aCall[0]
    EndFunc ;==>glewGetErrorString

    [/autoit] [autoit][/autoit] [autoit]

    Func glewGenBuffers($nr, $ptr) ; by [email='Andy@autoit.de'][/email]
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : get_glew_address("__glewGenBuffers") = ' & get_glew_address("__glewGenBuffers") & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    $aCall = DllCallAddress("int", get_glew_address("__glewGenBuffers"), "int", 1, "uint", $ptr)
    Return $aCall[0]
    EndFunc ;==>glewGenBuffers

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func glBindBuffer($target, $buffer) ; by [email='Andy@autoit.de'][/email]
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : get_glew_address("__glewBindBuffer") = ' & get_glew_address("__glewBindBuffer") & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    $aCall = DllCallAddress("int", get_glew_address("__glewBindBuffer"), "int", $target, "uint", $buffer)
    Return $aCall[0]
    EndFunc ;==>glBindBuffer

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func glewBufferData($target, $size, $data, $usage) ; by [email='Andy@autoit.de'][/email]
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : get_glew_address("__glewBufferData") = ' & get_glew_address("__glewBufferData") & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

    [/autoit] [autoit][/autoit] [autoit]

    $aCall = DllCallAddress("int", get_glew_address("__glewBufferData"), "uint", $target, "uint", $size, "ptr", $data, "uint", $usage)
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $aCall = ' & $aCall & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    Return $aCall[0]
    EndFunc ;==>glewBufferData

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func glewInit()

    [/autoit] [autoit][/autoit] [autoit]

    Local $ret = DllCall($glew_hDLL, "int", "_glewInit@0")
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ret = ' & $ret & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
    Return $ret[0]
    EndFunc ;==>glewInit

    [/autoit] [autoit][/autoit] [autoit]

    Func _glewIsSupported($str)
    ; ---
    Local $ret = DllCall($glew_hDLL, "int", "_glewIsSupported@4", "str", $str)
    Return SetError($ret[0] = 0, 0, $ret[0] = 1)
    EndFunc ;==>_glewIsSupported

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func get_glew_address($func) ; by [email='Andy@autoit.de'][/email]
    $ret = DllCall("kernel32.dll", "ptr", "GetProcAddress", "ptr", _WinAPI_GetModuleHandle("glew32.dll"), "str", $func)
    ;_arraydisplay($ret)
    $struct = DllStructCreate("dword", $ret[0]) ;einsprungadresse, hier steht der pointer zur funktion
    Return DllStructGetData($struct, 1, 1)
    EndFunc ;==>get_glew_address

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func wglcreatecontext($hwnd)
    Local $ret = DllCall($__GL_hDLL, "ptr", "wglCreateContext", "hwnd", $hwnd)
    If @error Then Return SetError(@error, @extended, $ret)
    ; ---
    Return $ret[0]
    EndFunc ;==>wglcreatecontext

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func wglMakeCurrent($hdc, $hrc)
    Local $ret = DllCall($__GL_hDLL, "bool", "wglMakeCurrent", "hwnd", $hdc, "ptr", $hrc)
    ;_ArrayDisplay($ret)
    If @error Then Return SetError(@error, @extended, $ret)
    ; ---
    Return $ret[0]
    EndFunc ;==>wglMakeCurrent

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func wglGetCurrentDC()
    Local $ret = DllCall($__GL_hDLL, "uint", "wglGetCurrentDC")
    If @error Then Return SetError(@error, @extended, $ret)
    ; ---
    Return $ret[0]
    EndFunc ;==>wglGetCurrentDC

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func wglGetCurrentContext()
    Local $ret = DllCall($__GL_hDLL, "uint", "wglGetCurrentContext")
    If @error Then Return SetError(@error, @extended, $ret)
    ; ---
    Return $ret[0]
    EndFunc ;==>wglGetCurrentContext

    [/autoit]

    ciao
    Andy


    "Schlechtes Benehmen halten die Leute doch nur deswegen für eine Art Vorrecht, weil keiner ihnen aufs Maul haut." Klaus Kinski
    "Hint: Write comments after each line. So you can (better) see what your program does and what it not does. And we can see what you're thinking what your program does and we can point to the missunderstandings." A-Jay

    Wie man Fragen richtig stellt... Tutorial: Wie man Script-Fehler findet und beseitigt...X-Y-Problem

    Einmal editiert, zuletzt von Andy (28. April 2013 um 12:05)

  • Hier ist das Ergebnis:

    Spoiler anzeigen