mupen64plus / mupen64plus-video-rice

Video plugin for the Mupen64Plus v2.0 project, using OpenGL. This plugin is based on the RiceVideoLinux plugin from earlier versions of Mupen64Plus.
31 stars 40 forks source link

Remove deprecated conditions and a unused variable #5

Closed Narann closed 10 years ago

Narann commented 10 years ago

As GL_MIRRORED_REPEAT is part of OpenGL 1.4 and GL_CLAMP_TO_EDGE is part of OpenGL 1.2 and we plan to make Rice only support OpenGL 2, all this checks are useless.

Same for variable m_bSupportClampToEdge which is not used at all anywhere in the code.

Narann commented 10 years ago

Sorry, I wanted to create a new pull request for "remove OGLCombinerTNT2" but github put everything in the same PR. I will comment it here:

remove OGLCombinerTNT2: Remove any reference to OGLCombinerTNT2. The only trouble I see is about the src/Config.h and cpp: I've removed the OGL_TNT2_DEVICE option so this create an offset: So NVIDIA_OGL is now 6 (was 7 before) and OGL_FRAGMENT_PROGRAM is now 7 (was 8 before). The option now look like:

# OpenGL level to support (0=auto, 1=OGL_1.1, 2=OGL_1.2, 3=OGL_1.3, 4=OGL_1.4, 5=OGL_1.4_V2, 6=NVIDIA_OGL, 7=OGL_FRAGMENT_PROGRAM)
OpenGLRenderSetting = 0

It's hard to keep legacy stuff when you want to remove old things and update everything. Can I suggest to freeze the Rice and have a Rice2 that will break old parameters? I don't know who still use OpenGL 1.x and that would like to keep this options but I advise to remove anything legacy related and push Rice to OpenGL 2.

Any feedback appreciate.

richard42 commented 10 years ago

Dorian, many of the plugin config sections contain a Version number. I'm not sure if the Rice config section has one, but if not it would be easy to add. I suggest doing all of the config changes at once, and add some code to handle the change. At plugin startup time, if the config section is using the old version number, fix up all of the changed parameters and save it with the new version number.

Narann commented 10 years ago

Hi Richard (sorry for delay, Internet troubles),

I just checked and there doesn't seems to be any configuration versionning stuff in Rice. So what am I supposed to do? :(

EDIT: I'm looking in the audio-sdl code which seems to do what you are talking about.

Narann commented 10 years ago

Hi Richard, I've put versionning to Rice config + a little update stack (that will be used when I will maybe remove other combiners). I've tested different situations and everything work as expected. I thinks the code is simple enought but don't hesitate to review directly the code on github if it's not clear.

Narann commented 10 years ago

Thanks!