Changeset 63 for Include/abgl.ab


Ignore:
Timestamp:
Jan 16, 2007, 8:13:22 PM (18 years ago)
Author:
NoWest
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/abgl.ab

    r52 r63  
    44#include <GL/gl.sbp>
    55#include <GL/glu.sbp>
     6
     7Type XYZ_FLOAT
     8    x As GLfloat
     9    y As GLfloat
     10    z As GLfloat
     11End Type
     12
     13Type XYZ_DOUBLE
     14    x As GLdouble
     15    y As GLdouble
     16    z As GLdouble
     17End Type
     18
     19Class Vector3f
     20Public /* constructor */
     21    Sub Vector3f(x As GLfloat, y As GLfloat, z As GLfloat)
     22        xyz.x=x
     23        xyz.y=y
     24        xyz.z=z
     25    End Sub
     26
     27Public /* destructor */
     28    Sub ~Vector3f()
     29    End Sub
     30
     31Public /* property */
     32    Function X() As GLfloat
     33        Return xyz.x
     34    End Function
     35    Function Y() As GLfloat
     36        Return xyz.y
     37    End Function
     38    Function Z() As GLfloat
     39        Return xyz.z
     40    End Function
     41    Sub X(x As GLfloat)
     42        xyz.x=x
     43    End Sub
     44    Sub Y(y As GLfloat)
     45        xyz.y=y
     46    End Sub
     47    Sub Z(z As GLfloat)
     48        xyz.z=z
     49    End Sub
     50
     51Protected
     52    xyz As XYZ_FLOAT
     53End Class
     54
     55Class Vector3d
     56Public /* constructor */
     57    Sub Vector3d(x As GLdouble, y As GLdouble, z As GLdouble)
     58        xyz.x=x
     59        xyz.y=y
     60        xyz.z=z
     61    End Sub
     62
     63Public /* destructor */
     64    Sub ~Vector3d()
     65    End Sub
     66
     67Public /* property */
     68    Function X() As GLdouble
     69        Return xyz.x
     70    End Function
     71    Function Y() As GLdouble
     72        Return xyz.y
     73    End Function
     74    Function Z() As GLdouble
     75        Return xyz.z
     76    End Function
     77    Sub X(x As GLdouble)
     78        xyz.x=x
     79    End Sub
     80    Sub Y(y As GLdouble)
     81        xyz.y=y
     82    End Sub
     83    Sub Z(z As GLdouble)
     84        xyz.z=z
     85    End Sub
     86
     87Protected
     88    xyz As XYZ_DOUBLE
     89End Class
    690
    791Type RGB_FLOAT
     
    886970        Lights[6].Light(GL_LIGHT6)
    887971        Lights[7].Light(GL_LIGHT7)
    888     End Sub
    889     Sub RenderingContext(hdc As HDC)
    890         RenderingContext()
    891972    End Sub
    892973    Sub RenderingContext(hdc As HDC, ByRef pfd As PIXELFORMATDESCRIPTOR)
     
    9481029        RenderingContext(hdc,pfd)
    9491030    End Sub
     1031    Sub RenderingContext(hdc As HDC)
     1032        RenderingContext(hdc As HDC, ColorType.RgbColor, BufferType.DoubleBuffer)
     1033    End Sub
    9501034
    9511035Public /* Destructor */
Note: See TracChangeset for help on using the changeset viewer.