VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
VisimBox.Renderer.TextureManager Class Reference

Base texture manager. More...

Inheritance diagram for VisimBox.Renderer.TextureManager:

List of all members.

## Public Member Functions
virtual Texture | Add (ref string name, System.Drawing.Bitmap bmp, bool alpha=false)
| Creates texture from the System.Drawing.Bitmap, adds it to the database (changes name if needeed) and returns created texture.
virtual void | SetTexture (string name, IRenderContext rc, int channel=0)
| Sets texture to specified channel.
virtual void | SetTexture (Texture tex, IRenderContext rc, int channel=0)
| Sets texture to speficied channel.
abstract Texture | CreateTexture (System.Drawing.Bitmap bmp, string name, bool alpha=false)
| Creates new texture from the System.Drawing.Bitmap. Note, doesn't add this to resources. Use Add(bitmap)

## Detailed Description

Base texture manager.

## Member Function Documentation

virtual Texture VisimBox.Renderer.TextureManager.Add | ( | ref string | name,
|  | System.Drawing.Bitmap | bmp,
|  | bool | alpha = `false`
| ) |  | `[virtual]`

Creates texture from the System.Drawing.Bitmap, adds it to the database (changes name if needeed) and returns created texture.

Parameters:

  name | Required name for the texture (will be changed if manager already contains texture of this name)
  bmp | Bitmap to be added

Returns:
  Texture created from the bitmap

abstract Texture VisimBox.Renderer.TextureManager.CreateTexture | ( | System.Drawing.Bitmap | bmp,
|  | string | name,
|  | bool | alpha = `false`
| ) |  | `[pure virtual]`

Creates new texture from the System.Drawing.Bitmap. Note, doesn't add this to resources. Use Add(bitmap)

Parameters:

  bmp | Bitmap for the texture
  alpha | if true, texture will be RGBA, otherwise RGB

Returns:
  New texture with RGB or RGBA texture format

Implemented in VisimRenderGL.GLTextureMan.

virtual void VisimBox.Renderer.TextureManager.SetTexture | ( | Texture | tex,
|  | IRenderContext | rc,
|  | int | channel = `0`
| ) |  | `[virtual]`

Sets texture to speficied channel.

Parameters:

  tex | Texture instance
  channel | channel to use, default value is 0

virtual void VisimBox.Renderer.TextureManager.SetTexture | ( | string | name,
|  | IRenderContext | rc,
|  | int | channel = `0`
| ) |  | `[virtual]`

Sets texture to specified channel.

Parameters:

  name | Name of the texutre
  channel | channel to use, default value is 0

The documentation for this class was generated from the following file:

- TextureManager.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events