TextureWidth.bb 1006 B

123456789101112131415161718192021222324252627282930313233
  1. ; TextureWidth and TextureHeight Example.
  2. ; ---------------------------------------
  3. Graphics3D 640,480
  4. ; This bit of code creates 4 textures
  5. ; of different sizes and shapes.
  6. texture1=CreateTexture(256,256,59)
  7. texture2=CreateTexture(256,128,59)
  8. texture3=CreateTexture(128,256,59)
  9. texture4=CreateTexture(200,200,59)
  10. ; The following lines print the selected value
  11. ; of the texture, and reports the actual texture
  12. ; resolution.
  13. Print "Texture 1 was created at 256x256"
  14. Print "On your system the dimensions are "+TextureWidth(texture1)+"x"+TextureHeight(texture1)
  15. Print
  16. Print "Texture 2 was created at 256x128"
  17. Print "On your system the dimensions are "+TextureWidth(texture2)+"x"+TextureHeight(texture2)
  18. Print
  19. Print "Texture 3 was created at 128x256"
  20. Print "On your system the dimensions are "+TextureWidth(texture3)+"x"+TextureHeight(texture3)
  21. Print
  22. Print "Texture 4 was created at 200x200"
  23. Print "On your system the dimensions are "+TextureWidth(texture4)+"x"+TextureHeight(texture4)
  24. WaitKey
  25. End