summaryrefslogtreecommitdiffstats
path: root/o3d/core/cross/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/core/cross/texture.h')
-rw-r--r--o3d/core/cross/texture.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/o3d/core/cross/texture.h b/o3d/core/cross/texture.h
index 79ddae2..fcaf75a 100644
--- a/o3d/core/cross/texture.h
+++ b/o3d/core/cross/texture.h
@@ -122,10 +122,9 @@ class Texture2D : public Texture {
// Returns a RenderSurface object associated with a mip_level of a texture.
// Parameters:
// mip_level: [in] The mip-level of the surface to be returned.
- // pack: [in] The pack in which the surface will reside.
// Returns:
// Reference to the RenderSurface object.
- virtual RenderSurface::Ref GetRenderSurface(int mip_level, Pack* pack) = 0;
+ RenderSurface::Ref GetRenderSurface(int mip_level);
// Copy pixels from source bitmap to certain mip level.
// Scales if the width and height of source and dest do not match.
@@ -197,6 +196,10 @@ class Texture2D : public Texture {
// true if the operation succeeds
virtual bool Unlock(int level) = 0;
+ // The platform specific part of GetRenderSurface.
+ virtual RenderSurface::Ref PlatformSpecificGetRenderSurface(
+ int mip_level) = 0;
+
// Returns true if the mip-map level has been locked.
bool IsLocked(unsigned int level) {
DCHECK_LT(static_cast<int>(level), levels());
@@ -210,6 +213,10 @@ class Texture2D : public Texture {
friend class IClassManager;
static ObjectBase::Ref Create(ServiceLocator* service_locator);
+ typedef std::vector<RenderSurface::Ref> MipToRenderSurfaceMap;
+
+ MipToRenderSurfaceMap surface_map_;
+
// The width of the texture, in texels.
ParamInteger::Ref width_param_;
// The height of the texture, in texels.
@@ -308,12 +315,9 @@ class TextureCUBE : public Texture {
// Parameters:
// face: [in] The cube face from which to extract the surface.
// mip_level: [in] The mip-level of the surface to be returned.
- // pack: [in] The pack in which the surface will reside.
// Returns:
// Reference to the RenderSurface object.
- virtual RenderSurface::Ref GetRenderSurface(CubeFace face,
- int level,
- Pack* pack) = 0;
+ RenderSurface::Ref GetRenderSurface(CubeFace face, int level);
// Copy pixels from source bitmap to certain mip level.
// Scales if the width and height of source and dest do not match.
@@ -390,6 +394,10 @@ class TextureCUBE : public Texture {
// true if the operation succeeds
virtual bool Unlock(CubeFace face, int level) = 0;
+ // The platform specific part of GetRenderSurface.
+ virtual RenderSurface::Ref PlatformSpecificGetRenderSurface(
+ CubeFace face, int level) = 0;
+
// Returns true if the mip-map level has been locked.
bool IsLocked(unsigned int level, CubeFace face) {
DCHECK_LT(static_cast<int>(level), levels());
@@ -404,6 +412,10 @@ class TextureCUBE : public Texture {
friend class IClassManager;
static ObjectBase::Ref Create(ServiceLocator* service_locator);
+ typedef std::vector<RenderSurface::Ref> MipToRenderSurfaceMap;
+
+ MipToRenderSurfaceMap surface_maps_[NUMBER_OF_FACES];
+
// The length of each edge of the cube, in texels.
ParamInteger::Ref edge_length_param_;