Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create Storage Space For Texture Data (128x128x4)
- dataFile = File.open(ARGV[0], 'rb')
- dataFileArray = dataFile.readlines
- dataFileArray.flatten
- data = dataFileArray.pack("f*")
- #data = ([0]*4*128*128).pack("f*")
- txtnumber = glGenTextures(1) # Create 1 Texture
- glBindTexture(GL_TEXTURE_2D, txtnumber[0]) # Bind The Texture
- 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