jogl

Java OpenGL saving depth buffer

浪子不回头ぞ 提交于 2019-12-13 06:47:01
问题 I'm not entirely sure if I can do what I want here, but I have a bunch of objects being rendered in OpenGL (using JOGL). For one group of objects, I want to ensure that certain objects in that group are rendered in front of other objects in that group. I've tried clearing the depth buffer bit and rendering the "front" objects last, and that works, except it messes up other depth buffering on screen. What it comes down to is I have a list of objects being rendered and I want to ensure that

JOGL mipmaps and texture shimmering

非 Y 不嫁゛ 提交于 2019-12-13 05:42:28
问题 I've a wall and a brick texture in my OpenGL 2 scene that keeps shimmering and flashing no matter what I set. When I'm zoomed in close (and can see clearly the texture), then the flashing and shimmering stops. But when I'm zoomed out and moving around the scene, the flashing and shimmering is very pronounced. This is the texture code for the brick wall: brickwall.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT); brickwall.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);

glDrawArrays with buffer not working in JOGL

十年热恋 提交于 2019-12-13 03:34:27
问题 I was wondering whether someone can help me find out why my JOGL code does not show a triangle. There are no exceptions for some reason. Am I missing something? IntBuffer vacantNameBuffer = IntBuffer.allocate(3); gl.glGenBuffers(1, vacantNameBuffer); int vertexBufferName = vacantNameBuffer.get(); float[] triangleArray = { -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f }; FloatBuffer triangleVertexBuffer = FloatBuffer.wrap(triangleArray); gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,

JOGL libraries can't load libraries but they're in the referenced libraries folder

浪子不回头ぞ 提交于 2019-12-12 16:02:24
问题 So I'm trying to learn JOGL in eclipse however every time I run my code I get errors indicated they can't find the referenced libraries, however I know they are referenced because eclipse has them listed in the generated folder "Referenced Libraries" and they are intel and my machine is intel. The code generates no error tags but sends out system errors when I try to run it. I get the following errors Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\Cody

Security Exception: Attempted to to open a sandboxed jar as a Trusted-Library

青春壹個敷衍的年華 提交于 2019-12-12 15:07:18
问题 I'm trying to run an applet via a webpage but doing so gives me the error: java.lang.reflect.InvocationTargeException at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(DeployAWTUtil.java:116) at sun.plugin2.applet.Plugin2Manager.runOnEDT(Plugin2Manager.java:3520) at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3051) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1497) at java.lang.Thread.run(Thread.java:662) Caused by:java.lang

JOGL white texture?

◇◆丶佛笑我妖孽 提交于 2019-12-12 12:19:48
问题 I am trying to load earth.png and place it over a triangle. The image is 256x256. I have followed an online tutorial and played around with this for hours, but the triangle still remains white. Can any one point me in the right direction. import java.awt.Frame; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.IOException; import java.io.InputStream; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; import com.jogamp.opengl.util.texture

What are some faster alternatives to Java2d?

六眼飞鱼酱① 提交于 2019-12-12 07:41:46
问题 I'm looking to do some physics simulations and I need fast rendering in Java. I've run into performance issues with Java2d in the past, so what are the fast alternatives? Is JOGL significantly faster than Java2d? 回答1: My experience with Java2D is that it can be very fast, if you follow the rules. I had an application that went from 90% CPU to less than 5% CPU just by changing a few simple things. Using large transparent PNG's is a no no, for example. A very good resource is the Java-Gaming

Automated testing for OpenGL application

我与影子孤独终老i 提交于 2019-12-12 07:28:57
问题 I have a Java Application that uses JOGL to provide a large part of the GUI. Is there any tool which you know of, or have used which can automate the testing of OpenGL applications (or more specificly those using JOGL) Just to update: The tool can run on either linux or windows. 回答1: I have written unit-tests for C++ (Qt on Linux) & OpenGL before. I don't know any reason it shouldn't work for Java too. The things which worked for me are: Abstract your OpenGL context provider so the rest of

Swing - Drop down Panel

≯℡__Kan透↙ 提交于 2019-12-12 06:37:27
问题 I am working on Java Swing, making an UI. I have a Panel (Panel 1) with information, and I want to create a dropdown menu, but not like de comboBox. Is hard to explain. I see the panel, and in the bottom, I have a button. When I press this button, I want to make appear another panel (transparent) on Panel 1. I dont know how can I do that.I wait for yoir help, if I have explained it well. I dont want the typical dropdown list, is like a dropdown panel. EDIT: for example, in the main page of

JOGL Texture disappears on mac osx

浪尽此生 提交于 2019-12-12 05:48:16
问题 I have done some research and cant find anyone that have the same experience of this problem. I would appreciate if someone just can confirm that they can draw textures with eclipse and jogl running a macbook pro with JRE1.8. Or does someone else experience same problems? Texture disappears on osx - GL_TEXTURE_2D JOGL Eclipse java 回答1: jmaasing (a JogAmp user) uses Oracle Java 1.8 with JOGL 2.2.4 daily on a Mac Book Pro, he ran my first person shooter at least once and he didn't reproduce