![]() | XTexture Class |
Namespace: Pixoneer.NXDL.NGR
public class XTexture : IDisposable
The XTexture type exposes the following members.
Name | Description | |
---|---|---|
![]() | XTexture | XTexture클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다. |
![]() | XTexture(IntPtr, Boolean) | XDL 네이티브 텍스처 포인터로부터 XTexture 객체를 만드는 생성자. |
Name | Description | |
---|---|---|
![]() | ApplyAlpha |
Texture에 대한 도시시 투명도를 주기 위해 Alpha값을 얻거나 설정한다.
|
![]() | DataSize |
데이터에 대한 메모리 크기를 얻는다.
|
![]() | FilterType |
this객체에서 적용할 Filter Type을 설정하거나 얻는다.
|
![]() | GLTextureID |
Device에 Host될때 생성된 Texture ID를 얻는다.
|
![]() | Height |
this객체의 Height를 얻는다.
|
![]() | InDevice |
Device에 Host되어 있는지에 대한 상태를 얻는다.
|
![]() | Loaded |
this객체가 외부 리소스에 의해 이미지가 로드되엇는지 여부를 반한한다.
|
![]() | Mipmap |
Mipmap이 사용가능한지 여부를 얻거나 설정한다.
|
![]() | Pixelformat |
this객체에 설정된 PixelFormat 타입을 얻는다.
|
![]() | TransparentColor |
Texure중 일부 영역에 대한 값을 투명하게 처리할 색성을 설정하거나 얻는다.
예를 들어, 검정색 부분을 투명하게 싶다면 0, 0, 0을 설정한다.
|
![]() | Width |
this객체의 Width를 얻는다.
|
![]() | WrapType |
this객체에서 적용할 Wrapp 방법을 설정하거나 얻는다.
|
Name | Description | |
---|---|---|
![]() | Bind |
this객체를 Bind시킨다.
|
![]() | FreeTextureInDevice |
Device(Graphic Card)에 있는 Texture를 삭제하여 도시요소에서 삭제 시킨다.
|
![]() | Load |
입력된 경로에 대한 파일을 로딩한다. 예를 들어 PNG, BMP, JPG등을 로딩하여 화면에 도시할 수 있다.
|
![]() | SendTextureToDevice |
this객체를 성성하여 이미지를 로딩한 후 Device(Graphic Card)에 보내서 도시가 가능하도록 한다.
|
public XTexture m_TexLogo; public FormMain_Load() { m_TexLogo = new XTexture(); m_TexLogo.Load("D:/Sample/pixoneerlogo.bmp"); } private bool nxPlanetLayer1_OnOrthoRender(object sender, NXPlanetDrawArgs e) { if (m_TexLogo.Loaded) { if (!m_TexLogo.InDevice) m_TexLogo.SendTextureToDevice(); e.Graphics.glDisable(XGraphics.GL_DEPTH_TEST); e.Graphics.glEnable(XGraphics.GL_TEXTURE_2D); e.Graphics.glBindTexture(XGraphics.GL_TEXTURE_2D, (uint)m_TexLogo.GLTextureID); e.Graphics.glColor3f(1.0f, 1.0f, 1.0f); e.Graphics.glBegin(XGraphics.GL_QUADS); e.Graphics.glTexCoord2f(0, 1); e.Graphics.glVertex3d(e.ViewArea.Width - 215, e.ViewArea.Height - 84, 0); e.Graphics.glTexCoord2f(0, 0); e.Graphics.glVertex3d(e.ViewArea.Width - 215, e.ViewArea.Height - 10, 0); e.Graphics.glTexCoord2f(1, 0); e.Graphics.glVertex3d(e.ViewArea.Width - 10, e.ViewArea.Height - 10, 0); e.Graphics.glTexCoord2f(1, 1); e.Graphics.glVertex3d(e.ViewArea.Width - 10, e.ViewArea.Height - 84, 0); e.Graphics.glEnd(); e.Graphics.glEnable(XGraphics.GL_DEPTH_TEST); e.Graphics.glDisable(XGraphics.GL_TEXTURE_2D); } return default(bool); }