Commit a8377b26 authored by hybrid's avatar hybrid

Added some more stringc taking overloads.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1531 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 953b9e63
......@@ -34,12 +34,12 @@ namespace scene
IndexBuffer->drop();
}
virtual IVertexBuffer &getVertexBuffer() const
virtual IVertexBuffer& getVertexBuffer() const
{
return *VertexBuffer;
}
virtual IIndexBuffer &getIndexBuffer() const
virtual IIndexBuffer& getIndexBuffer() const
{
return *IndexBuffer;
}
......
......@@ -133,6 +133,11 @@ public:
\return Returns true if file exists, and false if it does not exist or an error occured. */
virtual bool existFile(const c8* filename) const = 0;
//! Determines if a file exists and could be opened.
/** \param filename is the string identifying the file which should be tested for existence.
\return Returns true if file exists, and false if it does not exist or an error occured. */
virtual bool existFile(const core::stringc& filename) const = 0;
//! Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).
/** Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for
more information on how to use the parser.
......
......@@ -140,6 +140,18 @@ namespace video
IReferenceCounted::drop() for more information. */
virtual ITexture* getTexture(const c8* filename) = 0;
//! Get access to a named texture.
/** Loads the texture from disk if it is not
already loaded and generates mipmap levels if desired.
Texture loading can be influenced using the
setTextureCreationFlag() method. The texture can be in several
imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD.
\param filename Filename of the texture to be loaded.
\return Pointer to the texture, or 0 if the texture
could not be loaded. This pointer should not be dropped. See
IReferenceCounted::drop() for more information. */
virtual ITexture* getTexture(const core::stringc& filename) = 0;
//! Get access to a named texture.
/** Loads the texture from disk if it is not
already loaded and generates mipmap levels if desired.
......
......@@ -74,6 +74,12 @@ public:
//! determinates if a file exists and would be able to be opened.
virtual bool existFile(const c8* filename) const;
//! determines if a file exists and would be able to be opened.
bool existFile(const core::stringc& filename) const
{
return existFile(filename.c_str());
}
//! Creates a XML Reader from a file.
virtual IXMLReader* createXMLReader(const c8* filename);
......
......@@ -60,6 +60,10 @@ namespace video
//! loads a Texture
virtual ITexture* getTexture(const c8* filename);
//! loads a Texture
virtual ITexture* getTexture(const core::stringc& filename)
{ return getTexture(filename.c_str()); }
//! loads a Texture
virtual ITexture* getTexture(io::IReadFile* file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment