Giter Site home page Giter Site logo

pixel art mode about virtualc64web HOT 9 CLOSED

vc64web avatar vc64web commented on May 26, 2024
pixel art mode

from virtualc64web.

Comments (9)

mithrendal avatar mithrendal commented on May 26, 2024

found this article https://stackoverflow.com/questions/54393847/how-to-stretch-a-webgl-canvas-without-blurring-the-style-image-rendering-does

seems like safari does support image-rendering attribute only at 2d canvas but not yet at webgl canvas ...

that would explain why it works on snapshot canvas which are 2d canvas ...🤔

from virtualc64web.

mithrendal avatar mithrendal commented on May 26, 2024

grafik

the proof ... safari with 2d software renderer ... look at the last line of log output😄

firefox can use the attribute also on a webgl canvas ☕️👍🏽

Should we automatically when pixelart=on force the safari to use software renderer instead webgl? Or should we make a new setting for choosing the type of renderer?

In SAE are the following settings
grafik

from virtualc64web.

mithrendal avatar mithrendal commented on May 26, 2024

they already filed a bug report to the safari developer in january 2019 here https://bugs.webkit.org/show_bug.cgi?id=193895

with the runnable testcase http://jsfiddle.net/greggman/mn9ebgkL/

showing the safari result:
grafik

and the firefox result:
grafik

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on May 26, 2024

Interesting to see that Safari has so many bugs compared to the other browsers.

I just tried VC64web in Firefox. Toggling between crisp and blurred pixels works perfectly. Very well done!

from virtualc64web.

mithrendal avatar mithrendal commented on May 26, 2024

I just tried VC64web in Firefox.

What about chrome? Is it better than safari?

I read google fixed it there ... but after they made their own fork of WebKit.

from virtualc64web.

dirkwhoffmann avatar dirkwhoffmann commented on May 26, 2024

Works perfectly in both Firefox and Chrome. Overall, Chrome seems to be the superior browser, but for some reason, I always use Safari. But I don't know why 🤔.

from virtualc64web.

mithrendal avatar mithrendal commented on May 26, 2024

I just tried to change the renderer on the fly with a setting ... not SDL which is fine with that but the browsers canvas API does not allow this. You have to stick to the context "webgl" or "2d" which you initially created all successive calls will be denied by a
/* this is javascript*/
canvas.getContext("2d") ---> NULL

according to the spec:

Every canvas has what is called a primary context. This is the first context that is invoked on a canvas.

surely they have had their reasons for it 🙄

since emscripten SDL2 relies on javascript, now when I change on the fly it crashes with SDL2.ctx is NULL

soooo mean !!!😥

from virtualc64web.

mithrendal avatar mithrendal commented on May 26, 2024

What about the setting "use accelerated WebGL" with default = true
and the comment that this setting will becomes active on restart ?
(x) use accelerated WebGL (reload necessary)

from virtualc64web.

mithrendal avatar mithrendal commented on May 26, 2024

grafik

pushed to gh-pages

from virtualc64web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.