Changeset 99 for Include/abgl.ab
- Timestamp:
- Feb 14, 2007, 4:36:09 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/abgl.ab
r88 r99 607 607 608 608 Public /* static method */ 609 Static Function FromRGB(r As GL byte, g As GLbyte, b As GLbyte) As Color3f610 Dim ret As Color3f( r/255,g/255,b/255)609 Static Function FromRGB(r As GLubyte, g As GLubyte, b As GLubyte) As Color3f 610 Dim ret As Color3f((r As GLfloat)/255.0 As GLfloat,(g As GLfloat)/255.0 As GLfloat,(b As GLfloat)/255.0 As GLfloat) 611 611 Return ret 612 612 End Function 613 613 Static Function FromCOLORREF(c As COLORREF) As Color3f 614 Dim ret As Color3f((c and &hff) /255,(c>>8 and &hff)/255,(c>>16 and &hff)/255)614 Dim ret As Color3f((c and &hff) As GLfloat/255,(c>>8 and &hff) As GLfloat/255,(c>>16 and &hff) As GLfloat/255) 615 615 Return ret 616 616 End Function … … 725 725 726 726 Public /* static method */ 727 Static Function FromRGB(r As GL byte, g As GLbyte, b As GLbyte) As Color3d727 Static Function FromRGB(r As GLubyte, g As GLubyte, b As GLubyte) As Color3d 728 728 Dim ret As Color3d(r/255,g/255,b/255) 729 729 Return ret … … 871 871 872 872 Public /* static method */ 873 Static Function FromRGB(r As GL byte, g As GLbyte, b As GLbyte) As Color4f873 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 875 Return ret … … 1006 1006 1007 1007 Public /* static method */ 1008 Static Function FromRGB(r As GL byte, g As GLbyte, b As GLbyte) As Color4d1008 Static Function FromRGB(r As GLubyte, g As GLubyte, b As GLubyte) As Color4d 1009 1009 Dim ret As Color4d(r/255,g/255,b/255,1.0) 1010 1010 Return ret … … 1061 1061 1062 1062 1063 1064 1063 Class Light 1065 1064 Private … … 1068 1067 Public 1069 1068 Sub Enabled(enabled As GLboolean) 1069 If enabled Then 1070 glEnable(Number) 1071 Else 1072 glDisable(Number) 1073 End If 1074 End Sub 1075 Function Enabled() As GLboolean 1070 1076 Dim lighting As GLboolean 1071 1077 glGetBooleanv(Number,VarPtr(lighting)) 1072 1078 Return lighting 1073 End Sub1074 Function Enable() As GLboolean1075 If enabled Then1076 glEnable(Number)1077 Else1078 glDisable(Number)1079 End If1080 1079 End Function 1081 1080 … … 1414 1413 End Class 1415 1414 1416 Class RenderState 1415 Class RenderStateManager 1417 1416 Public /* Composiotion */ 1418 1417 LightModel As LightModel … … 1570 1569 End Sub 1571 1570 1572 Function FogColor() As *GLfloat 1573 glGetFloatv(GL_FOG_COLOR,FogColor) 1574 Return FogColor 1575 End Function 1576 Sub FogColor(fcolor As *GLfloat) 1577 glFogfv(GL_FOG_COLOR,fcolor) 1571 Function FogColor() As Color4f 1572 Dim ret As Color4f 1573 glGetFloatv(GL_FOG_COLOR,VarPtr(ret.rgba)) 1574 Return ret 1575 End Function 1576 Sub FogColor(fcolor As Color4f) 1577 glFogfv(GL_FOG_COLOR,VarPtr(fcolor.rgba)) 1578 1578 End Sub 1579 1579 … … 1735 1735 Public /* Composiotion */ 1736 1736 Material As Material 1737 RenderState As RenderState 1737 RenderState As RenderStateManager 1738 1738 Transform As Transform 1739 1739 Lights[ELM(8)] As Light
Note:
See TracChangeset
for help on using the changeset viewer.