>
> Which leads to the question; Does there, in JavaFX exist something
> comparable to setting the texture-sampler to NEAREST
>
> instead of LINEAR sampling?
>

There is no API to set the texture filter. If you would like to contribute
and add it, I can help. It needs to be compatible with both Direct3D and
OpenGL (not sure how the work on Metal is going), so this can be a
challenge.

For the D3D side, see this issue in JBS [1]. The relevant code is at [2]. I
didn't look at the OpenGL side.

- Nir

[1] https://bugs.openjdk.org/browse/JDK-8092272
[2]
https://github.com/openjdk/jfx/blob/0d9dcf38275528e1b621d71631aac5bdb9452110/modules/javafx.graphics/src/main/native-prism-d3d/D3DContext.cc#L621

On Mon, Jun 19, 2023 at 10:15 PM Matija Brown <matija.br...@outlook.de>
wrote:

> On my never ending journey of building a Minecraft-clone in every
> graphics-framework available,
>
> I have come across JavaFX for the next attempt.
>
>
>
>
>
> However a minor inconvenience has crossed my path in the process:
>
>
>
> Using the (very well developed!) 2D-Graphics displaying pixel-art style
> images is no trouble whatsoever.
>
> Simply rendering it to a canvas and disabling smoothing does the job just
> fine. Unfortunately, I have been
>
> unable to figure out how to achieve a similar thing using the 3D-Graphics
> engine and the PhongMaterial that comes with it.
>
>
>
> Which leads to the question; Does there, in JavaFX exist something
> comparable to setting the texture-sampler to NEAREST
>
> instead of LINEAR sampling?
>
> Unfortunately the latest information I could find online was from about
> 2013 and much has (probably)
>
> changed since then. Thus the question is being posed once again.
>
>
>
>
>
> I whish to excuse myself for probably repeating a fairly common question,
>
>
>
> Kind regards,
> Matija Brown.
>

Reply via email to