Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
Texture3D.OpenGL.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 #if SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGL
4 using System;
5 using System.IO;
6 using System.Runtime.InteropServices;
7 using OpenTK.Graphics;
8 
9 #if SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGLES
10 using OpenTK.Graphics.ES30;
11 using PixelFormatGl = OpenTK.Graphics.ES30.PixelFormat;
12 #else
13 using OpenTK.Graphics.OpenGL;
14 using PixelFormatGl = OpenTK.Graphics.OpenGL.PixelFormat;
15 #endif
16 
17 namespace SiliconStudio.Paradox.Graphics
18 {
19  /// <summary>
20  /// Represents a 2D grid of texels.
21  /// </summary>
22  public partial class Texture3D
23  {
24  protected internal Texture3D(GraphicsDevice device, TextureDescription description3D, DataBox[] dataBoxes = null) : base(device, description3D, ViewType.Full, 0, 0)
25  {
26 #if SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGLES
27  throw new NotImplementedException();
28 #else
29  Target = TextureTarget.Texture3D;
30 #endif
31  }
32 
33  protected internal Texture3D(GraphicsDevice device, Texture3D texture) : base(device, texture, ViewType.Full, 0, 0)
34  {
35 #if SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGLES
36  throw new NotImplementedException();
37 #else
38  Target = TextureTarget.Texture3D;
39 #endif
40  }
41 
42  public override Texture ToTexture(ViewType viewType, int arraySlice, int mipMapSlice)
43  {
44  // Exists since OpenGL 4.3
45  if (viewType != ViewType.Full || arraySlice != 0 || mipMapSlice != 0)
46  throw new NotImplementedException();
47 
48  return new Texture3D(GraphicsDevice, this);
49  }
50  }
51 }
52 
53 #endif
ViewType
Defines how a view is selected from a resource.
Definition: ViewType.cs:31
Same as Deferred mode, except sprites are sorted by texture prior to drawing. This can improve perfor...
Gets a texture view for the whole texture for all mips/arrays dimensions.
The texture dimension is 3D.
PixelFormat
Defines various types of pixel formats.
Definition: PixelFormat.cs:32