opengl viewport+some mui buttons
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 186 from 2003/10/23
    like the topic, i want to create a mui window with buttons and embed on it also a render in opengl.
    how it is possible?

    Titler for exemple implement it , i'we watched the blender sources, the frodo one and the SDK blanker, but with differts methods, all the 3 examples "paint" the gl buffer filling all the window area (and the window is an intuition window also)

    i've tried to "convert" a bitmap buffer into a raw image to embed it like on the rawimage mcc demo, but it fails too :(

    how can i obtain something like this ? titler.jpg


    [ Edited by raistlin77it 18.09.2011 - 12:54 ]
    I'm nerdy in the extreme
    And whiter than sour cream

    White&Nerdy 2006 Al Yankovic
  • »18.09.11 - 11:50
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    Create MUI custom class where you blit gl bitmap to window surface. This allows better control how and when window is updated and you can control your gl view area size.

    My Frodo4 port (found on Aminet, with the source, IIRC...) uses TinyGL in MUI window.
    1 + 1 = 3 with very large values of 1
  • »18.09.11 - 20:40
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 186 from 2003/10/23
    i've downloaded the frodo4 sources,but there is something i don't understand...

    The glmui class is larger like the window (infact the leds are blitted ontop of the gl surface).

    so you intend if i play with the askminmax parameters , i can obtain some space to put the standard mui buttons? and get the gl part confined into a rectangle area?
    I'm nerdy in the extreme
    And whiter than sour cream

    White&Nerdy 2006 Al Yankovic
  • »19.09.11 - 08:39
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Yomgui
    Posts: 348 from 2004/8/31
    From: Québec - Canada
    In yuor MUI custom class, in the mDraw() method,
    check if your object size has changed and if it yes, initialize your TGL context with GLAInitializeContextBitMap() using your own bitmap created just before using the new the object size.

    And everytime in mDraw(), blit the bitmap on your object rastport.
    And now... next project!
  • »20.09.11 - 11:33
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 186 from 2003/10/23
    ok i will try asap, and maybe report problems ;)

    edit, it worked! finally i can have a MUI window with opengl an standard buttons/strings :D

    [ Edited by raistlin77it 22.09.2011 - 22:11 ]
    I'm nerdy in the extreme
    And whiter than sour cream

    White&Nerdy 2006 Al Yankovic
  • »20.09.11 - 16:16
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 186 from 2003/10/23
    Finally i have the MUI window with buttons and GL in it :)

    If anyone wants to know how i've obtained it, i have written a little tutorial (only in italian for now and with no source because is a mess sorry) on this site : http://www.nonsoloamiga.com/forum/viewtopic.php?f=12&p=6664#p6664

    [ Edited by raistlin77it 24.09.2011 - 15:02 ]
    I'm nerdy in the extreme
    And whiter than sour cream

    White&Nerdy 2006 Al Yankovic
  • »24.09.11 - 14:02
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    You could post your example to Aminet and MorphOS Development Wiki. Example source code is always welcome.
    1 + 1 = 3 with very large values of 1
  • »26.09.11 - 19:12
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 186 from 2003/10/23
    yes, i plan to make a "demo" app to show how to mix mui and gl.
    the wiki and aminet are a good idea :)

    And yes, we need more examples :oD
    I'm nerdy in the extreme
    And whiter than sour cream

    White&Nerdy 2006 Al Yankovic
  • »26.09.11 - 19:42
    Profile