lwjgl

opengl window freezing during move/resize

自作多情 提交于 2019-12-23 12:37:27
问题 I'm developing a game using LWJGL. While moving the window, (plan to add resize code in the future), the rendering loop freezes. I would like it to continue running in some fashion while moving. LWJGL does not include glutMainLoop. The Display belongs to OpenGL, not Java. Relevant code: regular = new DisplayMode(800,600); GL11.glClearColor(0.47f,0.55f,1.0f, 0.0f); GL11.glClearDepth(1.0f); try { Display.setDisplayMode(regular); Display.setTitle("Game Name"); Display.setIcon(loadIcon("resources

Maven assembly plugin redownloading dependencies in jenkins

☆樱花仙子☆ 提交于 2019-12-23 12:17:48
问题 For some reason, maven seems to be attempting to download my project's dependencies every time I try to build it with Jenkins. There are a few problems. The first one is it shouldn't be doing this at all, and the other problem is it's not even trying to download them from the correct repo, which means it has to wait for every one of them to time out. I can run mvn clean package myself and it builds it in ~4 seconds because all of the dependencies are in my local .m2 repo. Jenkins is installed

Transformations from pixels to NDC

久未见 提交于 2019-12-23 05:29:32
问题 Let's say that my screen is (800 * 600) and i have a Quad (2D) drawn with the following vertices positions using Triangle_Strip (in NDC) : float[] vertices = {-0.2f,0.2f,-0.2f,-0.2f,0.2f,0.2f,0.2f,-0.2f}; And I set up my Transformation Matrix in this way : Vector2f position = new Vector2f(0,0); Vector2f size = new Vector2f(1.0f,1.0f); Matrix4f tranMatrix = new Matrix4f(); tranMatrix.setIdentity(); Matrix4f.translate(position, tranMatrix, tranMatrix); Matrix4f.scale(new Vector3f(size.x, size.y

OpenGL GLSL 3.30 in Ubuntu 14.10 mesa 10.1.3

◇◆丶佛笑我妖孽 提交于 2019-12-23 01:53:57
问题 when I try to compile a glsl shader with OpenGL in Ubuntu I get the following error: - 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES But when I do a "glxinfo | grep OpenGL" it says: OpenGL vendor string: X.Org OpenGL renderer string: Gallium 0.4 on AMD JUNIPER OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.3 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core

java and libGDX / LWJGL game fullscreen wrong size for multiple monitors on Ubuntu

十年热恋 提交于 2019-12-22 01:12:34
问题 I'm working on a libGDX (library on top of LWJGL) game project, and use the Intellij IDEA IDE from several different workstations: Windows 7 x64 laptop with two displays (1920x1080 and 1600x1200), nVidia GT540M. Ubuntu 12.04 LTS on a laptop with a single display (1366x768), Intel integrated graphics. Ubuntu 12.04 LTS on a desktop with two displays (1920x1080 and 1280x1024), nVidia GTS 450. I'm using the OpenJDK for Java 6 on the Ubuntu boxes, and Sun/Oracle Java 6 on the Windows box (I heard

More Efficient Way of making multiple objects

夙愿已清 提交于 2019-12-21 23:24:41
问题 I am trying to make a memory game with Java. The game is basically going to be some squares in a grid that is 4x4 at the moment just for testing purposes. I have created my Square class, and programmed what i want them to do in that class, and then created a square object in another Class that handles the "Normal Mode" of the game. Now since i have a 4x4 grid of squares I need to make 16 different Squares (Or at least that's what i'm thinking at the moment). I also need to draw the Squares in

Java / OpenGL: Getting the image of a Canvas as a BufferedImage

无人久伴 提交于 2019-12-21 05:28:34
问题 I've got some code that initializes OpenGL to render to a java.awt.Canvas. The problem is, I can't figure out how I can get the buffer of the canvas and turn it into a BufferedImage. I've tried overriding getGraphics(), cloning the Raster, and replacing the CanvasPeer with a custom one. I'm guessing OpenGL doesn't use java graphics in any way then, so how can I get OpenGL's buffer and convert it into a BufferedImage? I am using LWJGL's code for setting parent: Display.setParent(display_parent

How do I draw a mirror mirroring something in OpenGL?

寵の児 提交于 2019-12-21 05:24:13
问题 From my understanding is that to mirror in OpenGL, you basically draw the scene, then you flip everything over and draw it again, except only make it visible through the mirror, thus creating a perfectly flipped image in the mirror. But the problem I see, is that when doing this, the only mirrors that can see other mirrors are ones rendered after the previous mirrors. So if I render mirror 1 then mirror 2, mirror 1 can't see mirror 2, but mirror 2 can see mirror 1. How do I effectively mirror

LWJGL 3.2.0+ fonts

前提是你 提交于 2019-12-21 02:42:18
问题 I've been working with lwjgl for some time, and recently I've decided to switch from fixed function pipeline to shaders. So, the first thing when I'm starting my program, I set the ContextAttrib(3, 2) so I will be using GL 3.2+. The problem is that when I switch on higher version of GL a lot of functions become unsupported. Before switching to higher GL, I've used Slick's font (TrueTypeFont) to render the text I needed, but now the drawString method of TrueTypeFont has an unsupported function

Slick2D vs Straight LWJGL

拥有回忆 提交于 2019-12-20 16:18:34
问题 I've been delving into game programming with Slick2D, and I've began to wonder if in the long run, knowing LWJGL would be more helpful. On one hand, Slick2D is fast and simple, but it seems LWJGL is more adaptable in the sense that it has both 2D and 3D capabilities. For someone who is intermediate in java, and wants to make games, would it be worth the additional effort to learn LWJGL right off the bat? 回答1: I don't think the two are really related. I mean, I know Slick is built on top of