Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getLatestImageFromWorld
- "draw the World's texture to a bitmap for use by an OpenGL texture"
- |format form tempTextures|
- pasteUpFormCanvas ifNil: [^self].
- self hide.
- myPasteUp fullDrawOn: pasteUpFormCanvas.
- "myPasteUp drawSubmorphsOn: pasteUpFormCanvas."
- self show.
- form := pasteUpFormCanvas form.
- fPUWidth := form width.
- fPUHeight := form height.
- "tempTextures := WordArray with: (textureIntNames at: 1).
- ogl glDeleteTextures: 1 with: tempTextures."
- ogl glBindTexture: GLTexture2d with: (textureIntNames at: 1).
- ogl checkForError.
- format := ogl textureInternalFormat.
- ogl glEnable: GLTexture2d.
- "ogl glTexParameteri: GLTexture2d with: GLTextureMinFilter with: GLLinearMipmapLinear."
- ogl glTexParameteri: GLTexture2d with: GLTextureMinFilter with: GLLinear.
- ogl glTexParameteri: GLTexture2d with: GLTextureMagFilter with: GLLinear.
- "ogl glTexParameteri: GLTexture2d with: GLGenerateMipmapSGIS with: GLFalse".
- ogl glTexImage2D: GLTexture2d
- with: 0
- with: format
- with: form width
- with: form height
- with: 0
- with: ogl texturePixelFormat
- with: ogl texturePixelType
- with: form bits.
Add Comment
Please, Sign In to add comment