You can subscribe to this list here.
1999 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2000 |
Jan
(39) |
Feb
(22) |
Mar
(41) |
Apr
(44) |
May
(47) |
Jun
(25) |
Jul
(28) |
Aug
(39) |
Sep
(35) |
Oct
(31) |
Nov
(31) |
Dec
(3) |
2001 |
Jan
(18) |
Feb
(43) |
Mar
(47) |
Apr
(38) |
May
(9) |
Jun
(20) |
Jul
(8) |
Aug
(11) |
Sep
(15) |
Oct
(43) |
Nov
(27) |
Dec
(73) |
2002 |
Jan
(42) |
Feb
(47) |
Mar
(49) |
Apr
(58) |
May
(12) |
Jun
(68) |
Jul
(42) |
Aug
(9) |
Sep
(19) |
Oct
(36) |
Nov
(28) |
Dec
(12) |
2003 |
Jan
(13) |
Feb
(24) |
Mar
(40) |
Apr
(52) |
May
(39) |
Jun
(46) |
Jul
(17) |
Aug
(5) |
Sep
(4) |
Oct
(9) |
Nov
(13) |
Dec
(12) |
2004 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(6) |
Nov
(6) |
Dec
(3) |
2005 |
Jan
|
Feb
|
Mar
(8) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(2) |
Aug
(5) |
Sep
(4) |
Oct
(3) |
Nov
(3) |
Dec
(1) |
2006 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
(5) |
Sep
(8) |
Oct
(9) |
Nov
(8) |
Dec
(5) |
2007 |
Jan
(3) |
Feb
(11) |
Mar
(5) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(5) |
2008 |
Jan
(7) |
Feb
(8) |
Mar
(30) |
Apr
(17) |
May
(20) |
Jun
(8) |
Jul
(19) |
Aug
(10) |
Sep
(7) |
Oct
(2) |
Nov
(1) |
Dec
|
2009 |
Jan
(13) |
Feb
(7) |
Mar
(13) |
Apr
(27) |
May
(95) |
Jun
(77) |
Jul
(43) |
Aug
(25) |
Sep
(24) |
Oct
(32) |
Nov
(6) |
Dec
(6) |
2010 |
Jan
|
Feb
(2) |
Mar
(30) |
Apr
(58) |
May
(60) |
Jun
(72) |
Jul
(32) |
Aug
(45) |
Sep
(19) |
Oct
(4) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Alex A. <Az...@ne...> - 2002-06-14 09:15:24
|
Hi, I'm in need to retrieve the int value for a GL String constant when parsing quake3 shaders from a file. Example: blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA I prepared a method like: int getIntForConstant("GL_SRC_ALPHA") But is there a way to get around this without having to prepare a lookup table (Hashtable or similar), maybe a static method in GLContext ? Java QuakeIIIArena is on the way... -=[AziD]=- |
From: Dragana P. <zm...@an...> - 2002-06-14 08:04:06
|
Hi, I have a subclass of GLAnimCanvas that prepare DisplayList. Polygons in = my display list have different textures. Also I have a subclass of = Applet that create, start, stop and destroy previously described canvas. = And it works fine. The goal I want to achieve is to change textures on the fly ... First I = tried this with glDeleteTextures, and glDeleteList (note: I used the = same "pointer" that I used in glGenTextures and glGenLists ) , but JVM = throws exception: " An unexpected exception has been detected in native code outside the = VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at = PC=3D0x69514194 Function name=3DglDeleteTextures Library=3DC:\WINNT\System32\OPENGL32.DLL Current Java thread: at gl4java.GLFuncJauJNI.glDeleteTextures(Native Method)=20 ....." I solved this problem by destroying and creating GLContext each time I = want to change texture, but I am not satisfied with this solution.=20 My question is how to use glDeleteTextures and glDeleteLists and when is = the right time and place to call these methods. I understand that = problem is in native code, but how to avoid this.=20 I am using JDK 1.3, JRE1.3 and JVM 1.3.1-b24 mixed mode. Thanks in advance, Dragana |
From: <Px...@ao...> - 2002-06-13 14:49:33
|
More info: When it came time to graph I tried to render my graph to GLOffScreenDrawable and then do glReadPixels it produced the same problem---a pixel array of 0's (from when it was initialized). I've even put some 1's in the initial pixel array to see if anything would change but the 1's stay ones--glReadPixels isn't doing anything. Then I tried TGATextureGrabber to save it as a .tga, but it was still an all black (all 0's) picture. THEN, I went to the demo's for GLOffScreenDrawable and grabbed the classes gearsOffScreen2Tga.java and gearRenderer and tried to execute the main in gearsOffScreen2Tga and got a big exception. Here are the first few and last lines of it... An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D2150D6 Function=JNU_GetEnv+0xC Library=c:\j2sdk1.4.0_01\jre\bin\java.dll Current Java thread: at sun.awt.font.NativeFontWrapper.registerFonts(Native Method) - locked <06BABD58> (a java.lang.Class) at sun.java2d.SunGraphicsEnvironment.addPathFonts(SunGraphicsEnvironment.java:709) at sun.java2d.SunGraphicsEnvironment.registerFonts(SunGraphicsEnvironment.java:560) at sun.java2d.SunGraphicsEnvironment.access$000(SunGraphicsEnvironment.java:57) at sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:160) at java.security.AccessController.doPrivileged(Native Method) at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:86) ....... Local Time = Thu Jun 13 09:36:09 2002 Elapsed Time = 1 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode) # Is this just a matter of permissions somewhere?? If it is can you point me in the right direction? I really do appreciate any and all help. Dennis |
From: Sven G. <sgo...@ja...> - 2002-06-13 14:02:16
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 08 June 2002 22:32, Robert Voigt wrote: > Hi, > > I have a subclass of GLAnimCanvas. It does all the usual stuff and it > works. I thought it might be a good idea to do the actual drawing > (everything from glBegin() to glEnd() ) in native code to speed it up. In > my case I get the arrays with the vertices and colors from the native side > anyway. > > So I just use the subclass of GLAnimCanvas to set up GL, and call a native > method in display(). It works, and it even displays different things in > different canvases if I tell it to. Why does it work? Am I just doing what > GL4Java would do otherwise (calling native methods)? Why is GL not confused > about where the drawing commands come from? And does it make sense? > well, the curretn gl context is being used, even in your native code, if you do not change the gl context. your native code runs in the same native thread, as the java methods would do. and yes, the gl calls are native ones, so it gives you nearly _no_ speed enhancements (may be 1-5%) just to group a couple of gl calls in a native proprietary function. also - your application ain't compatible anymore, meaning you must provide a native dynamic library for all plattforms where you want to see your application running. this effort in porting gl4java to many plattfroms and to provide binaries are the most stress factors within our development. e.g. we have to provide / specificate functionality which must be avaiable on all the OS / GL implementations etc. so IMHO it makes no sense to encapsulate some functionality within native methods. this is true, especially since jdk1.4's NIO Buffers - - jdk 1.4 with its hotspot vm is a high performance system, which gives us about 90% of native speed for applications on modern cpu's (>= 1.2 GHz). of course this depends on the data management (copy it only once, or many times - etc.). i hope this is usefull. look at kenneth's (and my) JavaOne 2002 demo papers .. (search at sun's) cheers, sven - -- health & wealth mailto:sgo...@ja... www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ voice : +49-521-2399440 ; fax : +49-521-2399442 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9CKXYHdOA30NoFAARAorpAJ9wlclXPlLIlZ/cWH/+/EDCQogYHQCfdLWe UFHtnbl/qom7pYCAXrVjLQY= =hdV/ -----END PGP SIGNATURE----- |
From: <Px...@ao...> - 2002-06-13 13:07:59
|
I'm writing a Java application, not applet, that draws linegraphs/scatterplots, etc. I have a swing window that has a canvas in the middle of it that displays the graph, and that canvas is a class that extends GLCanvas. Drawing the graph is fine---everything shows up perfectly. My goal and problem is in saving a screenshot of the canvas. I'm using glReadPixels but nothing's happening. I create a pixel array: byte[] pixels = new byte[getWidth() * getHeight() * 3]; Then I call gl.glReadPixels(0,0,getWidth(), getHeight(),GL_RGB,GL_UNSIGNED_BYTE,pixels); BUT, pixels--my array--remains unchanged. I've tried specifying a buffer with glReadBuffer with all possible buffers but it's still not doing anything. If a solution isn't obvious please ask me questions so I can be more specific how things are set up. I'm pretty lost here. btw I'm using a windows 2000 box with j2sdk1.4.0, and gl4java v. 2.8.2.0. Any help would be greatly appreciated. Dennis |
From: Combe, C. <C....@na...> - 2002-06-13 13:07:50
|
thanks Max, i'd have replied sooner but have been away for a few days. Things are working now. I think there was some sort of problem with adding and removing the GLCanvas components from a Panel or Frame, just treating them like i would any other component didn't work anyway. After re-adding them nothing would appear in them. In my efforts to make it work I just ended up over complicating things - this was how i got into destroying and creating new instances and using cvsDispose. Anyway, I now add all the canvas's i'm going to use to the panel at the start and set them visible or invisible as required. It confuses layout managers a bit but i can live with that. cheers, colin -----Original Message----- From: Max Gilead [mailto:gi...@li...] Sent: 07 June 2002 16:59 To: gl4...@li... Subject: Re: [gl4java-usergroup] what is the recommended way of swapping one canvas for another? Combe, Colin wrote: >What is the recommended way of swapping one canvas for another? I'll be most >grateful for any advice. I'd really like to use gl4java for this project and >the actual drawing of the scene works fine and is fast - its just this >canvas changing thing that is the problem. :-( > Is there any reason you have to destroy the canvas each time? It is very inefficient as initialization takes time each time you create a canvas. If I were you I would keep two instances of GL canvas, one on screen and one in inactive state. If the canvas is invisible (ie. removed from the GUI) it won't do anything and you can safely keep it in memory, re-adding to the GUI later and it will draw perfectly well. cvsDispose call is required when you dump the canvas completely and want it to be GC'd. HTH, Max _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ gl4java-usergroup mailing list gl4...@li... https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup |
From: Andreas W. <a....@gm...> - 2002-06-11 06:32:35
|
Hello Has anyone ever used the method gljReadPixelGL2AWT from GLContext? I didn't find much information about it. I thought that the following code should work, but it didn't. BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); DataBufferInt dbInt = (DataBufferInt)image.getRaster().getDataBuffer(); glj.gljReadPixelGL2AWT(w, 0, 0, 0, 0, w, h, GL_BGRA, GL_UNSIGNED_BYTE, glj.isDoubleBuffer()?GL_BACK:GL_FRONT, dbInt.getData()); Thanks, Andy |
From: Robert V. <f1...@gm...> - 2002-06-08 20:33:05
|
Hi, I have a subclass of GLAnimCanvas. It does all the usual stuff and it works. I thought it might be a good idea to do the actual drawing (everything from glBegin() to glEnd() ) in native code to speed it up. In my case I get the arrays with the vertices and colors from the native side anyway. So I just use the subclass of GLAnimCanvas to set up GL, and call a native method in display(). It works, and it even displays different things in different canvases if I tell it to. Why does it work? Am I just doing what GL4Java would do otherwise (calling native methods)? Why is GL not confused about where the drawing commands come from? And does it make sense? Any opinions are appreciated. |
From: Chad S. <sta...@ea...> - 2002-06-08 18:11:02
|
Oops, looks like I spoke too soon. The gljSwap() works just fine, thank = you. It's the gljFree() that was throwing the exception. Please forget = all the nonsense that I spouted in my previous email. Thanks, Chad PS - This does, however, raise the question "When to use gljFree()? |
From: Chad S. <sta...@ea...> - 2002-06-08 15:35:52
|
Problem resolved - Only after turning on the GLContext debugging (whose = debugging capabilities should be much more prominently documented) was I = able to determine that an exception was being thrown at the end of my = display method. It turns out that the glSwap call was the problem. If = I remove it and instead wrapper the display methods in a pushMatrix(), = popMatrix() combo, everything works fine. Now my question is: Why doesn't glSwap work even after I changed the = constructor to specify doubleBuffer =3D true? Does anyone know the = rules? I notice that the converted NeHe tutorials use glSwap, but are = run within the context of an Applet. None of the Swing demos use = glSwap. Is its usage verboten in Swing? Thanks in Advance, Chad ----- Original Message -----=20 From: Chad Stansbury=20 To: gl4...@li...=20 Sent: Friday, June 07, 2002 6:13 PM Subject: [gl4java-usergroup] Newbie: Using GLJPanel Hello, I'm attempting to learn OpenGL by following the NeHe tutorials, = and using the GLJPanel to do so. However, I have so far been unable to = get anything to display. The frame is being displayed, but nothing is = being painted. I get no error message until I resize or close the = window, at which point I'm notified that gljDestroy failed (free). Any help would be appreciated. Thanks, Chad Below is the code I'm running: --------------------------------------------------------------------- import gl4java.swing.GLJPanel; import java.awt.BorderLayout; import javax.swing.JFrame; public class Exercise2 extends GLJPanel { // Constructors public Exercise2() { super(true); } // Overridden GLJPanel Protocol public void init() { super.init(); gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); gl.glClearDepth(1.0f); gl.glShadeModel(GL_SMOOTH); gl.glEnable(GL_DEPTH_TEST); gl.glDepthFunc(GL_LESS); gl.glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); } public void display() { if (!glj.gljMakeCurrent()) { System.out.println("Make current failed"); return; } System.out.println("Started rendering"); gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); gl.glLoadIdentity(); gl.glColor3f(1.0f, 1.0f, 1.0f); gl.glTranslatef(-1.5f, 0.0f, -6.0f); gl.glBegin(GL_TRIANGLES); gl.glVertex3f(0.0f, 1.0f, 0.0f); gl.glVertex3f(-1.0f, -1.0f, 0.0f); gl.glVertex3f(1.0f, -1.0f, 0.0f); gl.glEnd(); System.out.println("Ended rendering"); glj.gljSwap(); glj.gljFree(); } public void reshape(int pWidth, int pHeight) { gl.glViewport(0, 0, pWidth, pHeight); gl.glMatrixMode(GL_PROJECTION); gl.glLoadIdentity(); glu.gluPerspective(45.0f, (float)pWidth/(float)pHeight, 0.1f, = 100.0f); gl.glMatrixMode(GL_MODELVIEW); } // Test Driver public static void main(String[] args) { JFrame lFrame =3D new JFrame("Exercise2"); Exercise2 lPanel =3D new Exercise2(); lFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); lFrame.getContentPane().add(lPanel, BorderLayout.CENTER); lFrame.setSize(300, 300); lFrame.show(); } } |
From: Chad S. <sta...@ea...> - 2002-06-08 00:13:53
|
Hello, I'm attempting to learn OpenGL by following the NeHe tutorials, = and using the GLJPanel to do so. However, I have so far been unable to = get anything to display. The frame is being displayed, but nothing is = being painted. I get no error message until I resize or close the = window, at which point I'm notified that gljDestroy failed (free). Any help would be appreciated. Thanks, Chad Below is the code I'm running: --------------------------------------------------------------------- import gl4java.swing.GLJPanel; import java.awt.BorderLayout; import javax.swing.JFrame; public class Exercise2 extends GLJPanel { // Constructors public Exercise2() { super(false); } // Overridden GLJPanel Protocol public void init() { super.init(); gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); gl.glClearDepth(1.0f); gl.glShadeModel(GL_SMOOTH); gl.glEnable(GL_DEPTH_TEST); gl.glDepthFunc(GL_LESS); gl.glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); } public void display() { if (!glj.gljMakeCurrent()) { System.out.println("Make current failed"); return; } System.out.println("Started rendering"); gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); gl.glLoadIdentity(); gl.glColor3f(1.0f, 1.0f, 1.0f); gl.glTranslatef(-1.5f, 0.0f, -6.0f); gl.glBegin(GL_TRIANGLES); gl.glVertex3f(0.0f, 1.0f, 0.0f); gl.glVertex3f(-1.0f, -1.0f, 0.0f); gl.glVertex3f(1.0f, -1.0f, 0.0f); gl.glEnd(); System.out.println("Ended rendering"); glj.gljSwap(); glj.gljFree(); } public void reshape(int pWidth, int pHeight) { gl.glViewport(0, 0, pWidth, pHeight); gl.glMatrixMode(GL_PROJECTION); gl.glLoadIdentity(); glu.gluPerspective(45.0f, (float)pWidth/(float)pHeight, 0.1f, 100.0f); gl.glMatrixMode(GL_MODELVIEW); } // Test Driver public static void main(String[] args) { JFrame lFrame =3D new JFrame("Exercise2"); Exercise2 lPanel =3D new Exercise2(); lFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); lFrame.getContentPane().add(lPanel, BorderLayout.CENTER); lFrame.setSize(300, 300); lFrame.show(); } } |
From: Powell, M. A. <Mar...@ps...> - 2002-06-07 19:17:24
|
I'm playing with NeHe's Lesson 6 ("Texture Loading") I downloaded Hodglim's gl4java port. He wrote his as an Applet and I have been working on moving it to a JFrame. I have done the same to all his previous apps, but I have having trouble with this one, specifically:=20 PngTextureLoader texLoader =3D new PngTextureLoader(gl, glu); texLoader.readTexture("data/nehe.png"); I removed getCodeBase() as the first param to readTexture as getCodeBase() is specific to Applet.=20 When I run, the applet clears the screen and then hangs on the readTexture call. Putting an System.out.println after that line proves as much. What am I missing? Thanks for any help. Mark |
From: Max G. <gi...@li...> - 2002-06-07 16:00:35
|
Combe, Colin wrote: >What is the recommended way of swapping one canvas for another? I'll be most >grateful for any advice. I'd really like to use gl4java for this project and >the actual drawing of the scene works fine and is fast - its just this >canvas changing thing that is the problem. :-( > Is there any reason you have to destroy the canvas each time? It is very inefficient as initialization takes time each time you create a canvas. If I were you I would keep two instances of GL canvas, one on screen and one in inactive state. If the canvas is invisible (ie. removed from the GUI) it won't do anything and you can safely keep it in memory, re-adding to the GUI later and it will draw perfectly well. cvsDispose call is required when you dump the canvas completely and want it to be GC'd. HTH, Max |
From: Max G. <gi...@li...> - 2002-06-07 15:55:16
|
Hi Colin! >After using cvsDispose, when I re-add the canvas to the frame it is not >enabled or initialised, so trying to draw to it doesn't work. > If I understand your problem right you should just let the component to be drawn on screen. GL context is initialized when the component is drawn on screen for the first time and I doubt there is another possibility to initialize it. If you need to draw things without visible component then create offscreen context. HTH, Max |
From: Combe, C. <C....@na...> - 2002-06-07 12:55:37
|
hi, if you've looked at any of my previous emails you'll know that i'm trying to replace a GLCanvas of one sort with a AWTCanvas or a GLCanvas of a different sort inside a Frame. No matter what I try it doesn't work. Destroying the canvas then creating a new object appears to work but it is always leaving behind a reference to a THread and eventually the prog slows to a crawl. I'm pretty certain that i'm not leaving behind this reference elsewhere in my prog. If I avoid creating new objects then after doing cvsDispose and removing the canvas I cannot get the GLCanvas to be initialised again. Removing and adding the canvas without ever calling cvsDispose works sometimes but eventually crashes (this is expected as the documentation says to always call cvsDispose before removing). Attatched is a version of my Frame class which tries to destroy and create the new GL canvas objects. What is the recommended way of swapping one canvas for another? I'll be most grateful for any advice. I'd really like to use gl4java for this project and the actual drawing of the scene works fine and is fast - its just this canvas changing thing that is the problem. :-( please help... colin |
From: gerard z. <gzi...@ap...> - 2002-06-06 21:09:33
|
guys, I'm a little busy with work, right now, but I will look into this as soon as possible. In the meantime, don't forget that you can build gl4java for MacOS X now yourself. Dive into the code :-) cheers On Thursday, June 6, 2002, at 12:13PM, gl4...@li... wrote: > I am having the exact same problem as Daniel. When starting a GLJPanel > and GLAnimPanel app it gives me the class cast exception in mac os x. > Is > there a fix? What should I do in the meantime. Gerard, you mentioned > that this problem occurs if hwaccel is on. Should I turn it off for the > time being, and if so, how? |
From: Mark P. <mp...@ps...> - 2002-06-06 18:33:33
|
I downloaded Gerard's latest Mac OS X version of GL4Java and that seemed to fix my previous problem of the ClassCastException when using GLJPanel, etc. (See osx & swing problems thread). However, now I am getting the following error: set fps := 20.0 -> 50 [ms/frame] get_GC: Error, pData is zero could not open a GL widget -- GL CONTEXT can't create a GL context In code that works fine on windows. Am I doing something stupid? Thanks for any help. Mark |
From: Combe, C. <C....@na...> - 2002-06-06 15:58:31
|
hi, its me again I'm making some progress but am now stuck again. I've realized what some of the problems i've been having are. This is what i currently think is going on - please correct me if i'm wrong... (i'm new to all this). Before i can remove the GLCanvas I must do cvsDispose(). My canvas is drawn by the thread from the model part of the program passing through my subclass of GLCanvas, the way I was calling cvsDispose() didn't work because it was the event thread for the button that was doing it, so i got errors to do with 'not holding context'. This was fixed by using shaded3D.getGLContext().gljMakeCurrent() before calling cvsDispose(). (shaded3D is my subclass of GLCanvas.) After using cvsDispose, when I re-add the canvas to the frame it is not enabled or initialised, so trying to draw to it doesn't work. I can enable it by using setGLEnabled(true), but then it still isn't initialised. To initialise it i have to use createGLContext(Graphics g), but I'm not sure how to do this. createGLContext() is a method in GLContext so I need a GLContext before I can call it. So in my Frame class I'm doing shaded3D.getGLContext().createGLContext(this.getGraphics()); This doesn't work, I've tried to pursue the cause of why it doesn't work into the gl4java source code and the reason is that openOpenGLNative() returns false. The error messages are: could not open a GL widget -- GL CONTEXT can't create a GL context GL4Java ERROR: openOpen could not lock JAWT reference! I've tried passing createGLContext() the graphics object from both the GLCanvas and the Frame. Any suggestions about what i'm doing wrong? thanks again, colin -----Original Message----- From: Combe, Colin Sent: 04 June 2002 16:41 To: Combe, Colin Cc: gl4...@li... Subject: RE: [gl4java-usergroup] prog never returns from gljMakeCurrent() thanks, i just tried changing it but it didn't help :-( I'll leave it as a subclass of GLCanvas. colin -----Original Message----- From: Kenneth B. Russell [mailto:kbr...@al...] Sent: 04 June 2002 16:26 To: Colin Combe Cc: gl4...@li... Subject: Re: [gl4java-usergroup] prog never returns from gljMakeCurrent() > hi, i've been trying different ways of swapping one type of GLCanvas in an > application for another. Here's the current problem - after removing a > GLAnimCanvas from the a JPanel and then adding it again, the program never > returns from the glj.gljMakeCurrent() method, it just fails silently. The > following bit of code prints "hello" and nothing else, and then the program > is frozen. Have you tried subclassing GLCanvas instead? It has fewer assumptions built into it. |
From: Mark P. <mp...@ps...> - 2002-06-06 01:02:48
|
Hi I am having the exact same problem as Daniel. When starting a GLJPanel and GLAnimPanel app it gives me the class cast exception in mac os x. Is there a fix? What should I do in the meantime. Gerard, you mentioned that this problem occurs if hwaccel is on. Should I turn it off for the time being, and if so, how? Thanks for any help. Mark On Tuesday, March 19, 2002, at 01:16 PM, gerard ziemski wrote: > Daniel > > The hwaccel mechanism in Apple's Java implementation uses OpenGL. > Currently, if you turn hwaccel on, you will run into problems if you > try to run gl4java at the same time. It should be easy to make gl4java > work with hwaccel, after all, they use the same hardware accelerated > surface, so the entire step of gl4java asking and pinning down its own > hwaccel surface goes away. But it takes time, however little, to do it > and right now I'm busy working on Java and preparing for WWDC. After > all what good is gl4java without kick ass Java support underneath it > right? ;-) > > I will look at gl4java shortly and update it. > > cheers > > >> Date: Sat, 16 Mar 2002 23:34:40 +0100 >> From: Daniel Bisig <db...@if...> >> To: gl4...@li... >> Subject: [gl4java-usergroup] osx & swing problems >> >> Hi all, >> >> I trying to get the swing demo files to run under Mac OS X 10.1.3. The >> gl4java Version is 2.7.2.0. which I downloaded from Gerard Ziemski >> page. >> At the moment, these demos and all the other examples that I found >> which >> make use of either GLAnimPanel or GLJPanel produce the follwing >> exception: >> >> An exception is thrown, while creating a GL context >> >> java.lang.ClassCastException: >> com.apple.mrj.internal.awt.basepeers.VContainerPeer >> java.lang.ClassCastException: >> com.apple.mrj.internal.awt.basepeers.VContainerPeer >> ...etc... >> >> I have no clue whether this is a problem of apple's java implementation >> or of gl4java. I would really like to include some opengl functionality >> in my visualization program which makes heavy use of swing. For this >> reason I appreciate any tips and tricks how to get gl4java and swing to >> work under Mac OS X. >> >> Thanks in advance! >> >> Daniel > > > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > |
From: Combe, C. <C....@na...> - 2002-06-04 15:40:11
|
thanks, i just tried changing it but it didn't help :-( I'll leave it as a subclass of GLCanvas. colin -----Original Message----- From: Kenneth B. Russell [mailto:kbr...@al...] Sent: 04 June 2002 16:26 To: Colin Combe Cc: gl4...@li... Subject: Re: [gl4java-usergroup] prog never returns from gljMakeCurrent() > hi, i've been trying different ways of swapping one type of GLCanvas in an > application for another. Here's the current problem - after removing a > GLAnimCanvas from the a JPanel and then adding it again, the program never > returns from the glj.gljMakeCurrent() method, it just fails silently. The > following bit of code prints "hello" and nothing else, and then the program > is frozen. Have you tried subclassing GLCanvas instead? It has fewer assumptions built into it. |
From: Kenneth B. R. <kbr...@al...> - 2002-06-04 15:25:39
|
> hi, i've been trying different ways of swapping one type of GLCanvas in an > application for another. Here's the current problem - after removing a > GLAnimCanvas from the a JPanel and then adding it again, the program never > returns from the glj.gljMakeCurrent() method, it just fails silently. The > following bit of code prints "hello" and nothing else, and then the program > is frozen. Have you tried subclassing GLCanvas instead? It has fewer assumptions built into it. |
From: Combe, C. <C....@na...> - 2002-06-04 15:11:47
|
hi, i've been trying different ways of swapping one type of GLCanvas in an application for another. Here's the current problem - after removing a GLAnimCanvas from the a JPanel and then adding it again, the program never returns from the glj.gljMakeCurrent() method, it just fails silently. The following bit of code prints "hello" and nothing else, and then the program is frozen. System.out.println("hello"); //Ensure GL is initialised correctly if (glj.gljMakeCurrent() == false) { System.out.print("whoops"); return; } System.out.println("made it"); any suggestions? thanks, col |
From: Combe, C. <C....@na...> - 2002-06-03 12:02:07
|
thanks max - but unfortunately i still have the same problem. I should = have said before that the destroy method in the classes that inherit from GLAnimCanvas call cvsDispose, sorry for this ommission. I changed the = code so that cvsDispose is called before I remove the canvas from the = JPanel, but it didn't help. I've also tried destroying the GLContext myself rather = than via cvsDispose but no luck there. The action performed method for the = change view button is now as follows (i think my desperation is apparent in = the way the switch statement has been written :-)=20 void changeView_actionPerformed(ActionEvent e) { land.running =3D false; while (land.isAlive()) { System.out.println("waiting"); try {Thread.sleep(150);} catch (InterruptedException ex) {System.err.println(ex.toString());} } land =3D null; switch (canvasType) { case 1: displayPanel.remove((Canvas2D) canvas); canvasType =3D 2; canvas =3D new Shaded3D (800, 600); displayPanel.add((Shaded3D) canvas); break; case 2: ((Shaded3D)canvas).stop(); ((Shaded3D)canvas).getGLContext().gljFree(); ((Shaded3D)canvas).getGLContext().gljDestroy(); ((Shaded3D) canvas).cvsDispose(); ((Shaded3D)canvas).setVisible(false); ((Shaded3D)canvas).setEnabled(false); displayPanel.remove((Shaded3D) canvas); canvas =3D null; canvasType =3D 3; canvas =3D new Coloured3D (800, 600); displayPanel.add((Coloured3D) canvas); break; case 3: ((Coloured3D) canvas).stop(); ((Coloured3D)canvas).getGLContext().gljFree(); ((Coloured3D)canvas).getGLContext().gljDestroy(); ((Coloured3D) canvas).cvsDispose(); ((Coloured3D)canvas).setVisible(false); ((Coloured3D)canvas).setEnabled(false); displayPanel.remove((Coloured3D) canvas); canvas =3D null; canvasType =3D 1; canvas =3D new Canvas2D (); displayPanel.add((Canvas2D) canvas); break; } land =3D new NormLand(canvas); canvas.setLand(land); land.running =3D true; land.start(); } 'land' is the thread that the model runs in, i know its not the this = thread that i'm not recovering resources from as the button that stops and = restarts the model works fine. Also, after chnaging the view a few times, the = program still runs at the normal speed when seen in the 2D display, its only = the GLCanvas's that are slowed down. I'm using java version 1.3.1_02.=20 cheers, colin -----Original Message----- From: Max Gilead [mailto:gi...@li...] Sent: 02 June 2002 19:31 To: gl4...@li... Subject: Re: [gl4java-usergroup] how to make GLAnimCanvas release all resources? Combe, Colin wrote: >any suggestions about what i'm doing wrong? > =20 > Most probably it's missing cvsDispose call (from GLCanvas Javadoc): "IF you remove/release a GLCanvas, e.g. you want to close/dispose = it=B4s=20 Window (which contains this GLCanvas), you HAVE TO call: cvsDispose <cid:par...@li...> =20 You should call this before releasing/dispose this Window ! Also you = can=20 overwrite this class, to dispose your own elements, e.g. a Frame etc. - = but be shure that you call cvsDispose implementation call this one !" HTH, Max |
From: Max G. <gi...@li...> - 2002-06-02 18:32:17
|
Combe, Colin wrote: >any suggestions about what i'm doing wrong? > > Most probably it's missing cvsDispose call (from GLCanvas Javadoc): "IF you remove/release a GLCanvas, e.g. you want to close/dispose it´s Window (which contains this GLCanvas), you HAVE TO call: cvsDispose <cid:par...@li...> You should call this before releasing/dispose this Window ! Also you can overwrite this class, to dispose your own elements, e.g. a Frame etc. - but be shure that you call cvsDispose implementation call this one !" HTH, Max |
From: Alban <aco...@wa...> - 2002-06-02 18:17:24
|
>> 1. Is the buffer of GL4Java compactible with the buffer of opengl(c++)?? >> Though GL4Java is developed from opengl, i don't know do the buffers can= be >> shared?? By my concept, Java's memory is on the Virtual Machine; C++'s >> memory is OS dependent. > Anyone? Sven? IMHO it is very interesting question. I suppose that it > should be possible to reuse opengl context by both native and java code > (after all gl4java calls native library) but I think someone who really > knows gl4j guts should speak up :-) I guess this should be possible as well, but I don't beleive there is any interest using gl4java if you end up coding in c++, having to manage bridge= s between c++ and java code, having to modify and recompile the gl4java library and so on. In that case, it seems better to go straight for c++ ! =20 >> 3.Moreover, on the nehe web site. I found that the tutorial lesson17-dra= w >> textured font. Could I drawing the textured font with GL4Java??? such as >> using glTexParameteri(), glGenLists() , glGenLists().... > Sure, why not? These are normal OpenGL commands so they're perfectly > useable with GL4Java. I you look at the end of the article on NEHE website, there is a link to download the source and binaries in gl4java. >> 4. I am thinking, haven't make any decision. Should I use glFont lib as = JNI >> ?? info got form:http://students.cs.byu.edu/~bfish/glfont2.php >>=20 > I have not checked it in detail but Java has got nice true type font > support and I am wondering if it wouldn't be just simpler to write a > Java implementation of such library instead of messing with JNI. There are some demos apparently made by Sven in the cathegory Misc demos that makes use of glutfonts. They are named GLUT Font Stroke 1, GLUT Font Bitmap 1 & 2. But this kind of font support seems to be strictly limited to a small count of typos (like arial, helvetica, sans-serif), and doesn't appear to provide font antialiasing.=20 Sven, what can you tell us about this kind of font support ? Is it limited to a few fonts or opened to virtually any true type font ? My guess is that if you want to get perfect portability and any kind of fon= t support, the best is to go for textured fonts, the Nehe's lesson 17's way. Anyway I am very interested by the topic. If you guys have some good ideas for a smooth way of dealing with textured fonts (especialy the font texture generation, or the import of glfont files as pure java) I'm interested to discuss it. Glfont files could probably be read from from java. But when it comes to translate a c++ fread, I don't know how to deal with this. Any c++ guru coding in java willing to help ? Regards, Alban Cousini=E9 |