TinyGL: FBO, Shaders and futur improvements
  • MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    I guess the question of the general fund became a bit moot, because...

    Funding is now complete! thanks to all of you who contributed, and of course a special thanks to pampers who contributed a massive 5,000 euro today, immediately making the funding cross the finish line!
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »09.06.22 - 19:40
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 502 from 2013/5/29
    Im totally speachless. Thanks soooo much Pampers.
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »09.06.22 - 19:50
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 590 from 2010/2/10
    From: FRANCE
    Waaouuu, thanks Pampers !
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »09.06.22 - 19:52
    Profile Visit Website
  • Butterfly
    Butterfly
    waldiamiga
    Posts: 90 from 2007/7/25
    From: Krakow, Poland
    Pampers is a co-founder of morphos.pl


    Dzięki kolego!

    MorphOS.pl
    PowerBook G4 1.67GHz|2GB DDR2|ATI Radeon 9700M 128MB|SSD 80GB|TFT 17"|MorphOS 3.1x
    Core i7 Notebook|WinUAE 3.x/AmigaOS4.1x & Icaros Desktop 2.x & QEmu 6.x.x
  • »09.06.22 - 20:04
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    MoerBoer
    Posts: 210 from 2019/10/15
    Thank you very much pampers!
  • »09.06.22 - 20:06
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ernsteiswuerfel
    Posts: 545 from 2015/6/18
    From: Funeralopolis
    Wow, that escalated quickly! ;-) Many thanks pampers!

    So the Mac Mini G4 will become the new DOOM 3 gaming machine to show off. :-D
    Talos II. [Gentoo Linux] | PMac G5 11,2. PMac G4 3,6. PBook G4 5,8. [MorphOS 3.18 / Gentoo Linux] | Vampire V4 SA [ApolloOS / Amiga OS 3.2.2]
  • »09.06.22 - 20:28
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Chain-Q
    Posts: 347 from 2003/10/12
    From: 1 AU, EU, DE/HU
    What the hell! Talk about killing the fun of a community fundraiser! :D But of course, massive thank you pampers!
    [.PegasosII/G4.:.Efika.:.Amiga2000/060.]
    [.Free Pascal Compiler MorphOS Port.]
    [.Hosting AmigaSpirit.hu.]
  • »09.06.22 - 20:34
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Stevo
    Posts: 888 from 2004/1/24
    From: #AmigaZeux
    We should order a pizza for pampers ;)
    ---
    http://www.iki.fi/sintonen/logs/its_only_football.txt
  • »09.06.22 - 20:55
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ernsteiswuerfel
    Posts: 545 from 2015/6/18
    From: Funeralopolis
    +1
    Talos II. [Gentoo Linux] | PMac G5 11,2. PMac G4 3,6. PBook G4 5,8. [MorphOS 3.18 / Gentoo Linux] | Vampire V4 SA [ApolloOS / Amiga OS 3.2.2]
  • »09.06.22 - 21:01
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12077 from 2003/5/22
    From: Germany
    > Talk about killing the fun of a community fundraiser!

    He seems to be developing a habit with this ;-)

    Anyway, thanks to pampers and all others who contributed.
  • »09.06.22 - 21:10
    Profile
  • IKE
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    IKE
    Posts: 146 from 2009/11/7
    From: Southern CA
    Thanks pampers!! and bigfoot for taking this on!!!
    IKE

    MacMini G4 1.5Ghz/PowerBook G4 1.67Ghz/PowerMac G5 2.0Ghz DP 7,2 Radeon 9650/256MB

    Join the conversation @ r/morphos
  • »09.06.22 - 22:00
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 779 from 2007/10/23
    From: Gelsenkirchen,...
    I believed 8000 was too much for our small community...
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »10.06.22 - 21:22
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    I just want to give a quick update on what I've been doing so far.

    First, the good news is that in the end I'm gonna be doing more improvements to OpenGL in MorphOS than promised by the bounty. I started looking at implementing the framebuffer object support, and while adding the required changes to the MorphOS header files, I came to the conclusion that the MorphOS OpenGL header files needed an overhaul, and it was better to do it right away rather than after I had already been modifying and updating the header files.

    To update the MorphOS header files, I repurposed the code I wrote to generate the MorphOS OpenGL 2.1 overview to make it automatically generate the OpenGL headers for MorphOS. What this means is that I now have a program where I can simply input which version of OpenGL I want to target, as well as which OpenGL extensions I additionally want to support, and it automatically generates the header files to support all of it. This also means that there's no longer any possibility of errors caused by human error in the standard OpenGL parts of the header files. Furthermore this also means that it will be possible to compile any OpenGL 2.1 (or older) application on MorphOS without having to potentially disable references to things MorphOS doesn't (yet) support. Every single OpenGL 2.1 function will exist in tinygl.library no matter if it's currently supported or not.

    This work also means that I've been busy implementing all the various different variants of standard OpenGL functions that have previously not been supported due to them being rarely, if ever, used. For some existing functions, I've also fixed various bugs I've found while going through the code, and in some cases I've implemented a more standards compliant behaviour.

    All in all, this should make the lives of developers who are creating or porting OpenGL apps on MorphOS easier, which will in the end benefit every MorphOS user. Even if not all of OpenGL 2.1 will be implemented and supported, this work will still bring us a lot closer to that goal than before.

    I also did promise at least one person who contributed to the bounty that I'd implement everything needed for Doom 3, and I realised that support for cube maps had been missing from TinyGL since MorphOS 3.0. I now reimplemented the cube map functionality in TinyGL as well as the R200 driver. Adding cube map support to the R300 driver is still pending, but will be done soon.

    The first project from the actual bounty to be complete will be the framebuffer object support. I think I'll be able to release the first public beta test version of the updated TinyGL and drivers, including the framebuffer object support, in around two weeks' time, but please don't take this as an exact deadline. I will probably also try to make some simple demo application to showcase the functionality, at least if I'm not running late.

    Edit: Also just wanted to mention that I've replied to all emails I've received regarding this bounty. If you've sent me an email and haven't received a reply yet, check and see if it maybe ended up in a spam folder. If it's not there either, send me a message here on MorphZone, and I'll double check on my end :)

    Edit2: Just to avoid confusion, the public beta version I'm referring to above will not have the entire bounty implemented, but only the changes that have been completed till now.

    [ Edited by bigfoot 21.06.2022 - 16:29 ]
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »21.06.22 - 08:46
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 192 from 2008/7/10
    From: Cheshire, UK
    Thanks Bigfoot.

    Great to see this project progressing already, really appreciated.
    PowerMac G5 Quad 2.5Ghz/2GB MorphOS 3.18 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.18 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.18 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »21.06.22 - 09:32
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    MoerBoer
    Posts: 210 from 2019/10/15
    Great work so far bigfoot!
  • »21.06.22 - 09:59
    Profile
  • Cocoon
    Cocoon
    eastone
    Posts: 44 from 2007/8/4
    From: Vaasa/Finland
    That's impressive, BIG THX Bigfoot!!!
  • »21.06.22 - 11:16
    Profile
  • Butterfly
    Butterfly
    Posts: 91 from 2020/12/24
    Quote:

    I realised that support for cube maps had been missing from TinyGL since MorphOS 3.0


    Yep. But notice that for full D3 support for bumpmapping and specular you need "GL_ARB_texture_env_dot3" also. Don't know to what extent cubemap and dot3 go hand in hand.

    This is for the non-shader renderer option. Most likely shaders have it already in the specs.

    For the "important" TexGen functionality AFAIK the only combinations used are:

    Code:
    qglTexGenf( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
    .
    .
    etc.

    qglTexGenf( GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_EXT );
    .
    .
    etc.

    qglTexGenfv( GL_S, GL_OBJECT_PLANE, lightProject[0].ToFloatPtr() );
    .
    .
    etc.


    [ Edited by Cowcat 21.06.2022 - 11:23 ]
  • »21.06.22 - 11:22
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    Quote:

    Cowcat wrote:
    Yep. But notice that for full D3 support for bumpmapping and specular you need "GL_ARB_texture_env_dot3" also. Don't know to what extent cubemap and dot3 go hand in hand.


    Yep, don't worry, I didn't forget about this one or any of the other extensions Doom 3 needs :) In fact, R200 already supports this extension, although it's not advertised. It'll be added to R300 too, and I've updated TinyGL to correctly advertise this extension when the feature is available.

    Quote:

    Cowcat wrote:For the "important" TexGen functionality AFAIK the only combinations used are:

    Code:
    ...



    Texture coord generation will be fully supported as well, so no worries there either :)
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »21.06.22 - 12:02
    Profile Visit Website
  • IKE
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    IKE
    Posts: 146 from 2009/11/7
    From: Southern CA
    Great news! Keep up the good work!
    IKE

    MacMini G4 1.5Ghz/PowerBook G4 1.67Ghz/PowerMac G5 2.0Ghz DP 7,2 Radeon 9650/256MB

    Join the conversation @ r/morphos
  • »21.06.22 - 17:44
    Profile Visit Website
  • Just looking around
    Posts: 1 from 2020/10/21
    bigfoot r0xxx!
  • »21.06.22 - 21:03
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    Hi everyone!

    I had wanted to have a TinyGL update out several weeks ago already, but unfortunately that didn't happen. When I made my previous post, I was working on framebuffer object support (project #2), but then I distracted myself from that by starting work on the OpenGL ARB program support (project #4), which is now very close to being complete. During the course of working on that, I also ended up working on other things which are not technically covered by the bounty, but which are still very useful towards being able to run more modern OpenGL applications.

    As a quick overview, here's how far I'd estimate that I am with the projects that are part of the bounty:
    Project 1 - 10% - Implement the fixed-function OpenGL pipeline as shaders
    Project 2 - 50% - Framebuffer objects
    Project 3 - 10% - Shaders
    Project 4 - 80% - ARB Programs
    Project 5 - 5% - R600 driver

    I had hoped that I could finally release an update this weekend with OpenGL ARB program support included, but it currently doesn't seem likely that I'll have enough time to get it to a releasable state in time, so hopefully shortly after the weekend.

    I also wrote two small example programs to show off the OpenGL ARB Program support, which I'll include the source code to in the SDK update I'm planning on releasing together with the TinyGL update. One of these programs includes (very nice, if I may say so) graphics made by ASiegel, so thank you a lot for that!

    For framebuffer objects, the status is that the TinyGL side of it is or more or less done, minus fixing whatever problems might pop up once it gets tested properly. What's missing is the driver side support that's required for it to work.

    I've also tried to make a more detailed changelog for the upcoming public beta release, which is unfortunately not complete, but should have the most important changes outlined. This changelog will probably grow a little bit before the planned release next week, but here's the current version of it:

    Code:
    tinygl.library:
    - Library version is now 53.0.
    - Cleaned up the OpenGL extensions advertised by TinyGL:
    o GL_EXT_texture_compression_s3tc was advertised with the
    wrong name, EXT_texture_compression_s3tc
    o The following non-existing extensions are no longer
    advertised:
    * GL_ARB_color_table
    * GL_ARB_compiled_vertex_array
    * GL_ARB_draw_range_elements
    * GL_EXT_color_table
    o The following extensions do exist, but are not supported,
    and thus no longer advertised:
    * GL_EXT_draw_range_elements
    o New driver-independent (or supported by all current
    drivers) extensions advertised:
    * GL_ARB_imaging
    * GL_ARB_texture_border_clamp
    * GL_ARB_texture_env_dot3
    * GL_ARB_texture_mirrored_repeat
    * GL_ARB_texture_non_power_of_two
    * GL_ARB_transpose_matrix
    * GL_ARB_window_pos
    * GL_EXT_abgr
    * GL_EXT_blend_color
    * GL_EXT_blend_equation_separate
    * GL_EXT_blend_func_separate
    * GL_EXT_blend_minmax
    * GL_EXT_blend_subtract
    * GL_EXT_multi_draw_arrays
    * GL_EXT_texture_env_dot3
    * GL_SGI_color_table
    * New driver-dependent extensions advertised. Availability
    depends on the driver in use:
    * GL_ARB_fragment_program
    * GL_ARB_texture_cube_map
    * GL_ARB_vertex_program
    * GL_EXT_texture_cube_map
    - Every OpenGL 2.1 function now exists in the tinygl.library
    base. Note that this doesn't mean that TinyGL supports all
    of OpenGL 2.1's functionality yet, just that the functions
    exists.
    - Added support for cube mapping. (extensions:
    GL_ARB_texture_cube_map, GL_EXT_texture_cube_map)
    - Added support for OpenGL ARB programs. (extensions:
    GL_ARB_fragment_program, GL_ARB_vertex_program)
    - Many OpenGL functions that previously only had some variants
    of otherwise supported functions available now support all
    variants. These are functions whose names typically end with
    a single digit (1, 2, 3 or 4) followed by 1 or two characters
    to indicate argument type (b, d, f, i, s, ub, ui, us) and
    then optionally a v, for example glColor3ub().
    These functions are:
    o glColor#?()
    o glEvalCoord#?()
    o glMultiTexCoord#?()
    o glNormal#?()
    o glRasterPos#?()
    o glTexCoord#?()
    o glVertex#?()
    o glWindowPos#?()
    - Updated glGetDoublev, glGetFloatv and glGetIntegerv to fix
    bugs in numerous already supported tags, and added many
    previously unsupported tags.
    - Added support for the following state getter functions:
    o glGetBooleanv()
    o glGetLightiv()
    o glGetMaterialiv()
    o glGetTexGendv()
    o glGetTexGenfv()
    o glGetTexGeniv()
    o glGetTexLevelParameterfv()
    - Added support for the following state setter functions:
    o glFogiv()
    o glLightiv()
    o glLightModeliv()
    o glMaterialiv()
    o glPointParameterf()
    o glPointParameterfv()
    o glPointParameteri()
    o glPointParameteriv()
    o glTexGeniv()
    o glTexGendv()
    - Added support for the following glGetLight#?() tags:
    o GL_CONSTANT_ATTENUATION
    o GL_LINEAR_ATTENUATION
    o GL_QUADRATIC_ATTENUATION
    o GL_SPECULAR
    o GL_SPOT_CUTOFF
    o GL_SPOT_DIRECTION
    o GL_SPOT_EXPONENT
    - Added support for glMultiDrawArrays() and
    glMultiDrawElements().
    - Added support for glFinish().
    - glGetError() is now implemented and will - for some
    functions - return standards compliant error codes.
    - Added glRectsv().
    - Fixed some of the default states in freshly created TinyGL
    contexts to match what is required by OpenGL:
    o Secondary colour
    o Raster colour
    o Raster secondary colour
    o Texture coordinates for texture units > 0
    - glGetTexLevelParameter#?() now supports queries of the
    GL_TEXTURE_1D target.

    R200:
    - Added support for cube maps.

    R200, R300, R400 and R500:
    - Texture combiner support has been fixed to be be standards
    compliant:
    o Added/fixed the support for the GL_ADD, GL_ADD_SIGNED,
    GL_DOT3_RGB, GL_DOT3_RGBA, GL_INTERPOLATE and GL_SUBTRACT
    texture combiner functions.
    o Added support for texture combiner output scaling.
    o Any and every combination of GL_SRC_COLOR,
    GL_ONE_MINUS_SRC_COLOR, GL_ALPHA and
    GL_ONE_MINUS_SRC_ALPHA operands now work.

    R300/R400:
    - Added support for OpenGL ARB programs.

    R500:
    - Fixed a bug that would cause wrong rendering if an
    application had gaps in its enabled texture units,
    for example if only texture units 0 and 2 were enabled.

    OpenGL test suite:
    - Added texture combiner tests to my OpenGL test suite. All
    drivers and hardware combinations now pass all tests.

    SDK:
    - Please note that any software compiled with the updated SDK
    will require tinygl.library version 53.0 or higher, and thus
    either MorphOS 3.18 or MorphOS 3.17 + this separate TinyGL
    update. If you manually open tinygl.library, you must
    update your code to request version 53!
    - TinyGL's automatic libopen function now requires at least
    version 53 of tinygl.library.
    - TinyGL's link library now comes in both regular and baserel
    flavours.
    - A function to obtain OpenGL function pointers at runtime,
    tglGetProcAddress(), has been added to the link library.
    This function supports every single OpenGL function that's
    present in TinyGL.
    - Includes have been updated to fully support OpenGL 2.1, plus
    the following extensions:
    o GL_ARB_color_buffer_float
    o GL_ARB_depth_texture
    o GL_ARB_draw_buffers
    o GL_ARB_fragment_program
    o GL_ARB_fragment_program_shadow
    o GL_ARB_fragment_shader
    o GL_ARB_framebuffer_object
    o GL_ARB_half_float_pixel
    o GL_ARB_imaging
    o GL_ARB_matrix_palette
    o GL_ARB_multisample
    o GL_ARB_multitexture
    o GL_ARB_occlusion_query
    o GL_ARB_pixel_buffer_object
    o GL_ARB_point_parameters
    o GL_ARB_point_sprite
    o GL_ARB_shader_objects
    o GL_ARB_shading_language_100
    o GL_ARB_shadow
    o GL_ARB_shadow_ambient
    o GL_ARB_texture_border_clamp
    o GL_ARB_texture_compression
    o GL_ARB_texture_cube_map
    o GL_ARB_texture_env_add
    o GL_ARB_texture_env_combine
    o GL_ARB_texture_env_crossbar
    o GL_ARB_texture_env_dot3
    o GL_ARB_texture_float
    o GL_ARB_texture_mirrored_repeat
    o GL_ARB_texture_non_power_of_two
    o GL_ARB_texture_rectangle
    o GL_ARB_transpose_matrix
    o GL_ARB_vertex_blend
    o GL_ARB_vertex_buffer_object
    o GL_ARB_vertex_program
    o GL_ARB_vertex_shader
    o GL_ARB_window_pos
    o GL_ATI_separate_stencil
    o GL_EXT_abgr
    o GL_EXT_bgra
    o GL_EXT_blend_color
    o GL_EXT_blend_equation_separate
    o GL_EXT_blend_func_separate
    o GL_EXT_blend_logic_op
    o GL_EXT_blend_minmax
    o GL_EXT_blend_subtract
    o GL_EXT_color_subtable
    o GL_EXT_color_table
    o GL_EXT_compiled_vertex_array
    o GL_EXT_convolution
    o GL_EXT_draw_range_elements
    o GL_EXT_fog_coord
    o GL_EXT_histogram
    o GL_EXT_multi_draw_arrays
    o GL_EXT_packed_pixels
    o GL_EXT_paletted_texture
    o GL_EXT_point_parameters
    o GL_EXT_rescale_normal
    o GL_EXT_secondary_color
    o GL_EXT_separate_specular_color
    o GL_EXT_shadow_funcs
    o GL_EXT_shared_texture_palette
    o GL_EXT_stencil_two_side
    o GL_EXT_stencil_wrap
    o GL_EXT_texture3D
    o GL_EXT_texture_compression_s3tc
    o GL_EXT_texture_cube_map
    o GL_EXT_texture_env_add
    o GL_EXT_texture_env_combine
    o GL_EXT_texture_env_dot3
    o GL_EXT_texture_filter_anisotropic
    o GL_EXT_texture_lod
    o GL_EXT_texture_lod_bias
    o GL_EXT_texture_sRGB
    o GL_HP_convolution_border_modes
    o GL_NV_blend_square
    o GL_NV_texgen_reflection
    o GL_S3_s3tc
    o GL_SGIS_generate_mipmap
    o GL_SGIS_multitexture
    o GL_SGIS_texture_edge_clamp
    o GL_SGIS_texture_lod
    o GL_SGI_color_matrix
    o GL_SGI_color_table
    o GL_SUN_multi_draw_arrays


    [ Edited by bigfoot 28.07.2022 - 18:24 ]
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »28.07.22 - 17:18
    Profile Visit Website
  • IKE
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    IKE
    Posts: 146 from 2009/11/7
    From: Southern CA
    Excellent News! Thanks Bigfoot!
    IKE

    MacMini G4 1.5Ghz/PowerBook G4 1.67Ghz/PowerMac G5 2.0Ghz DP 7,2 Radeon 9650/256MB

    Join the conversation @ r/morphos
  • »28.07.22 - 18:53
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    MoerBoer
    Posts: 210 from 2019/10/15
    That's some great progress. This is a beast of project.

    Keep up the good work!
  • »28.07.22 - 19:01
    Profile