Results 1 to 7 of 7

Thread: Can i Add a component into object?

  1. #1

    Can i Add a component into object?

    Is this possible to add a TPanel component in a glplane object?

    So when rotatiing or scaling the glplane, rotating or scaling the TPanel inside?

    Thank you

  2. #2
    No. TPanel uses GDI (or whatever they call it now) while glplane uses OpenGL. GDI and OpenGL aren't compatible.
    No signature provided yet.

  3. #3
    Quote Originally Posted by Ñuño Martínez View Post
    No. TPanel uses GDI (or whatever they call it now) while glplane uses OpenGL. GDI and OpenGL aren't compatible.
    If you are right then how the firemonkey do that...
    There is an example in the DelphiXE2 that can do that ... but i don't have DelphiXE2 so i can see that..
    And firemonkey uses part of glscene so i think there is a way... but i don't know it...

    Thank you nuno martinez...

  4. #4
    Firemonkey is a separate framework. All the components in FireMonkey have been rewritten from scratch and don't use VCL at all (on windows it uses DirectX, on other platforms OpenGL (ES)), so that's why it may work there. And it's based on VGScene afaik, and not on glscene (though I've heard they "stole" some code from glScene).

  5. #5
    Quote Originally Posted by Sascha Willems View Post
    Firemonkey is a separate framework. All the components in FireMonkey have been rewritten from scratch and don't use VCL at all (on windows it uses DirectX, on other platforms OpenGL (ES)), so that's why it may work there. And it's based on VGScene afaik, and not on glscene (though I've heard they "stole" some code from glScene).
    So there is no way so i can put a twincontrol component in opengl behave like a glscene object?
    No?

    Thank you Sascha Willems...

  6. #6
    Well, you could draw the canvas of the TPanel (or all other TWinControls) to a Bitmap with e.g. BitBlt, and then feed that bitmap to OpenGL as a texture. This would allow you to display your TWinControl inside OpenGL. Though that won't be very fast.

  7. #7
    Quote Originally Posted by Sascha Willems View Post
    Well, you could draw the canvas of the TPanel (or all other TWinControls) to a Bitmap with e.g. BitBlt, and then feed that bitmap to OpenGL as a texture. This would allow you to display your TWinControl inside OpenGL. Though that won't be very fast.
    Yes i know about this... and already try it... it slow and became slower where more objects put in the panel... not so good option....

    So i must think another way to decode the video and audio in the texture to use in glplane...

    Thank you Sascha Willems...

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
  •