Results 1 to 4 of 4

Thread: [2.3.3]CL_Sprite Bug

  1. #1
    Lesser Knight
    Join Date
    Sep 2011
    Posts
    38

    Default [2.3.3]CL_Sprite Bug

    There is a bug if using set_image_data().
    With .clone(), it work fine.
    Example3Sprites.zip

  2. #2

    Default

    That isn't really a bug actually, right now how clanlib is made the default sprite constructor with no parameter doesn't create any sprite implementation. And set_image_data only set the actual image of the sprite it doesn't create a sprite implementation so you only have an image but no sprite implementation resulting in a crash. But the resource manager is quite of a nice function of clanlib, it cache the things it load so if you create two sprites using the constructor like you did there:

    Code:
    CL_Sprite boat_sprite(gc, "Boat", &resources);
    There will actually only be one image loaded, there won't be another useless copy of the image so you can just use that.

    set_image_data on the other hand can be used when you want to change the image of an already created sprite.

  3. #3
    Lesser Knight
    Join Date
    Sep 2011
    Posts
    38

    Default

    Thanks a lot

  4. #4
    Randy
    Guest

    Default

    At first i too thought it was a bug

Similar Threads

  1. CL_Image or CL_Sprite using 2.3.3
    By babyvegas in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 10-30-2011, 03:48 PM
  2. CL_Sprite question
    By powerfear in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 09-08-2011, 06:13 PM
  3. Shaders and Cl_Sprite
    By Michaƫl Picovschi in forum Official ClanLib SDK Forums
    Replies: 11
    Last Post: 05-09-2011, 12:33 PM
  4. possibly bug in CL_Sprite and CL_CollisionOutline
    By nemcheg in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 06-20-2010, 06:17 PM
  5. CL_Sprite problems
    By gmatt in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 06-29-2007, 05:38 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
  •