Guest User

Untitled

a guest
Jun 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. # Create Storage Space For Texture Data (128x128x4)
  2. dataFile = File.open(ARGV[0], 'rb')
  3. dataFileArray = dataFile.readlines
  4. dataFileArray.flatten
  5. data = dataFileArray.pack("f*")
  6. #data = ([0]*4*128*128).pack("f*")
  7. txtnumber = glGenTextures(1) # Create 1 Texture
  8. glBindTexture(GL_TEXTURE_2D, txtnumber[0]) # Bind The Texture
  9. glTexImage2D(GL_TEXTURE_2D, 0, 4, 128, 128, 0,GL_RGBA, GL_FLOAT, data) # Build Texture Using Information In data
Add Comment
Please, Sign In to add comment