简体   繁体   English

如何使用LWJGL在屏幕上绘制BufferedImage?

[英]How can I draw a BufferedImage onto the screen using LWJGL?

I want to know how to draw textures with BufferedImages in LWJGL Java. 我想知道如何在LWJGL Java中使用BufferedImages绘制纹理。 Does anyone know how to do this or is it impossible? 有谁知道该怎么做还是不可能?

To draw an image onto the screen, you first need to get the Graphics object , of the Container or Component you're painting it onto. 要将图像绘制到屏幕上,首先需要获取要在其上绘制容器或组件的Graphics对象 Then using that Graphics Object, call the drawImage() method, and supply the relevant details. 然后使用该Graphics Object,调用drawImage()方法,并提供相关的详细信息。 This will output the image into the container, in the position that you decide. 这会将图像输出到您确定的位置的容器中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM