mupen64plus / mupen64plus-video-glide64mk2

Video plugin for Mupen64Plus 2.0 based on 10th anniversary release code from gonetz
28 stars 37 forks source link

adreno (TM) 3xx #23

Closed krnlyng closed 9 years ago

krnlyng commented 9 years ago

enable code from mupen64plus-ae for determining a suitable glPolygonOffset for Adreno (TM) 3xx hardware

littleguy77 commented 9 years ago

I would prefer this be implemented as a configurable option. The various mobile hardware implementations require different values. I'd prefer to delegate the responsibility of choosing non-default values to the front-end. Otherwise we'd be monkeying around in this code any time someone wanted to cover new hardware.

I'll submit a pull request for configurable polygon offset for glidemk2 and rice when I'm back from vacation (sometime next week).

krnlyng commented 9 years ago

i agree, a configurable option would probably be better, looking forward to your pr, closing this

littleguy77 commented 9 years ago

Just an update - I haven't forgotten about this. I just wanted to bring some of the Android edition's source into alignment with upstream before tackling this. Hopefully this week.

littleguy77 commented 9 years ago

@richard42 I'm working on pull requests to mupen64plus/video-glike64mk2 and mupen64plus/video-rice, to add the following three config parameters. This will permit front-ends to workaround certain mobile hardware quirks:

    ConfigSetDefaultInt(..., "ForcePolygonOffset", 0, "If true, use polygon offset values specified below");
    ConfigSetDefaultFloat(..., "PolygonOffsetFactor", 0, "Specifies a scale factor that is used to create a variable depth offset for each polygon");
    ConfigSetDefaultFloat(..., "PolygonOffsetUnits", 0, "Is multiplied by an implementation-specific value to create a constant depth offset");

Question: Should I place these in the Video-General section of the config file, or should I make separate config options for each video plugin? I was leaning toward the latter because the default implementation (when ForcePolygonOffset == 0) is a bit different between the plugins. Also, not all video plugins should be compelled to implement this option.

Maybe I just answered my own question :P

richard42 commented 9 years ago

I would recommend adding these new parameters separately for each specific video plugin.