TinyGL: FBO, Shaders and futur improvements
  • 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 - 11: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 - 16:44
    Profile Visit Website
  • Just looking around
    Posts: 1 from 2020/10/21
    bigfoot r0xxx!
  • »21.06.22 - 20: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 - 16: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 - 17: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 - 18:01
    Profile
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 451 from 2003/7/25
    From: Wroclaw/Poland
    Great news!

    TinyGL soon will be able to do more than I can. I have to learn features which I couldn't to use in: StormMESA, MiniGL and current TinyGL. :) :)

    Good to know that new TinyGL will improve also old/current projects (which use fixed pipeline). Two big projects which I currently create use fixed pipeline. I am not going to migrate it to OpenGL with shaders. But next... probably yes...

    Thank you for your work and sharing the progress.

    [ Edited by MDW 28.07.2022 - 20:36 ]
  • »28.07.22 - 18:35
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Flash
    Posts: 104 from 2019/11/1
    Great news!
    What will be the impact of new implementation on a macmini or a pegasos 2 with an ati 9350?
  • »29.07.22 - 14:12
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    Quote:

    Flash wrote:
    Great news!
    What will be the impact of new implementation on a macmini or a pegasos 2 with an ati 9350?


    I assume you mean a Radeon 9250, in which case that more or less equals what is in a Mac Mini, both using the RV280 chip, which belongs in the R200 family of Radeon chips.

    Most of the changes in this first update will mostly affect new applications and games being ported to or created for MorphOS. The vastly improved SDK means it'll be easier for software developers to port software over to MorphOS, and the OpenGL API improvements and driver bug fixes means that that software is more likely to run and work correctly in the first place.

    For existing MorphOS software, Doom 3 is what stands to benefit the most from these changes, I believe. However Doom 3 (and SDL) will need updates to take advantage of these changes.

    The newly implemented ARB programs will only be supported on R300 and R400 in the first update. R500 and R200 support - up to what the hardware can handle - will come in a later update.

    For R200 specifically, support for cube maps has been implemented, which allows software that uses cube maps to work correctly. This probably won't directly affect much existing software, but again it makes more new software possible.
    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.
  • »29.07.22 - 14:30
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    OK, it's finally happening! The first beta version of the TinyGL update is here!

    TinyGL update 2022-08-05 download link.

    Please make sure you read the included readme. If you run into an problems with or have any questions about the update, feel free to reply to this thread (or email me directly).

    I'll update the website to include a link to the update later. Just wanted to finally get this update out for everyone to try out!
    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.
  • »05.08.22 - 14:30
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Stevo
    Posts: 887 from 2004/1/24
    From: #AmigaZeux
    Groovy! :-D
    ---
    http://www.iki.fi/sintonen/logs/its_only_football.txt
  • »05.08.22 - 14:45
    Profile
  • Butterfly
    Butterfly
    waldiamiga
    Posts: 90 from 2007/7/25
    From: Krakow, Poland
    Good news! Thx Bigfoot.

    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
  • »05.08.22 - 17:03
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    tolkien
    Posts: 497 from 2013/5/29
    Fantastic news!!! Downloading now. Thanks Bigfoot!
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »05.08.22 - 17:39
    Profile
  • IKE
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    IKE
    Posts: 146 from 2009/11/7
    From: Southern CA
    Awesome! I'll be testing with Doom 3 RoE tonight!
    IKE

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

    Join the conversation @ r/morphos
  • »05.08.22 - 18:48
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    NewSense
    Posts: 1458 from 2012/11/10
    From: Manchester, UK/GB
    @ bigfoot - Super efficient completion of stage 1 of the bounty - which is awe inspiring really. :-o
    MacMini 1.5GHz,64MB VRAM, PowerBooks A1138/9 (Model 5,8/9),PowerMac G5 2.3GHz(DP), iMac A1145 2.1GHz 20", all with MorphOS v3.18+,Airport,Bluetooth,A1016 Keyboard,T-RB22 Mouse,DVD-RW-DL,MiniMax,Firewire/USB2 & MacOSX 10.4/5
  • »06.08.22 - 01:32
    Profile
  • Butterfly
    Butterfly
    Posts: 91 from 2020/12/24
    No luck with Doom3 for Macmini: It freezes the whole machine as soon a new game is loaded.

    If you have an old saved level it fails depending on where you're at with the same symptoms.

    I've compiled it with the new SDK and even compiled the new SDL2 library from github.

    SDK Examples recompiled seem to be ok (of course not the Bump2 program for my system).
  • »06.08.22 - 06:46
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 588 from 2010/2/10
    From: FRANCE
    @sdl2

    I work on SDL2 for this beta "tinygl", use tglEnableNewExtensions(0) if tinygl version 53 detect.
    I create specific branch into repository (warning not sur if working 100%):
    https://github.com/BeWorld2018/SDL/commit/a9a191d59006c61c0505e6fb98a4ef29b1b79b94

    Dont hesites if you see somthing wrong into that :-)


    @doom3

    bigfoot say : "But Doom 3 won't work right at least, there's still more things I need to add/fix for it."
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »06.08.22 - 07:20
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 91 from 2020/12/24
    @doom3 Oh well, it needs more Cowbell. No problem. :)

    Vacation time for me for some days.
  • »06.08.22 - 07:59
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    Quote:

    Cowcat wrote:
    No luck with Doom3 for Macmini: It freezes the whole machine as soon a new game is loaded


    Thanks for the report. I hadn't tested Doom 3 on R200, but I'll do that and fix whatever is causing the crash :)
    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.
  • »06.08.22 - 08:50
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Cool_amigaN
    Posts: 745 from 2011/11/30
    Tested and several textures are still missing on custom Q3 maps such as in OSPDM3. Is this due the driver or the OSP version that we have? My system has a Radeon 9800 AGP (flashed).
    Amiga gaming Tribute: Watch, rate, comment :)
  • »06.08.22 - 09:09
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Flash
    Posts: 104 from 2019/11/1
    Great news; thanks!
  • »06.08.22 - 09:22
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    Quote:

    Cool_amigaN wrote:
    Tested and several textures are still missing on custom Q3 maps such as in OSPDM3. Is this due the driver or the OSP version that we have? My system has a Radeon 9800 AGP (flashed).


    If you can provide me with the map in question, plus instructions on how to use it, as well as how to get to a part of the map that shows the problem, preferably with a screenshot so I know what to look for, then I'll check it out and fix it.
    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.
  • »06.08.22 - 09:36
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Cool_amigaN
    Posts: 745 from 2011/11/30
    Hey Mark :) Well, you need Quake 3 Arena + OSP mod (both were your ports if I recall correctly? Cant find the link for the mod atm) and then download OSPDM2 (run quake 3, load mod, select skirmish, choose tournament and pick OSPDM2 map). The end result, looks like this. The same is happening with OSPDM3, as the image shows here (it even misses the custom (?) cursor of the map). Also, apart from OSP mod, same texture problem is happening with standard custom Q3 maps, such as the famous Short Circuit, see here (probably the worst case).

    These are some examples, I have other custom maps which are failing too but I assume it should be the same root cause.

    Edit: just realised that screenshotjpeg command works *facepalm*, well I hope photos do the same work :P

    [ Edited by Cool_amigaN 06.08.2022 - 15:35 ]
    Amiga gaming Tribute: Watch, rate, comment :)
  • »06.08.22 - 12:15
    Profile Visit Website