메소드 | 설명 | |
---|---|---|
CreateRGBATexture ( int width, int height, byte rgba ) : int |
Create a translucent OpenGL texture object from given byte-array of r,g,b,a-triplets. See CreateRGBTexture for more info.
|
|
CreateRGBTexture ( int width, int height, byte rgb ) : int |
Create an opaque OpenGL texture object from a given byte-array of r,g,b-triplets. Make sure width and height is 1, 2, .., 32, 64, 128, 256 and so on in size since all 3d graphics cards support those dimensions. Not necessarily square. Don't forget to call GL.DeleteTexture(int) when you don't need the texture anymore (eg. when switching levels in your game).
|
|
CreateTextureFromBitmap ( |
Create an OpenGL texture (translucent or opaque) from a given Bitmap. 24- and 32-bit bitmaps supported.
|
|
CreateTextureFromFile ( string path ) : int |
Create an OpenGL texture (translucent or opaque) by loading a bitmap from file. 24- and 32-bit bitmaps supported.
|
|
InitTexturing ( ) : void |
Initialize OpenGL state to enable alpha-blended texturing. Disable again with GL.Disable(EnableCap.Texture2D). Call this before drawing any texture, when you boot your application, eg. in OnLoad() of GameWindow or Form_Load() if you're building a WinForm app.
|
메소드 | 설명 | |
---|---|---|
CreateTexture ( int width, int height, bool alpha, byte bytes ) : int | ||
GiveMeATexture ( ) : int | ||
SetParameters ( ) : void | ||
Upload ( int width, int height, bool alpha, byte bytes ) : void |
public static CreateRGBATexture ( int width, int height, byte rgba ) : int | ||
width | int | |
height | int | |
rgba | byte | |
리턴 | int |
public static CreateRGBTexture ( int width, int height, byte rgb ) : int | ||
width | int | |
height | int | |
rgb | byte | |
리턴 | int |
public static CreateTextureFromBitmap ( |
||
bitmap | ||
리턴 | int |
public static CreateTextureFromFile ( string path ) : int | ||
path | string | |
리턴 | int |