Results 1 to 2 of 2

Thread: help ! how can exchange Resource<Texture> to Resource<Texture2D>

  1. #1

    Default help ! how can exchange Resource<Texture> to Resource<Texture2D>

    how can exchange Resource<Texture> to Resource<Texture2D>?
    tks!

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Do you want Resource<Texture> to Resource<Texture2D> for loading textures in different threads ? ... even then, I'm not sure why you need Resource<Texture2D> when Resource<Texture> is internally the same thing.


    Instead, is this what you want?
    Texture2D texture_ghost = Texture::resource(canvas, image, resources).to_texture_2d();

    Or for sprites
    Sprite spr_ghost = Sprite::resource(world->canvas, "Game/spr_ghost", world->resources);

Similar Threads

  1. Resource Manager
    By Pigmess in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 03-25-2012, 08:03 PM
  2. custom resource
    By oilen in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 12-07-2007, 12:12 PM
  3. use zipped resource
    By DavinciZhe in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 10-20-2007, 07:59 PM
  4. Duplicate resource
    By DarthDie in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 05-16-2007, 01:18 PM
  5. resource.dat
    By redink1 in forum Other RTsoft Games
    Replies: 1
    Last Post: 11-15-2002, 10:08 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •