Results 1 to 10 of 27

Thread: BGRABitmap tutorial

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    BGRABitmap tutorial

    Hello people.

    I've started a tutorial for BGRABitmap. It's a graphical library for Lazarus, that is used in LazPaint.

    It shows how to load and stretch images, use direct pixel access, combine layers, fill with gradients, use line styles and splines, generate textures with Perlin noise and render lighting with Phong shading.

    Each tutorial is accompanied by screenshots.

    http://wiki.lazarus.freepascal.org/BGRABitmap_tutorial

  2. #2
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Not a lazarus user myself, but nice stuff nonetheless...
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  3. #3
    Interesting! It offers a lot more than the delphi VCL does, out of the box. (allthough delphi has it's own set of graphics libraries).

    I wonder how fast the library is. Has anyone ever done a stresstest?
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  4. #4
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Those are some pretty cool tutorials. I'm curious though, would these uses of the Bitmap object using the OS' GUI not be rather slow even on Windows Vista/7 or Mac OS X?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #5
    Quote Originally Posted by chronozphere View Post
    Interesting! It offers a lot more than the delphi VCL does, out of the box. (allthough delphi has it's own set of graphics libraries).

    I wonder how fast the library is. Has anyone ever done a stresstest?
    Well it depends. Some code could be optimized. It's all in Pascal, no assembler here.

    Quote Originally Posted by WILL View Post
    Those are some pretty cool tutorials. I'm curious though, would these uses of the Bitmap object using the OS' GUI not be rather slow even on Windows Vista/7 or Mac OS X?
    The point of BGRABitmap is to use TBitmap only when necessary. It uses a DIB section if possible, so it is kind of direct drawing. Specific code for a platform can be added to have DIB sections. It's already done for Windows and on GTK.

  6. #6
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Well your last 2 tutorials go into 3D stuff, so I was just wondering how practical all that would be if you decided to do some animation for visual effect. Is it worth it to try this for a nicer looking application GUI or would we just be better off using OpenGL or Direct3D instead?
    Jason McMillen
    Pascal Game Development
    Co-Founder





Tags for this Thread

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
  •