jogl

What controls which interface GLAutoDrawable.getGL() returns?

只愿长相守 提交于 2019-12-12 04:37:24
问题 In trying to work through tutorials on JOGL, I run into trouble when entering this part of the code: @Override public void display(GLAutoDrawable glad) { GL gl = glad.getGL(); gl.glClear(GL.GL_COLOR_BUFFER_BIT); gl.glBegin(GL.GL_TRIANGLES); This doesn't compile because glBegin is not a method in GL even though the online tutorials use it that way. By digging around in the JOGL javadoc I found that I could get the tutorial to work by doing this: GL2 gl = (GL2) glad.getGL(); Then all the

Java OpenGL screen sized texture mapped quad

╄→гoц情女王★ 提交于 2019-12-12 04:32:14
问题 I have a Java OpenGL (JOGL) app, and I'm trying to create a texture mapped quad that covers the entire screen. In draw some pixels to a buffer and then I want to read those pixels into a texture and redraw them on screen (with a fragment shader applied). My code for mapping the texture to the viewport is: gl.glMatrixMode(GL.GL_PROJECTION); gl.glPushMatrix(); gl.glLoadIdentity(); gl.glOrtho( 0, width, height, 0, -1, 1 ); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glPushMatrix(); gl.glLoadIdentity();

How to pick objects using jogl?

瘦欲@ 提交于 2019-12-12 02:01:30
问题 I met some problems about jogl picking. I need to pick each single point and process it, but I always get 0 hit (nothing is picked). Can anyone help me with this? the display function can correctly get the 2x2 window around the cursor. public void display(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); switch(cmd){ case UPDATE: gl.glPushMatrix(); gl.glMultMatrixf(rot_matrix, 0); buildPoints(gl); buildAxes(gl); gl.glPopMatrix(); break; case SELECT: int buffsize = 512; double x =

2D graph animation on WorldWindJava canvas?

与世无争的帅哥 提交于 2019-12-11 23:40:59
问题 Perhaps there are some of you using NASA's worldwind in WWJ form. I just started and set up everything in NetBeans, so that the latest WWJ runs there with jogl and co. I tested it with basic demo code. My aim is to display a graph on the WWJ canvas, that will be updated regularly and will be animated in this way. It will be a 2D graph of a dataset, that will be computed in the background and the WWJ programm has to read and display it. Do you have some tips and EASY examples/tutorials for how

I installed JOGL but why wont Eclipse recognize my hello world program?

一笑奈何 提交于 2019-12-11 23:07:08
问题 i installed Jogl and included it in the build path of eclipse but it is under referenced libraries. Here is the program. public class exceptionhandler { // open HelloWorld public static void main(String[] args) { // open main try { // open try System.loadLibrary("jogl"); System.out.println("Hello World! (The native libraries are installed.)"); } // close try catch (Exception e) // all try's need a catch { } // even if the catch does nothing } // close main } // close HelloWorld I did not

JOGL Jar runs fine on my development machine, but slowly on others? Even if they have better hardware

久未见 提交于 2019-12-11 19:30:09
问题 I am currently messing around with JOGL and JBullet with some success. I'd like to share what I've created with my friends. I created a jar file and a .bat to open it with the argument -Dsun.java2d.noddraw=true. The jar runs perfectly on my machine. It opens and runs on my friends system and my laptop, but at an extremely low frame rate. What is the cause of this and how can I fix it? Also for some reason it loads the wrong textures for some objects, again only when ran on another system.

Jogl: How to make a transparent background on com.jogamp.opengl.swt.GLCanvas?

℡╲_俬逩灬. 提交于 2019-12-11 16:51:56
问题 I searched & read multiple forums about openGL transparency and I found this piece of code gl.glEnable(GL2.GL_BLEND); gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA); gl.glEnable(GL2.GL_ALPHA_TEST); gl.glAlphaFunc(GL2.GL_GREATER, 0.1f); gl.glClearColor(0, 0, 0, 0); Some people wrote this code inside the init method and got result. I really don't know anymore about Blending, but I added this code and nothing happened! Is there any mistake or misunderstanding here!? How can I do

JOGL does not work after reinstalling ubuntu

让人想犯罪 __ 提交于 2019-12-11 16:44:35
问题 i had a fully work project in ubuntu 9 with eclipse. Now i have installed Ubuntu 10.10, get the backup back, downloaded Eclipse and try to run the project. The project folder was not changed at all! But now it does not work: Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path If i go to "project properties > java build path > libraries" gluegen-rt.jar and jogl.jar are present and i have no compilation error (" import javax.media.opengl

Resources: Parallelism in Java for OpenGL realtime applications

天涯浪子 提交于 2019-12-11 09:27:39
问题 I recently went to a lecture on the benefits of Parallelism in regards to tapping the power of multicore processors more efficiently for real time 3d graphics applications. This discussion was about C++ and TBB (Threading Building Blocks) (Intel). I have found out about Fork/Join in Java 7 but I would like to learn more about running realtime 3d graphics through OpenGL / JOGL. I have heard that OpenGL/JOGL must exist in one thread. I do not know if this is true. If you have experience with

Camera rotation

こ雲淡風輕ζ 提交于 2019-12-11 08:52:13
问题 As with my previous question i managed to create little solar system in opengl and jogl :) Now i want to rotate the camera to show it from different angles. I managed to rotate the cubes, but their plane of movement remains unchanged. GL3 gl = drawable.getGL().getGL3(); gl.glClear(GL3.GL_COLOR_BUFFER_BIT | GL3.GL_DEPTH_BUFFER_BIT); //Model View Matrix //Mat4 mv = new Mat4(); Mat4 mv = MatrixMath.lookAt(this.eyeX,this.eyeY,this.eyeZ,this.at,this.up); mv = mv.mul(MatrixMath.rotationZ(satellite)