Changeset 102 for Include


Ignore:
Timestamp:
Feb 16, 2007, 1:46:08 AM (18 years ago)
Author:
NoWest
Message:

バグを修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/abgl.ab

    r99 r102  
    873873    Static Function FromRGB(r As GLubyte, g As GLubyte, b As GLubyte) As Color4f
    874874        Dim ret As Color4f(r/255,g/255,b/255,1.0)
     875        Return ret
     876    End Function
     877    Static Function FromARGB(a As GLubyte, r As GLubyte, g As GLubyte, b As GLubyte) As Color4f
     878        Dim ret As Color4f(r/255,g/255,b/255,a/255)
    875879        Return ret
    876880    End Function
     
    10101014        Return ret
    10111015    End Function
     1016    Static Function FromARGB(a As GLubyte, r As GLubyte, g As GLubyte, b As GLubyte) As Color4d
     1017        Dim ret As Color4d(r/255,g/255,b/255,a/255)
     1018        Return ret
     1019    End Function
    10121020    Static Function FromCOLORREF(c As COLORREF) As Color4d
    10131021        Dim ret As Color4d((c and &hff)/255,(c>>8 and &hff)/255,(c>>16 and &hff)/255,1.0)
     
    12461254    Sub LoadIdentity()
    12471255        Dim mode As GLenum
    1248         glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode))
     1256        glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long)
    12491257        If mode<>GL_MODELVIEW Then glMatrixMode(GL_MODELVIEW)
    12501258        glLoadIdentity()
     
    12601268    Sub RotateX(angle As GLdouble)
    12611269        Dim mode As GLenum
    1262         glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode))
     1270        glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long)
    12631271        If mode<>GL_MODELVIEW Then glMatrixMode(GL_MODELVIEW)
    12641272        glRotated(angle, 1.0 As GLdouble, 0.0 As GLdouble, 0.0 As GLdouble)
     
    12741282    Sub RotateY(angle As GLdouble)
    12751283        Dim mode As GLenum
    1276         glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode))
     1284        glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long)
    12771285        If mode<>GL_MODELVIEW Then glMatrixMode(GL_MODELVIEW)
    12781286        glRotated(angle, 0.0 As GLdouble, 1.0 As GLdouble, 0.0 As GLdouble)
     
    13231331    Sub Translate(x As GLfloat, y As GLfloat, z As GLfloat)
    13241332        Dim mode As GLenum
    1325         glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode))
     1333        glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long)
    13261334        If mode<>GL_MODELVIEW Then glMatrixMode(GL_MODELVIEW)
    13271335        glTranslatef(x, y, z)
     
    13341342    Sub LoadIdentity()
    13351343        Dim mode As GLenum
    1336         glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode))
     1344        glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long)
    13371345        If mode<>GL_PROJECTION Then glMatrixMode(GL_PROJECTION)
    13381346        glLoadIdentity()
     
    13621370    Sub Perspective(fovy As GLdouble, aspect As GLdouble, zNear As GLdouble, zFar As GLdouble)
    13631371        Dim mode As GLenum
    1364         glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode))
     1372        glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long)
    13651373        If mode<>GL_PROJECTION Then glMatrixMode(GL_PROJECTION)
    13661374        gluPerspective(fovy, aspect, zNear, zFar)
     
    18761884    End Sub
    18771885    Sub Color(c As Color3f)
    1878         glColor3fv(VarPtr(c.rgb))
     1886        glColor3fv(VarPtr(c.rgb) As *Single)
    18791887    End Sub
    18801888    Sub Color(c As Color4f)
    1881         glColor4fv(VarPtr(c.rgba))
     1889        glColor4fv(VarPtr(c.rgba) As *Single)
    18821890    End Sub
    18831891    Sub Color(c As Color3d)
    1884         glColor3dv(VarPtr(c.rgb))
     1892        glColor3dv(VarPtr(c.rgb) As *Double)
    18851893    End Sub
    18861894    Sub Color(c As Color4d)
    1887         glColor4dv(VarPtr(c.rgba))
     1895        glColor4dv(VarPtr(c.rgba) As *Double)
    18881896    End Sub
    18891897
Note: See TracChangeset for help on using the changeset viewer.