Thank you Jukka.

I have understood what was the problem...

On Safari, anisotropy must be enabled via: 
WEBKIT_EXT_texture_filter_anisotropic (instead of 
EXT_texture_filter_anisotropic)

HTH,
Ariel

On Tuesday, September 29, 2015 at 11:45:14 PM UTC+3, jj wrote:
>
> I tried building your test case on my system with
>
> em++ aniso.cpp -o aniso.html (put it online at 
> https://dl.dropboxusercontent.com/u/40949268/emcc/aniso/aniso.html ). 
> Running that, I get the output 
>
> anisotropy enabled: 1
> max anisotropy: 16.000000
>
> so the sample does seem to work as expected. I used current Emscripten 
> incoming branch (1.34.11) to do the build.
>
> 1) Does that built page work for you?
> 2) If not, what does http://renderingpipeline.com/webgl-extension-viewer/ 
> give you?
>
>
> 2015-09-29 23:21 GMT+03:00 chronotext <[email protected] <javascript:>>:
>
>> Here we go: https://gist.github.com/arielm/324e10425a71349ff4c0
>>
>> On Tuesday, September 29, 2015 at 7:38:58 PM UTC+3, jj wrote:
>>>
>>> Can you write up a small test case that shows the problem? First hunch 
>>> is that something goes wrong when enabling the extension.
>>>
>>> 2015-09-29 13:33 GMT+03:00 chronotext <[email protected]>:
>>>
>>>> Addendum...
>>>>
>>>> The error produced in the web-console in 3) is:
>>>> *WebGL: INVALID_ENUM: texParameter: invalid parameter, 
>>>> EXT_texture_filter_anisotropic not enabled*
>>>>
>>>>
>>>> On Tuesday, September 29, 2015 at 1:27:05 PM UTC+3, chronotext wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I've been working with Emscripten and WebGL for a while. So far, 
>>>>> everything seems to work as intended, except anisotropic filtering.
>>>>>
>>>>>
>>>>> 1) Enabling anisotropic filtering.
>>>>>
>>>>> The following returns 0 instead of 1:
>>>>> emscripten_webgl_enable_extension(emscripten_webgl_get_current_context(), 
>>>>> "EXT_texture_filter_anisotropic")
>>>>>
>>>>>
>>>>> 2) Querying maximum anisotropy.
>>>>>
>>>>> The following returns 0 (instead of e.g. 4), and produces an error in 
>>>>> the web-console (*WebGL: INVALID_ENUM: getParameter: invalid 
>>>>> parameter name, EXT_texture_filter_anisotropic not enabled*):
>>>>> GLfloat maxAnisotropy;
>>>>> glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropy);
>>>>>
>>>>>
>>>>> 3) Applying anisotropic filtering:
>>>>>
>>>>> The following is not working, and  produces an error in the 
>>>>> web-console ():
>>>>> glBindTexture(GL_TEXTURE_2D, ...);
>>>>> glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 
>>>>> maxAnisotropy);
>>>>>
>>>>>
>>>>> These 3 problems do not make sense, because I can see anisotropic 
>>>>> filtering in action when running this pure JS sample 
>>>>> <http://blog.tojicode.com/2012/03/anisotropic-filtering-in-webgl.html>
>>>>> .
>>>>> FWIW, I'm testing with Safari 8.0.5 on OSX 10.10.3.
>>>>>
>>>>> I wonder if anyone was luckier than me on this topic?
>>>>>
>>>>> Thanks!
>>>>> Ariel | chronotext-cross <https://github.com/arielm/chronotext-cross>
>>>>>
>>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to