//----------------------------------------------------------------------------//
Texture& Direct3D9Renderer::createTexture(const String& name, const Sizef& size)
{
    throwIfNameExists(name);

    Direct3D9Texture* tex = new Direct3D9Texture(*this, name, size);
    d_textures[name] = tex;

    logTextureCreation(name);

    return *tex;
}
Beispiel #2
0
//----------------------------------------------------------------------------//
Texture& Direct3D10Renderer::createTexture(const String& name)
{
    throwIfNameExists(name);

    Direct3D10Texture* tex = new Direct3D10Texture(*d_device, name);
    d_textures[name] = tex;

    logTextureCreation(name);

    return *tex;
}
//----------------------------------------------------------------------------//
Texture& NullRenderer::createTexture(const String& name, const Sizef& size)
{
    throwIfNameExists(name);

    NullTexture* t = new NullTexture(name, size);
    d_textures[name] = t;

    logTextureCreation(name);

    return *t;
}
//----------------------------------------------------------------------------//
Texture& NullRenderer::createTexture(const String& name, const String& filename,
                                     const String& resourceGroup)
{
    throwIfNameExists(name);

    NullTexture* t = new NullTexture(name, filename, resourceGroup);
    d_textures[name] = t;

    logTextureCreation(name);

    return *t;
}
//----------------------------------------------------------------------------//
Texture& Direct3D9Renderer::createTexture(const String& name,
                                          LPDIRECT3DTEXTURE9 texture)
{
    throwIfNameExists(name);

    Direct3D9Texture* tex = new Direct3D9Texture(*this, name, texture);
    d_textures[name] = tex;

    logTextureCreation(name);

    return *tex;
}
//----------------------------------------------------------------------------//
Texture& DirectFBRenderer::createTexture(const CEGUI::String& name)
{
    if (d_textures.find(name) != d_textures.end())
        CEGUI_THROW(AlreadyExistsException(
            "A texture named '" + name + "' already exists."));

    DirectFBTexture* tex = new DirectFBTexture(d_directfb, name);
    d_textures[name] = tex;

    logTextureCreation(tex);

    return *tex;
}
Beispiel #7
0
//----------------------------------------------------------------------------//
Texture& OpenGLRendererBase::createTexture(const String& name, const Sizef& size)
{
    if (d_textures.find(name) != d_textures.end())
        CEGUI_THROW(AlreadyExistsException(
            "A texture named '" + name + "' already exists."));

    OpenGLTexture* tex = CEGUI_NEW_AO OpenGLTexture(*this, name, size);
    d_textures[name] = tex;

    logTextureCreation(name);

    return *tex;
}
Beispiel #8
0
//----------------------------------------------------------------------------//
Texture& OpenGL3Renderer::createTexture(const String& name)
{
    if (d_textures.find(name) != d_textures.end())
        CEGUI_THROW(AlreadyExistsException(
            "A texture named '" + name + "' already exists."));

    OpenGL3Texture* tex = new OpenGL3Texture(*this, name);
    d_textures[name] = tex;

    logTextureCreation(name);

    return *tex;
}
//----------------------------------------------------------------------------//
Texture& Direct3D9Renderer::createTexture(const String& name,
                                          const String& filename,
                                          const String& resourceGroup)
{
    throwIfNameExists(name);

    Direct3D9Texture* tex =
        new Direct3D9Texture(*this, name, filename, resourceGroup);
    d_textures[name] = tex;

    logTextureCreation(name);

    return *tex;
}
Beispiel #10
0
//----------------------------------------------------------------------------//
Texture& OpenGLRenderer::createTexture(const String& name, GLuint tex,
                                       const Sizef& sz)
{
    if (d_textures.find(name) != d_textures.end())
        CEGUI_THROW(AlreadyExistsException(
            "A texture named '" + name + "' already exists."));

    OpenGLTexture* t = new OpenGLTexture(*this, name, tex, sz);
    d_textures[name] = t;

    logTextureCreation(name);

    return *t;
}