<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p class="MsoNormal">Which leads to the question; Does there, in JavaFX exist something comparable to setting the texture-sampler to NEAREST<u></u><u></u></p><p class="MsoNormal">instead of LINEAR sampling?</p></blockquote><div><br></div><div>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.</div><div><br></div><div>For the D3D side, see this issue in JBS [1]. The relevant code is at [2]. I didn't look at the OpenGL side.</div><div><br></div><div>- Nir</div><div><br></div><div>[1] <a href="https://bugs.openjdk.org/browse/JDK-8092272">https://bugs.openjdk.org/browse/JDK-8092272</a> </div><div>[2] <a href="https://github.com/openjdk/jfx/blob/0d9dcf38275528e1b621d71631aac5bdb9452110/modules/javafx.graphics/src/main/native-prism-d3d/D3DContext.cc#L621">https://github.com/openjdk/jfx/blob/0d9dcf38275528e1b621d71631aac5bdb9452110/modules/javafx.graphics/src/main/native-prism-d3d/D3DContext.cc#L621</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 19, 2023 at 10:15 PM Matija Brown <<a href="mailto:Matija.Brown@outlook.de">Matija.Brown@outlook.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg2671553640550051459">
<div lang="en-DE" style="overflow-wrap: break-word;">
<div class="m_2671553640550051459WordSection1">
<p class="MsoNormal">On my never ending journey of building a Minecraft-clone in every graphics-framework available,</p>
<p class="MsoNormal">I have come across JavaFX for the next attempt.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">However a minor inconvenience has crossed my path in the process:</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Using the (very well developed!) 2D-Graphics displaying pixel-art style images is no trouble whatsoever.</p>
<p class="MsoNormal">Simply rendering it to a canvas and disabling smoothing does the job just fine. Unfortunately, I have been<u></u><u></u></p>
<p class="MsoNormal">unable to figure out how to achieve a similar thing using the 3D-Graphics engine and the PhongMaterial that comes with it.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Which leads to the question; Does there, in JavaFX exist something comparable to setting the texture-sampler to NEAREST<u></u><u></u></p>
<p class="MsoNormal">instead of LINEAR sampling?<u></u><u></u></p>
<p class="MsoNormal">Unfortunately the latest information I could find online was from about 2013 and much has (probably)<u></u><u></u></p>
<p class="MsoNormal">changed since then. Thus the question is being posed once again.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I whish to excuse myself for probably repeating a fairly common question,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Kind regards,<br>
Matija Brown.<u></u><u></u></p>
</div>
</div>
</div></blockquote></div>