Guest User

Untitled

a guest
May 7th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. loadDefaultImage
  2.     "comment stating purpose of message"
  3.  
  4.     |format form|
  5.  
  6.     form := ImageMorph new form.
  7.    
  8.     fWidth := form width.
  9.     fHeight := form height.
  10.     textureIntNames := WordArray new: 1.            "create a place to put the 'name' of the texture"
  11.     ogl glGenTextures: 1 with: textureIntNames. "generate the name(s)"
  12.  
  13.     ogl glBindTexture: GLTexture2d with: (textureIntNames at: 1).
  14.    
  15.     format := GLRgba.
  16.  
  17.    
  18.     ogl glTexParameteri: GLTexture2d with: GLTextureMinFilter with: GLLinear.
  19.     ogl glTexParameteri: GLTexture2d with: GLTextureMagFilter with: GLLinear.
  20.     ogl glTexParameteri: GLTexture2d with: GLGenerateMipmapSGIS with: true.
  21.  
  22.     ogl glTexImage2D: GLTexture2d
  23.             with: 0
  24.             with: format
  25.             with: form width
  26.             with: form height
  27.             with: 0
  28.             with: ogl texturePixelFormat
  29.             with: ogl texturePixelType
  30.             with: form bits.
Add Comment
Please, Sign In to add comment