default
tkopengl
tkopengl
tkopengl.Texture
adjustBrightness(float brightness)
-
adjustGamma(float gamma)
-
alloc(int width, height, numBytesPerPixel) : boolean
- Allocate bitmap data
alloc2n(int width, height, bytesPerPixel) : boolean
- Allocate bitmap
applyColorMap(Texture tex, cmap)
- Apply colormap to tex and store result in this texture
bind()
- Bind texture to associated OpenGL texture target
blend(Texture srca, srcb, byte ratio)
-
clear(int argb32)
- Fill pixels with given clear color
colorKeyToAlpha(int argb32)
-
copyRegion(Texture srctex, int px, py, w, h, dx, dy)
-
countPixels(int argb32) : float
-
createMask(int colorKey)
-
disable()
- Disable texture target (glDisable())
drawFilledBox(int px, py, sx, sy, argb32)
-
drawLine(int qx, qy, px, py, argb32)
- Simple bresenham line renderer
drawPixels2f(float x, y)
- Draw texture via glDrawPixels
drawPixels2i(int x, y)
- Draw texture via glDrawPixels
drawPixels3f(float x, y, z)
- Draw texture via glDrawPixels
drawPolygon(Object array, int argb32)
- Simple polygon renderer
enable()
- Enable texture target (glEnable())
expand2n()
- Automatically resize image and add black borders if width or height is not a power of two.
flipY()
- Rotate bitmap 180 degrees about the x axis
free()
- Free bitmap data and OpenGL texture handle
freeImage()
- Free bitmap data
getFgcolor() : int
-
getFlags() : int
-
getId() : int
- Query OpenGL texture name id
getMipMapLevel() : int
- Query OpenGL mip map level
getStride() : int
- Query number of bytes per scanline
getSx() : int
- Query texture width
getSy() : int
- Query texture height
getTarget() : int
- Query OpenGL texture target
getXY32(int x, y) : int
- Query pixel
getZ() : int
- Query number of bytes per pixel
grayscale() : boolean
-
interleaveAlpha(Texture alphaTex)
-
loadImage(String pakFileName, int newWidth, newHeight, newNumBytes) : boolean
- Load local image and scale to the given geometry and depth.
loadLocalImage(String localFileName, int newWidth, newHeight, newNumBytes) : boolean
- Load local image and scale to the given geometry and depth.
multiply(Texture srca, srcb)
-
renderFixedText(Texture fontTex, int charWidth, String text, int x, y, IntArray colors, attributes)
- Simple fixed font text renderer
saveImage(String localFileName) : boolean
-
scaleFrom(Texture src)
-
scroll(int dx, dy)
-
setEnvColor(int argb32)
-
setFgcolor(int argb32)
- Set foreground color for image manipulation helpers
setFlags()
-
setFlags()
-
setFlags(int flags)
- Set texture flags.
setId(int name)
- Set OpenGL texture name id
setMipMapLevel(int level)
- Set OpenGL mip map level
setPriority(float prio) : float
- Set OpenGL texture priority
setScreen(Texture srctex)
- Share bitmap data with other Texture
setScreenArea(Texture srctex, int ltx, lty, width, height)
-
setTarget(int target)
- Set OpenGL texture target
setXY32(int x, y, argb32)
- Put pixel
simpleBlur(Texture src)
-
simpleBlurX(Texture src)
-
simpleBlurY(Texture src)
-
swapScreen(Texture tex)
- Swap bitmap data
unload()
- Free OpenGL texture handle
update()
- (Re-)Upload to OpenGL
updateRegion(int x, y, w, h)
- (Re-) upload region to OpenGL
upload()
-
visitBuffer(Buffer buffer, int w, h, bpp)
- Share (non-deletable) buffer view.int
TEX_16BIT
- Hint OpenGL to store that texture in a 16bit per pixel format
int
TEX_1D
- Use GL_TEXTURE_1D texture target
int
TEX_ALPHA
- Use alpha channel
int
TEX_AUTOMIPMAP
- Automatically generate mip maps
int
TEX_BLEND
-
int
TEX_CLAMPTOEDGE_S
-
int
TEX_CLAMPTOEDGE_T
-
int
TEX_DECAL
-
int
TEX_DELETE
- Delete bitmap after texture has been uploaded to OpenGL
int
TEX_ENVMASK
-
int
TEX_FILTERMASK
-
int
TEX_FORCEHOSTBYTEORDER
- Hint that the bitmap uses the host byte order (e.g. A,B,G,R on little endian)
int
TEX_INTENSITY
- Upload 8bit texture in INTENSITY format
int
TEX_MAGFILTERLINEAR
-
int
TEX_MAGFILTERTRILINEAR
-
int
TEX_MINFILTERLINEAR
-
int
TEX_MINFILTERTRILINEAR
-
int
TEX_MODULATE
- Allow the texels to be modulated by the current OpenGL color
int
TEX_POINTSPRITE
-
int
TEX_REPEATMASK
-
int
TEX_REPEAT_S
- Repeat texels along the x axis
int
TEX_REPEAT_T
- Repeat texels along the y axis
int
TEX_REPLACE
-
int
TEX_UPLOADED
- This flag is set when the texture has been uploaded to OpenGL
Method adjustBrightness | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method adjustGamma | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method alloc | |||||||||||||||||||||||||
Allocate bitmap data | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Returns | |||||||||||||||||||||||||
|
Method alloc2n | |||||||||||||||||||||||||
Allocate bitmap | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Returns | |||||||||||||||||||||||||
|
Method applyColorMap | |
Apply colormap to tex and store result in this texture | |
Signature | |
Arguments | |
Method bind | |||
Bind texture to associated OpenGL texture target | |||
Signature | |||
|
Method blend | |
Signature | |
Arguments | |
Method clear | |||||
Fill pixels with given clear color | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method colorKeyToAlpha | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method copyRegion | ||||||||||||||||||||||||||||||||||||||||
Signature | ||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
Arguments | ||||||||||||||||||||||||||||||||||||||||
|
Method countPixels | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method createMask | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method disable | |||
Disable texture target (glDisable()) | |||
Signature | |||
|
Method drawFilledBox | ||||||||||||||||||||||||||||||
Signature | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Arguments | ||||||||||||||||||||||||||||||
|
Method drawLine | ||||||||||||||||||||||||||||||
Simple bresenham line renderer | ||||||||||||||||||||||||||||||
Signature | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Arguments | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Description | ||||||||||||||||||||||||||||||
Was once used as a collision detection helper |
Method drawPixels2f | |||||||||||||||
Draw texture via glDrawPixels | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method drawPixels2i | |||||||||||||||
Draw texture via glDrawPixels | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method drawPixels3f | ||||||||||||||||||||
Draw texture via glDrawPixels | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method drawPolygon | |||||||||||||||
Simple polygon renderer | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
| |||||||||||||||
Description | |||||||||||||||
Was once used as a collision detection helper |
Method enable | |||
Enable texture target (glEnable()) | |||
Signature | |||
|
Method expand2n | |||
Automatically resize image and add black borders if width or height is not a power of two. | |||
Signature | |||
|
Method flipY | |||
Rotate bitmap 180 degrees about the x axis | |||
Signature | |||
| |||
Description | |||
Remember that (0; 0) is the left/bottom corner in OpenGL.. |
Method free | |||
Free bitmap data and OpenGL texture handle | |||
Signature | |||
|
Method freeImage | |||
Free bitmap data | |||
Signature | |||
|
Method getFgcolor | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getFlags | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getId | |||||
Query OpenGL texture name id | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getMipMapLevel | |||||
Query OpenGL mip map level | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getStride | |||||
Query number of bytes per scanline | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getSx | |||||
Query texture width | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getSy | |||||
Query texture height | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getTarget | |||||
Query OpenGL texture target | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getXY32 | ||||||||||||||||||||
Query pixel | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Returns | ||||||||||||||||||||
|
Method getZ | |||||
Query number of bytes per pixel | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method grayscale | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method loadImage | ||||||||||||||||||||||||||||||
Load local image and scale to the given geometry and depth. | ||||||||||||||||||||||||||||||
Signature | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Arguments | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
|
Method loadLocalImage | ||||||||||||||||||||||||||||||
Load local image and scale to the given geometry and depth. | ||||||||||||||||||||||||||||||
Signature | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Arguments | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
|
Method renderFixedText | |
Simple fixed font text renderer | |
Signature | |
Arguments | |
Method saveImage | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method scroll | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method setEnvColor | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setFgcolor | |||||
Set foreground color for image manipulation helpers | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setFlags | |||||
Set texture flags. | |||||
Signature | |||||
| |||||
Arguments | |||||
| |||||
Description | |||||
These flags should usually be set before uploading the texture to OpenGL. |
Method setFlags | |||
Signature | |||
|
Method setFlags | |||
Signature | |||
|
Method setId | |||||
Set OpenGL texture name id | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setMipMapLevel | |||||
Set OpenGL mip map level | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setPriority | ||||||||||
Set OpenGL texture priority | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method setScreen | |||||
Share bitmap data with other Texture | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setScreenArea | ||||||||||||||||||||||||||||||
Signature | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Arguments | ||||||||||||||||||||||||||||||
|
Method setTarget | |||||
Set OpenGL texture target | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setXY32 | ||||||||||||||||||||
Put pixel | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method unload | |||
Free OpenGL texture handle | |||
Signature | |||
|
Method update | |||
(Re-)Upload to OpenGL | |||
Signature | |||
|
Method updateRegion | |||||||||||||||||||||||||
(Re-) upload region to OpenGL | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
|
Method upload | |||
Signature | |||
|
Method visitBuffer | |||||||||||||||||||||||||
Share (non-deletable) buffer view. | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
|
Constant TEX_16BIT (int) | |
Hint OpenGL to store that texture in a 16bit per pixel format | |
Constant TEX_1D (int) | |
Use GL_TEXTURE_1D texture target | |
Constant TEX_ALPHA (int) | |
Use alpha channel | |
Constant TEX_AUTOMIPMAP (int) | |
Automatically generate mip maps | |
Constant TEX_BLEND (int) | |
Constant TEX_CLAMPTOEDGE_S (int) | |
Constant TEX_CLAMPTOEDGE_T (int) | |
Constant TEX_DECAL (int) | |
Constant TEX_DELETE (int) | |
Delete bitmap after texture has been uploaded to OpenGL | |
Constant TEX_ENVMASK (int) | |
Constant TEX_FILTERMASK (int) | |
Constant TEX_FORCEHOSTBYTEORDER (int) | |
Hint that the bitmap uses the host byte order (e.g. A,B,G,R on little endian) | |
Constant TEX_INTENSITY (int) | |
Upload 8bit texture in INTENSITY format | |
Constant TEX_MAGFILTERLINEAR (int) | |
Constant TEX_MAGFILTERTRILINEAR (int) | |
Constant TEX_MINFILTERLINEAR (int) | |
Constant TEX_MINFILTERTRILINEAR (int) | |
Constant TEX_MODULATE (int) | |
Allow the texels to be modulated by the current OpenGL color | |
Constant TEX_POINTSPRITE (int) | |
Constant TEX_REPEATMASK (int) | |
Constant TEX_REPEAT_S (int) | |
Repeat texels along the x axis | |
Constant TEX_REPEAT_T (int) | |
Repeat texels along the y axis | |
Constant TEX_REPLACE (int) | |
Constant TEX_UPLOADED (int) | |
This flag is set when the texture has been uploaded to OpenGL | |
auto-generated by "DOG", the TkScript document generator. Mon, 28/Dec/2015 13:15:54