Changeset 52
- Timestamp:
- Jan 8, 2007, 1:47:28 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/abgl.ab
r37 r52 210 210 End Function 211 211 212 Public 212 Public /* constructor */ 213 213 Sub Light(num As GLenum) 214 214 Number=num … … 216 216 217 217 Public 218 Sub SetAmbient(amb As *GLdouble) 219 glLightdv(Number,GL_AMBIENT,amb) 218 Sub SetAmbient(red As GLfloat, green As GLfloat, blue As GLfloat, alpha As GLfloat) 219 Dim amb[3] As GLfloat 220 amb[0]=red 221 amb[1]=green 222 amb[2]=blue 223 amb[3]=alpha 224 glLightfv(Number,GL_AMBIENT,amb) 225 End Sub 226 Sub SetAmbient(color As Color4f) 227 Dim amb[3] As GLfloat 228 amb[0]=color.R 229 amb[1]=color.G 230 amb[2]=color.B 231 amb[3]=color.A 232 glLightfv(Number,GL_AMBIENT,amb) 220 233 End Sub 221 234 Sub SetAmbient(amb As *GLfloat) … … 223 236 End Sub 224 237 225 Sub SetDiffuse(dif As *GLdouble) 226 glLightdv(Number,GL_DIFFUSE,dif) 238 Sub SetDiffuse(red As GLfloat, green As GLfloat, blue As GLfloat, alpha As GLfloat) 239 Dim dif[3] As GLfloat 240 dif[0]=red 241 dif[1]=green 242 dif[2]=blue 243 dif[3]=alpha 244 glLightfv(Number,GL_DIFFUSE,dif) 245 End Sub 246 Sub SetDiffuse(color As Color4f) 247 Dim dif[3] As GLfloat 248 amb[0]=color.R 249 amb[1]=color.G 250 amb[2]=color.B 251 amb[3]=color.A 252 glLightfv(Number,GL_DIFFUSE,dif) 227 253 End Sub 228 254 Sub SetDiffuse(dif As *GLfloat) … … 230 256 End Sub 231 257 232 Sub SetSpecular(spc As *GLdouble) 233 glLightdv(Number,GL_SPECULAR,spc) 258 Sub SetSpecular(red As GLfloat, green As GLfloat, blue As GLfloat, alpha As GLfloat) 259 Dim spc[3] As GLfloat 260 spc[0]=red 261 spc[1]=green 262 spc[2]=blue 263 spc[3]=alpha 264 glLightfv(Number,GL_SPECULAR,spc) 265 End Sub 266 Sub SetSpecular(color As Color4f) 267 Dim spc[3] As GLfloat 268 amb[0]=color.R 269 amb[1]=color.G 270 amb[2]=color.B 271 amb[3]=color.A 272 glLightfv(Number,GL_SPECULAR,spc) 234 273 End Sub 235 274 Sub SetSpecular(spc As *GLfloat) … … 237 276 End Sub 238 277 239 Sub SetPosition(pos As *GLdouble)240 glLightdv(Number,GL_POSITION,pos)241 End Sub242 278 Sub SetPosition(pos As *GLfloat) 243 279 glLightfv(Number,GL_POSITION,pos) … … 257 293 glMaterialfv(face,GL_AMBIENT,amb) 258 294 End Sub 295 Sub Ambient(color As Color4f) 296 Dim face As GLenum 297 glGetIntegerv(GL_COLOR_MATERIAL_FACE,VarPtr(face)) 298 Dim amb[3] As GLfloat 299 amb[0]=color.R 300 amb[1]=color.G 301 amb[2]=color.B 302 amb[3]=color.A 303 glMaterialfv(face,GL_AMBIENT,amb) 304 End Sub 305 Sub Ambient(amb As *GLfloat) 306 glMaterialfv(face,GL_AMBIENT,amb) 307 End Sub 308 259 309 Sub Diffuse(red As GLfloat, green As GLfloat, blue As GLfloat, alpha As GLfloat) 260 310 Dim face As GLenum … … 267 317 glMaterialfv(face,GL_DIFFUSE,dif) 268 318 End Sub 319 Sub Diffuse(color As Color4f) 320 Dim face As GLenum 321 glGetIntegerv(GL_COLOR_MATERIAL_FACE,VarPtr(face)) 322 Dim dif[3] As GLfloat 323 dif[0]=color.R 324 dif[1]=color.G 325 dif[2]=color.B 326 dif[3]=color.A 327 glMaterialfv(face,GL_DIFFUSE,dif) 328 End Sub 329 Sub Diffuse(dif As *GLfloat) 330 glMaterialfv(face,GL_DIFFUSE,dif) 331 End Sub 332 269 333 Sub Specular(red As GLfloat, green As GLfloat, blue As GLfloat, alpha As GLfloat) 270 334 Dim face As GLenum … … 277 341 glMaterialfv(face,GL_SPECULAR,spc) 278 342 End Sub 343 Sub Specular(color As Color4f) 344 Dim face As GLenum 345 glGetIntegerv(GL_COLOR_MATERIAL_FACE,VarPtr(face)) 346 Dim spc[3] As GLfloat 347 spc[0]=color.R 348 spc[1]=color.G 349 spc[2]=color.B 350 spc[3]=color.A 351 glMaterialfv(face,GL_SPECULAR,spc) 352 End Sub 353 Sub Specular(spc As *GLfloat) 354 glMaterialfv(face,GL_SPECULAR,spc) 355 End Sub 356 279 357 Sub Shininess(shin As GLfloat) 280 358 Dim face As GLenum … … 282 360 glMaterialf(face,GL_SHININESS,shin) 283 361 End Sub 362 284 363 Sub Emission(red As GLfloat, green As GLfloat, blue As GLfloat, alpha As GLfloat) 285 364 Dim face As GLenum
Note:
See TracChangeset
for help on using the changeset viewer.