Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ITexLibrary.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Text;
7 
8 using SiliconStudio.TextureConverter.Requests;
9 
10 namespace SiliconStudio.TextureConverter
11 {
12  internal interface ITexLibrary : IDisposable
13  {
14  /// <summary>
15  /// Determines whether this instance can handle the request on the specified image.
16  /// </summary>
17  /// <param name="image">The image.</param>
18  /// <param name="request">The request.</param>
19  /// <returns>
20  /// <c>true</c> if this instance [can handle request] the specified image; otherwise, <c>false</c>.
21  /// </returns>
22  bool CanHandleRequest(TexImage image, IRequest request);
23 
24 
25  /// <summary>
26  /// Executes the specified request on the specified image.
27  /// </summary>
28  /// <param name="image">The image.</param>
29  /// <param name="request">The request.</param>
30  void Execute(TexImage image, IRequest request);
31 
32 
33  /// <summary>
34  /// Disposes the native data from <see cref="TexImage"/> instance.
35  /// </summary>
36  /// <remarks>
37  /// This method is called to free memory when this specific library has allocated the memory.
38  /// </remarks>
39  /// <param name="image">The image.</param>
40  void Dispose(TexImage image);
41 
42 
43  /// <summary>
44  /// Starts the library : Initializes (sometimes allocates) the native data of the implementing library according to the <see cref="TexImage"/> instance
45  /// </summary>
46  /// <param name="image">The image.</param>
47  void StartLibrary(TexImage image);
48 
49 
50  /// <summary>
51  /// Ends the library : Frees native data used by the library if the <see cref="TexImage"/> instance does not depends on it (shared pointers on the texture memory)
52  /// </summary>
53  /// <remarks>
54  /// This method is called by TextureTool when the current library can't process the next request.
55  /// </remarks>
56  /// <param name="image">The image.</param>
57  void EndLibrary(TexImage image);
58 
59 
60  /// <summary>
61  /// Determines whether the library supports BGRA order.
62  /// </summary>
63  /// <returns>
64  /// <c>true</c> if the library supports BGRA order; otherwise, <c>false</c>.
65  /// </returns>
66  bool SupportBGRAOrder();
67  }
68 }