Results 1 to 5 of 5

Thread: CL_PixelBuffer::get_pixel() weird results...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Squire Otto (Strange) Halmén's Avatar
    Join Date
    Sep 2006
    Location
    A city called Loviisa, in southern Finland, Europe.
    Posts
    20

    Post CL_PixelBuffer::get_pixel() weird results...

    I have attached a screenshot of a strange result when using the function CL_PixelBuffer::get_pixel(). To the right there is a CL_Surface object drawn with CL_Surface::draw(), in the middle you can see a bit of the blue background, and to the left there's the pixelbuffer drawn with this code:
    Code:
    for (int i = 0; i < buffer.get_height(); i++)
    {
    	for (int j = 0; j < buffer.get_width(); j++)
    	{
    		gc->draw_pixel(j, i, buffer.get_pixel(j, i));
    	}
    }
    ...where gc is a pointer to the graphic context and buffer is a CL_PixelBuffer object obtained from the surface by CL_Surface::get_pixeldata(). I've called CL_PixelBuffer::lock() before getting the pixels, as told in the reference manual. I've even tried calling unlock(), and calling neither lock() nor unlock(), but the results are the same: CL_Surface::draw() shows the original PNG image as it appeared when I saved it, but CL_PixelBuffer::get_pixel() gives strange results. Is this a bug or have I done something wrong?

    BTW, the image was edited from Super Mario 64 textures.
    Attached Images Attached Images  
    In Finnish, "Strange" is spelled "Outo" which is very similar to my real first name, but that's not the main reason why my friends chose to call me that...

    No homepage yet, but when my raycaster becomes good enough to be released, I'll make one.

Similar Threads

  1. Weird build problem
    By void_kill in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 11-10-2006, 06:18 PM
  2. Somthin Weird
    By AntiLoveShadow in forum Dink Smallwood HD
    Replies: 2
    Last Post: 11-26-2004, 12:52 PM
  3. Try my weird little game
    By Seth in forum RTsoft Tavern
    Replies: 10
    Last Post: 03-29-2003, 08:34 PM
  4. Weird Idea
    By redink1 in forum Funeral Quest
    Replies: 1
    Last Post: 12-07-2002, 11:32 PM
  5. Weird Redraw Bug
    By redink1 in forum Other RTsoft Games
    Replies: 1
    Last Post: 10-14-2002, 10:51 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
  •