Results 1 to 8 of 8

Thread: opengl render on tpanel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by serkank View Post
    Code:
    tekrar:
      hwnd:=panel1.Handle;
      if hwnd = 0 then goto tekrar;
    WOW! Last time I have seen GOTO commands in pascal based program was when I was checking an old TurboPascal code.
    BTW That is a potential infinite loop. A realy BAD thing.
    I think you can throw that code out as it serves no purpose. What it will do is cause your application to hang if hwnd would equal 0.

    I also see you are using JEDI OpenGL components. If I'm not mistaken they relly on SDL1 and are no longer maintained. I'm not sure about that.
    Maybe you should think of using latest SDL library which bases on SDL2.
    You might wanna check this site: http://www.freepascal-meets-sdl.net/

  2. #2
    yes i know. i only try to test, its work on debugger i can stop it on debugger. This code only for test. i use goto label because its short code ...
    first time i downloaded SDL2 library but SDL + SDL2 havent much tutorial and example, if i try sdl 1.2 code width sdl2 lot of sdl function change width sdl2...

    any body know how can i get opengl render on tpanel ?

  3. #3
    i found problem.

    if texture load before openglcontrol.makecurent or openglcontrol.onpaint function , openglcontrol cant show texture.
    thank you for your interest and answer..

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
  •