- Timestamp:
- Feb 16, 2007, 1:46:08 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/abgl.ab
r99 r102 873 873 Static Function FromRGB(r As GLubyte, g As GLubyte, b As GLubyte) As Color4f 874 874 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) 875 879 Return ret 876 880 End Function … … 1010 1014 Return ret 1011 1015 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 1012 1020 Static Function FromCOLORREF(c As COLORREF) As Color4d 1013 1021 Dim ret As Color4d((c and &hff)/255,(c>>8 and &hff)/255,(c>>16 and &hff)/255,1.0) … … 1246 1254 Sub LoadIdentity() 1247 1255 Dim mode As GLenum 1248 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) )1256 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long) 1249 1257 If mode<>GL_MODELVIEW Then glMatrixMode(GL_MODELVIEW) 1250 1258 glLoadIdentity() … … 1260 1268 Sub RotateX(angle As GLdouble) 1261 1269 Dim mode As GLenum 1262 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) )1270 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long) 1263 1271 If mode<>GL_MODELVIEW Then glMatrixMode(GL_MODELVIEW) 1264 1272 glRotated(angle, 1.0 As GLdouble, 0.0 As GLdouble, 0.0 As GLdouble) … … 1274 1282 Sub RotateY(angle As GLdouble) 1275 1283 Dim mode As GLenum 1276 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) )1284 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long) 1277 1285 If mode<>GL_MODELVIEW Then glMatrixMode(GL_MODELVIEW) 1278 1286 glRotated(angle, 0.0 As GLdouble, 1.0 As GLdouble, 0.0 As GLdouble) … … 1323 1331 Sub Translate(x As GLfloat, y As GLfloat, z As GLfloat) 1324 1332 Dim mode As GLenum 1325 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) )1333 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long) 1326 1334 If mode<>GL_MODELVIEW Then glMatrixMode(GL_MODELVIEW) 1327 1335 glTranslatef(x, y, z) … … 1334 1342 Sub LoadIdentity() 1335 1343 Dim mode As GLenum 1336 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) )1344 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long) 1337 1345 If mode<>GL_PROJECTION Then glMatrixMode(GL_PROJECTION) 1338 1346 glLoadIdentity() … … 1362 1370 Sub Perspective(fovy As GLdouble, aspect As GLdouble, zNear As GLdouble, zFar As GLdouble) 1363 1371 Dim mode As GLenum 1364 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) )1372 glGetIntegerv(GL_MATRIX_MODE,VarPtr(mode) As *Long) 1365 1373 If mode<>GL_PROJECTION Then glMatrixMode(GL_PROJECTION) 1366 1374 gluPerspective(fovy, aspect, zNear, zFar) … … 1876 1884 End Sub 1877 1885 Sub Color(c As Color3f) 1878 glColor3fv(VarPtr(c.rgb) )1886 glColor3fv(VarPtr(c.rgb) As *Single) 1879 1887 End Sub 1880 1888 Sub Color(c As Color4f) 1881 glColor4fv(VarPtr(c.rgba) )1889 glColor4fv(VarPtr(c.rgba) As *Single) 1882 1890 End Sub 1883 1891 Sub Color(c As Color3d) 1884 glColor3dv(VarPtr(c.rgb) )1892 glColor3dv(VarPtr(c.rgb) As *Double) 1885 1893 End Sub 1886 1894 Sub Color(c As Color4d) 1887 glColor4dv(VarPtr(c.rgba) )1895 glColor4dv(VarPtr(c.rgba) As *Double) 1888 1896 End Sub 1889 1897
Note:
See TracChangeset
for help on using the changeset viewer.