/*------------------------------------------------------------------------- * * ---------------------------------------------------------------------------*/ public d3d_textured_font(d3d_device device, Microsoft.DirectX.Direct3D.Font font) { m_device = device; m_font = font; m_map = new Dictionary <string, textured_font>(); m_device.device.DeviceReset += new System.EventHandler(device_reset); // A1R5G5B5の렌더링 타겟が사용가능か調べる // 사용できない場合はA8R8G8B8を사용する // Radeon계は사용가능 // NVIDIA계は사용不可 // Intel계はたぶん사용가능 m_texture_format = Format.A1R5G5B5; if (!m_device.CheckDeviceFormat(Usage.RenderTarget, ResourceType.Textures, Format.A1R5G5B5)) { // A1R5G5B5の렌더링 타겟が作れない m_texture_format = Format.A8R8G8B8; } }
/*------------------------------------------------------------------------- * * ---------------------------------------------------------------------------*/ public d3d_textured_font(d3d_device device, Microsoft.DirectX.Direct3D.Font font) { m_device = device; m_font = font; m_map = new Dictionary <string, textured_font>(); m_device.device.DeviceReset += new System.EventHandler(device_reset); // A1R5G5B5のレンダーターゲットが使用可能か調べる // 使用できない場合はA8R8G8B8を使用する // Radeon系は使用可能 // NVIDIA系は使用不可 // Intel系はたぶん使用可能 m_texture_format = Format.A1R5G5B5; if (!m_device.CheckDeviceFormat(Usage.RenderTarget, ResourceType.Textures, Format.A1R5G5B5)) { // A1R5G5B5のレンダーターゲットが作れない m_texture_format = Format.A8R8G8B8; } }