Results 1 to 10 of 13

Thread: Create OpenGL Texture from TBitmap

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Quote Originally Posted by FelipeFS View Post
    But still, the texture is not being displayed in the screen.
    You didn't say that in first post I assumed it is working code just in need of optimizations.

    Code:
    self.FTexture:=CreateTexture(width,height,@canvas.pixels);
    You won't be able to do that. Pixels is a property with GetPixel(X, Y: Integer): TColor function internally. But you are able to read the pixels without converting to TLazIntFImage. You can also send the TBitmap as parameter, and then read from its canvas pixels[] or colors[] property.
    (Canvas.Colors[] is record structure divided in R,G,B, but works for freepascal only)
    Last edited by User137; 18-06-2012 at 11:05 AM.

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
  •