[vlc-devel] [PATCH] opengl: enables shaders for macos opengl.

Sebastien Zwickert dilaroga at gmail.com
Thu Sep 15 00:07:55 CEST 2011


On Sep 14, 2011, at 9:15 PM, Laurent Aimar wrote:
>> #elif defined(MACOS_OPENGL)
>> -#   if defined(WORDS_BIGENDIAN)
>> -    vgl->fmt.i_chroma = VLC_CODEC_YUYV;
>> -#   else
>> -    vgl->fmt.i_chroma = VLC_CODEC_UYVY;
>> -#   endif
>> -    vgl->tex_target   = GL_TEXTURE_RECTANGLE_EXT;
>> -    vgl->tex_format   = GL_YCBCR_422_APPLE;
>> +    vgl->fmt.i_chroma = VLC_CODEC_RGB32;
>> +    vgl->tex_target   = GL_TEXTURE_2D;
>> +    vgl->tex_format   = GL_BGRA;
>>     vgl->tex_internal = GL_RGBA;
>> -    vgl->tex_type     = GL_UNSIGNED_SHORT_8_8_APPLE;
>> +    vgl->tex_type     = GL_UNSIGNED_INT_8_8_8_8_REV;
>> #else
> 
> It's incomplete: you need to define the RGB masks as done for the non
> MACOS_OPENGL case. You can probably share part of the initialization
> code (vgl->fmt.i_chroma, vgl->tex_target, vgl->tex_internal, masks at
> least). Also if you haven't done so yet, could you test the RGB mode by
> disabling the shader code?

Finally, I removed this specific macosx part because when i disabled  the shader code there was a color issue like a marked hue of blue.
This change didn't introduce no noticeable changes about performances when shaders are enabled.
Disabling the shader increases considerably the amount of CPU usage.

Best regards,

Sebastien.

--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-opengl-enables-shaders-for-macos-opengl-an-cleans-so.patch
Type: application/octet-stream
Size: 9309 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110915/7a2701df/attachment.obj>


More information about the vlc-devel mailing list