Thread: [sdljava-users] Can AWT/Swing widgets be used inside or alongside sdlsurface?
Status: Beta
Brought to you by:
ivan_ganza
From: Sannie K. <sa...@in...> - 2005-02-23 16:57:17
|
Hi everyone! I'm checking out various high-speed graphics and game libraries for use in a java based multiplayer game I'm developing. Sdljava seems to do the trick on most requirements, but there is something that I haven't figured out yet. At certain points in the game, there will be several animations and sprite-movements displayed at once, with some basic chat functionality right next to it. My knowledge of sdljava (or SDL for that matter) is still pretty limited, but my understanding is that I have to create a SDLSurface for the animations and sprite movements (using openGL or sdl_gfx). I wanted to use the standard AWT (or, if possible, Swing) widgets for the chatinterface, which is nothing more than a TextField and scrollable TextArea. In my tests I haven't been able to combine a SDL_surface and AWT/Swing widgets in one window. My approaches so far have been pretty awt-centric (trying to add a SDLSurface to a Container/Frame/JFrame and trying to get a AWT/Swing widget to draw on a SDLSurface) none of which were succesfull. And because a SDLSurface creates its own window, drawing/adding AWT widgets next to the SDLSurface don't seem to be possible either. Is combining AWT/Swing with SDL graphics actually possible (and if so, how) or are there other methods for creating a chat interface within a surface? Thanks in advance! -- Sannie Kwakman |
From: Chris D. <Des...@nt...> - 2005-02-23 21:25:58
|
Sannie Kwakman wrote: > Hi everyone! > > I'm checking out various high-speed graphics and game libraries for > use in a java based multiplayer game I'm developing. Sdljava seems to > do the trick on most requirements, but there is something that I > haven't figured out yet. At certain points in the game, there will be > several animations and sprite-movements displayed at once, with some > basic chat functionality right next to it. My knowledge of sdljava (or > SDL for that matter) is still pretty limited, but my understanding is > that I have to create a SDLSurface for the animations and sprite > movements (using openGL or sdl_gfx). I wanted to use the standard AWT > (or, if possible, Swing) widgets for the chatinterface, which is > nothing more than a TextField and scrollable TextArea. In my tests I > haven't been able to combine a SDL_surface and AWT/Swing widgets in > one window. My approaches so far have been pretty awt-centric (trying > to add a SDLSurface to a Container/Frame/JFrame and trying to get a > AWT/Swing widget to draw on a SDLSurface) none of which were > succesfull. And because a SDLSurface creates its own window, > drawing/adding AWT widgets next to the SDLSurface don't seem to be > possible either. > > Is combining AWT/Swing with SDL graphics actually possible (and if so, > how) or are there other methods for creating a chat interface within a > surface? > > Thanks in advance! > > -- Sannie Kwakman This seems to be quite a good idea, but you can't do it using the approach you are taking. -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Chris D. <Des...@nt...> - 2005-02-23 21:40:51
|
Chris Dennett wrote: > Sannie Kwakman wrote: > >> Hi everyone! >> >> I'm checking out various high-speed graphics and game libraries for >> use in a java based multiplayer game I'm developing. Sdljava seems to >> do the trick on most requirements, but there is something that I >> haven't figured out yet. At certain points in the game, there will be >> several animations and sprite-movements displayed at once, with some >> basic chat functionality right next to it. My knowledge of sdljava >> (or SDL for that matter) is still pretty limited, but my >> understanding is that I have to create a SDLSurface for the >> animations and sprite movements (using openGL or sdl_gfx). I wanted >> to use the standard AWT (or, if possible, Swing) widgets for the >> chatinterface, which is nothing more than a TextField and scrollable >> TextArea. In my tests I haven't been able to combine a SDL_surface >> and AWT/Swing widgets in one window. My approaches so far have been >> pretty awt-centric (trying to add a SDLSurface to a >> Container/Frame/JFrame and trying to get a AWT/Swing widget to draw >> on a SDLSurface) none of which were succesfull. And because a >> SDLSurface creates its own window, drawing/adding AWT widgets next to >> the SDLSurface don't seem to be possible either. >> >> Is combining AWT/Swing with SDL graphics actually possible (and if >> so, how) or are there other methods for creating a chat interface >> within a surface? >> >> Thanks in advance! >> >> -- Sannie Kwakman > > > This seems to be quite a good idea, but you can't do it using the > approach you are taking. > > Have a look at this: http://java.sun.com/j2se/1.3/docs/api/java/awt/Graphics.html. If you want AWT stuff in an SDLJava SDL window, you will need to extend this class and implement all the abstract methods. You then have to shove this into somewhere to register it as the default graphics thingy, but it dosen't tell you how to do this anywhere. -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Chris D. <Des...@nt...> - 2005-02-23 22:04:01
|
Chris Dennett wrote: > Chris Dennett wrote: > >> Sannie Kwakman wrote: >> >>> Hi everyone! >>> >>> I'm checking out various high-speed graphics and game libraries for >>> use in a java based multiplayer game I'm developing. Sdljava seems >>> to do the trick on most requirements, but there is something that I >>> haven't figured out yet. At certain points in the game, there will >>> be several animations and sprite-movements displayed at once, with >>> some basic chat functionality right next to it. My knowledge of >>> sdljava (or SDL for that matter) is still pretty limited, but my >>> understanding is that I have to create a SDLSurface for the >>> animations and sprite movements (using openGL or sdl_gfx). I wanted >>> to use the standard AWT (or, if possible, Swing) widgets for the >>> chatinterface, which is nothing more than a TextField and scrollable >>> TextArea. In my tests I haven't been able to combine a SDL_surface >>> and AWT/Swing widgets in one window. My approaches so far have been >>> pretty awt-centric (trying to add a SDLSurface to a >>> Container/Frame/JFrame and trying to get a AWT/Swing widget to draw >>> on a SDLSurface) none of which were succesfull. And because a >>> SDLSurface creates its own window, drawing/adding AWT widgets next >>> to the SDLSurface don't seem to be possible either. >>> >>> Is combining AWT/Swing with SDL graphics actually possible (and if >>> so, how) or are there other methods for creating a chat interface >>> within a surface? >>> >>> Thanks in advance! >>> >>> -- Sannie Kwakman >> >> >> >> This seems to be quite a good idea, but you can't do it using the >> approach you are taking. >> >> > Have a look at this: > http://java.sun.com/j2se/1.3/docs/api/java/awt/Graphics.html. If you > want AWT stuff in an SDLJava SDL window, you will need to extend this > class and implement all the abstract methods. You then have to shove > this into somewhere to register it as the default graphics thingy, but > it dosen't tell you how to do this anywhere. > Have a look at Odonata -- they are attempting to have AWT working on SDL, which is what you want to do. I expect they have taken the approach which I outlined in the previous message. See http://adorphuye.com/gallery/Odonata/Odonata20040816 for a screenshot. If you can get the source to this, then it might be adaptable to SDLJava. I think the project is also GPLed, so you can modify and redistribute the source if you want. I'm just trying to find the Odonata CVS so I can check out the latest files (I'm interested in this myself), but it may not have anonymous access. There was also something about AWT / Swing being OpenGL accelerated in the latest version of Java, so perhaps that could also be used? Regards, Chris -- |>>> Dessimat0r /`\ | "We cannot turn back time, but we can _ _|_ _ move it forwards with our own hands." |;|_|;|_|;| \\. . / [www: http://codeknight.net ] \\: . / [e-mail: des...@nt... ] ||: U | /`\ [icq: 21477909 ] ||:. | [msn: des...@nt... ] \,/ ||: U.| ||: | \,/ ||: , | ____--`~--- '--~~__ __ ----~ - ~`---, -~--~ ~---__ ,--~' ~~----___ |
From: Sannie K. <sa...@in...> - 2005-02-23 23:32:16
|
Chris Dennett wrote: > Chris Dennett wrote: > >> Chris Dennett wrote: >> >>> Sannie Kwakman wrote: >>> >>>> Hi everyone! >>>> >>>> I'm checking out various high-speed graphics and game libraries for >>>> use in a java based multiplayer game I'm developing. Sdljava seems >>>> to do the trick on most requirements, but there is something that I >>>> haven't figured out yet. At certain points in the game, there will >>>> be several animations and sprite-movements displayed at once, with >>>> some basic chat functionality right next to it. My knowledge of >>>> sdljava (or SDL for that matter) is still pretty limited, but my >>>> understanding is that I have to create a SDLSurface for the >>>> animations and sprite movements (using openGL or sdl_gfx). I wanted >>>> to use the standard AWT (or, if possible, Swing) widgets for the >>>> chatinterface, which is nothing more than a TextField and >>>> scrollable TextArea. In my tests I haven't been able to combine a >>>> SDL_surface and AWT/Swing widgets in one window. My approaches so >>>> far have been pretty awt-centric (trying to add a SDLSurface to a >>>> Container/Frame/JFrame and trying to get a AWT/Swing widget to draw >>>> on a SDLSurface) none of which were succesfull. And because a >>>> SDLSurface creates its own window, drawing/adding AWT widgets next >>>> to the SDLSurface don't seem to be possible either. >>>> >>>> Is combining AWT/Swing with SDL graphics actually possible (and if >>>> so, how) or are there other methods for creating a chat interface >>>> within a surface? >>>> >>>> Thanks in advance! >>>> >>>> -- Sannie Kwakman >>> >>> >>> >>> >>> This seems to be quite a good idea, but you can't do it using the >>> approach you are taking. >>> >>> >> Have a look at this: >> http://java.sun.com/j2se/1.3/docs/api/java/awt/Graphics.html. If you >> want AWT stuff in an SDLJava SDL window, you will need to extend this >> class and implement all the abstract methods. You then have to shove >> this into somewhere to register it as the default graphics thingy, >> but it dosen't tell you how to do this anywhere. >> > Have a look at Odonata -- they are attempting to have AWT working on > SDL, which is what you want to do. I expect they have taken the > approach which I outlined in the previous message. See > http://adorphuye.com/gallery/Odonata/Odonata20040816 for a screenshot. > If you can get the source to this, then it might be adaptable to > SDLJava. I think the project is also GPLed, so you can modify and > redistribute the source if you want. > > I'm just trying to find the Odonata CVS so I can check out the latest > files (I'm interested in this myself), but it may not have anonymous > access. There was also something about AWT / Swing being OpenGL > accelerated in the latest version of Java, so perhaps that could also > be used? > > Regards, > Chris > 'lo Chris, thanks for the reponses. I managed to download the Odonata src (http://odonata.tangency.co.uk/files/). While scanning through them, I got one mystery solved on how to replace Java's standard GraphicsEnvironments. Odonata seems to do this pretty simple: System.setProperty("java.awt.graphicsenv","uk.co.tangency.odonata.GraphicsEnvironment"); Odonata is still pretty early in development, and by the looks of it, far from finished. In search for other methods, I found some threads on the LWJGL forum that are discussing the awt/swing problem, and the latest posts about it indicate that they were very close in having a awt/swing adapter class. There was some code for it posted on the forums, but I haven't found it in their CVS yet.Here are some related forum threads: http://lwjgl.org/forum/viewtopic.php?t=904&highlight=awt http://lwjgl.org/forum/viewtopic.php?t=900&highlight=awt As I understand it, their approach is to use a pbuffer in which the gl is rendered and draw the resulting pixels in a custom JComponent. Looks like a more elegant solution to me, altough I don't know how bad it will affect performance. -- Sannie |
From: Sannie K. <sa...@in...> - 2005-02-24 00:02:14
|
Sannie Kwakman wrote: > Chris Dennett wrote: > >> Chris Dennett wrote: >> >>> Chris Dennett wrote: >>> >>>> Sannie Kwakman wrote: >>>> >>>>> Hi everyone! >>>>> >>>>> I'm checking out various high-speed graphics and game libraries >>>>> for use in a java based multiplayer game I'm developing. Sdljava >>>>> seems to do the trick on most requirements, but there is something >>>>> that I haven't figured out yet. At certain points in the game, >>>>> there will be several animations and sprite-movements displayed at >>>>> once, with some basic chat functionality right next to it. My >>>>> knowledge of sdljava (or SDL for that matter) is still pretty >>>>> limited, but my understanding is that I have to create a >>>>> SDLSurface for the animations and sprite movements (using openGL >>>>> or sdl_gfx). I wanted to use the standard AWT (or, if possible, >>>>> Swing) widgets for the chatinterface, which is nothing more than a >>>>> TextField and scrollable TextArea. In my tests I haven't been able >>>>> to combine a SDL_surface and AWT/Swing widgets in one window. My >>>>> approaches so far have been pretty awt-centric (trying to add a >>>>> SDLSurface to a Container/Frame/JFrame and trying to get a >>>>> AWT/Swing widget to draw on a SDLSurface) none of which were >>>>> succesfull. And because a SDLSurface creates its own window, >>>>> drawing/adding AWT widgets next to the SDLSurface don't seem to be >>>>> possible either. >>>>> >>>>> Is combining AWT/Swing with SDL graphics actually possible (and if >>>>> so, how) or are there other methods for creating a chat interface >>>>> within a surface? >>>>> >>>>> Thanks in advance! >>>>> >>>>> -- Sannie Kwakman >>>> >>>> >>>> >>>> >>>> >>>> This seems to be quite a good idea, but you can't do it using the >>>> approach you are taking. >>>> >>>> >>> Have a look at this: >>> http://java.sun.com/j2se/1.3/docs/api/java/awt/Graphics.html. If you >>> want AWT stuff in an SDLJava SDL window, you will need to extend >>> this class and implement all the abstract methods. You then have to >>> shove this into somewhere to register it as the default graphics >>> thingy, but it dosen't tell you how to do this anywhere. >>> >> Have a look at Odonata -- they are attempting to have AWT working on >> SDL, which is what you want to do. I expect they have taken the >> approach which I outlined in the previous message. See >> http://adorphuye.com/gallery/Odonata/Odonata20040816 for a >> screenshot. If you can get the source to this, then it might be >> adaptable to >> SDLJava. I think the project is also GPLed, so you can modify and >> redistribute the source if you want. >> >> I'm just trying to find the Odonata CVS so I can check out the latest >> files (I'm interested in this myself), but it may not have anonymous >> access. There was also something about AWT / Swing being OpenGL >> accelerated in the latest version of Java, so perhaps that could also >> be used? >> >> Regards, >> Chris >> > 'lo Chris, > > thanks for the reponses. I managed to download the Odonata src > (http://odonata.tangency.co.uk/files/). While scanning through them, I > got one mystery solved on how to replace Java's standard > GraphicsEnvironments. Odonata seems to do this pretty simple: > > System.setProperty("java.awt.graphicsenv","uk.co.tangency.odonata.GraphicsEnvironment"); > > > Odonata is still pretty early in development, and by the looks of it, > far from finished. In search for other methods, I found some threads > on the LWJGL forum that are discussing the awt/swing problem, and the > latest posts about it indicate that they were very close in having a > awt/swing adapter class. There was some code for it posted on the > forums, but I haven't found it in their CVS yet.Here are some related > forum threads: > http://lwjgl.org/forum/viewtopic.php?t=904&highlight=awt > http://lwjgl.org/forum/viewtopic.php?t=900&highlight=awt > > As I understand it, their approach is to use a pbuffer in which the gl > is rendered and draw the resulting pixels in a custom JComponent. > Looks like a more elegant solution to me, altough I don't know how bad > it will affect performance. > > -- Sannie > .. but it looks like pbuffer support (SDL calls it rendertarget) won't be implemented until the 1.3 release :( Or does anyone know an alternative? -- Sannie |
From: Ivan Z. G. <iva...@ya...> - 2005-02-24 00:18:10
|
Hi Sannie, All very interesting! To answer your first question currently there is NO support within sdljava to interoperate with AWT/Swing. This is certainly something that would be nice to have though! I'll have to go over all the information posted below but it certainly sounds like its possible. It doesn't seem like its a small amount of work though...The pbuffer idea might be possible with very little work though. We can get pbuffer support in sdljava very easily as GLEW already supports it I belive. I will check it out. I am working on a very simple GUI framework (part of sdljava) which I intend to be useable for game development. This is currently coming along slowly however. The question of how to provide a usefull and fast (for gaming) GUI is a hard one and I don't currently know the answer. As always any suggestions from others are welcome. -Ivan/ Sannie Kwakman wrote: > Sannie Kwakman wrote: > >> Chris Dennett wrote: >> >>> Chris Dennett wrote: >>> >>>> Chris Dennett wrote: >>>> >>>>> Sannie Kwakman wrote: >>>>> >>>>>> Hi everyone! >>>>>> >>>>>> I'm checking out various high-speed graphics and game libraries >>>>>> for use in a java based multiplayer game I'm developing. Sdljava >>>>>> seems to do the trick on most requirements, but there is >>>>>> something that I haven't figured out yet. At certain points in >>>>>> the game, there will be several animations and sprite-movements >>>>>> displayed at once, with some basic chat functionality right next >>>>>> to it. My knowledge of sdljava (or SDL for that matter) is still >>>>>> pretty limited, but my understanding is that I have to create a >>>>>> SDLSurface for the animations and sprite movements (using openGL >>>>>> or sdl_gfx). I wanted to use the standard AWT (or, if possible, >>>>>> Swing) widgets for the chatinterface, which is nothing more than >>>>>> a TextField and scrollable TextArea. In my tests I haven't been >>>>>> able to combine a SDL_surface and AWT/Swing widgets in one >>>>>> window. My approaches so far have been pretty awt-centric (trying >>>>>> to add a SDLSurface to a Container/Frame/JFrame and trying to get >>>>>> a AWT/Swing widget to draw on a SDLSurface) none of which were >>>>>> succesfull. And because a SDLSurface creates its own window, >>>>>> drawing/adding AWT widgets next to the SDLSurface don't seem to >>>>>> be possible either. >>>>>> >>>>>> Is combining AWT/Swing with SDL graphics actually possible (and >>>>>> if so, how) or are there other methods for creating a chat >>>>>> interface within a surface? >>>>>> >>>>>> Thanks in advance! >>>>>> >>>>>> -- Sannie Kwakman >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> This seems to be quite a good idea, but you can't do it using the >>>>> approach you are taking. >>>>> >>>>> >>>> Have a look at this: >>>> http://java.sun.com/j2se/1.3/docs/api/java/awt/Graphics.html. If >>>> you want AWT stuff in an SDLJava SDL window, you will need to >>>> extend this class and implement all the abstract methods. You then >>>> have to shove this into somewhere to register it as the default >>>> graphics thingy, but it dosen't tell you how to do this anywhere. >>>> >>> Have a look at Odonata -- they are attempting to have AWT working on >>> SDL, which is what you want to do. I expect they have taken the >>> approach which I outlined in the previous message. See >>> http://adorphuye.com/gallery/Odonata/Odonata20040816 for a >>> screenshot. If you can get the source to this, then it might be >>> adaptable to >>> SDLJava. I think the project is also GPLed, so you can modify and >>> redistribute the source if you want. >>> >>> I'm just trying to find the Odonata CVS so I can check out the >>> latest files (I'm interested in this myself), but it may not have >>> anonymous access. There was also something about AWT / Swing being >>> OpenGL accelerated in the latest version of Java, so perhaps that >>> could also be used? >>> >>> Regards, >>> Chris >>> >> 'lo Chris, >> >> thanks for the reponses. I managed to download the Odonata src >> (http://odonata.tangency.co.uk/files/). While scanning through them, >> I got one mystery solved on how to replace Java's standard >> GraphicsEnvironments. Odonata seems to do this pretty simple: >> >> System.setProperty("java.awt.graphicsenv","uk.co.tangency.odonata.GraphicsEnvironment"); >> >> >> Odonata is still pretty early in development, and by the looks of it, >> far from finished. In search for other methods, I found some threads >> on the LWJGL forum that are discussing the awt/swing problem, and the >> latest posts about it indicate that they were very close in having a >> awt/swing adapter class. There was some code for it posted on the >> forums, but I haven't found it in their CVS yet.Here are some related >> forum threads: >> http://lwjgl.org/forum/viewtopic.php?t=904&highlight=awt >> http://lwjgl.org/forum/viewtopic.php?t=900&highlight=awt >> >> As I understand it, their approach is to use a pbuffer in which the >> gl is rendered and draw the resulting pixels in a custom JComponent. >> Looks like a more elegant solution to me, altough I don't know how >> bad it will affect performance. >> >> -- Sannie >> > .. but it looks like pbuffer support (SDL calls it rendertarget) won't > be implemented until the 1.3 release :( Or does anyone know an > alternative? > > -- Sannie > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users |
From: Ivan Z. G. <iva...@ya...> - 2005-02-24 03:02:09
|
Hrrm, I've had a look into this. It seems your right, before SDL 1.3 we won't be able to create a pbuffer. That is unless we were to code something ouselves in C which provides support for what we need. I've looked at the SDL source code but so far I'm not sure what I would need to do to accomplish this. Also I have no idea when 1.3 is supposed to be coming out. I think though that the EXT_FRAMEBUFFER_OBJECT (http://www.opengl.org/documentation/extensions/EXT_framebuffer_object.txt) might do also what we need? It seems like it does what pbuffer's can do and more? I'm learning openGL as we go so I'm not totally sure. I will continue to read up on this and will make an attempt if the EXT_FRAMEBUFFER_OBJECT could support this. -Ivan/ Sannie Kwakman wrote: >> 'lo Chris, >> >> thanks for the reponses. I managed to download the Odonata src >> (http://odonata.tangency.co.uk/files/). While scanning through them, >> I got one mystery solved on how to replace Java's standard >> GraphicsEnvironments. Odonata seems to do this pretty simple: >> >> System.setProperty("java.awt.graphicsenv","uk.co.tangency.odonata.GraphicsEnvironment"); >> >> >> Odonata is still pretty early in development, and by the looks of it, >> far from finished. In search for other methods, I found some threads >> on the LWJGL forum that are discussing the awt/swing problem, and the >> latest posts about it indicate that they were very close in having a >> awt/swing adapter class. There was some code for it posted on the >> forums, but I haven't found it in their CVS yet.Here are some related >> forum threads: >> http://lwjgl.org/forum/viewtopic.php?t=904&highlight=awt >> http://lwjgl.org/forum/viewtopic.php?t=900&highlight=awt >> >> As I understand it, their approach is to use a pbuffer in which the >> gl is rendered and draw the resulting pixels in a custom JComponent. >> Looks like a more elegant solution to me, altough I don't know how >> bad it will affect performance. >> >> -- Sannie >> > .. but it looks like pbuffer support (SDL calls it rendertarget) won't > be implemented until the 1.3 release :( Or does anyone know an > alternative? > > -- Sannie |
From: Sannie K. <sa...@in...> - 2005-02-24 12:27:25
|
EXT_FRAMEBUFFER_OBJECT seems to be one of the latest additions to OpenGL and was finalized just over a month ago. I've seen some forum discussions about it being more efficient than pbuffers (http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=LWJGL;action=display;num=1104918063). But because it is so new, the mainstream ATI and NVidia drivers don't support it (yet). And the people who happen to have a lesser known brand of 3d-accelerated card of which the drivers haven't been updated for a while will be left out in the cold. If this extension is going to be used for a game, the amount of casual players (the ones that use whatever graphics card they got with their system) who will be able to run it will be severely minimized, at least for the current generation of hardware. Altough it is a good extension to support in sdljava, I don't think it's the right one to use for library-wide awt/swing integration. So far the only option for GUI widgets on a (GL) Surface, seems to be by creating them from scratch. The Odonata project seems promising, but it doesn't look like it's usable (stable and reliable enough) for use in a game right now. Il'l keep trying to find a short-term solution other than creating new widgets, but it doesn't look good :/ -- Sannie Ivan Z. Ganza wrote: > Hrrm, I've had a look into this. It seems your right, before SDL 1.3 > we won't be able to create a pbuffer. That is unless we were to code > something ouselves in C which provides support for what we need. I've > looked at the SDL source code but so far I'm not sure what I would > need to do to accomplish this. Also I have no idea when 1.3 is > supposed to be coming out. > > I think though that the EXT_FRAMEBUFFER_OBJECT > (http://www.opengl.org/documentation/extensions/EXT_framebuffer_object.txt) > might do also what we need? It seems like it does what pbuffer's can > do and more? I'm learning openGL as we go so I'm not totally sure. I > will continue to read up on this and will make an attempt if the > EXT_FRAMEBUFFER_OBJECT could support this. > > -Ivan/ > > Sannie Kwakman wrote: > >>> 'lo Chris, >>> >>> thanks for the reponses. I managed to download the Odonata src >>> (http://odonata.tangency.co.uk/files/). While scanning through them, >>> I got one mystery solved on how to replace Java's standard >>> GraphicsEnvironments. Odonata seems to do this pretty simple: >>> >>> System.setProperty("java.awt.graphicsenv","uk.co.tangency.odonata.GraphicsEnvironment"); >>> >>> >>> Odonata is still pretty early in development, and by the looks of >>> it, far from finished. In search for other methods, I found some >>> threads on the LWJGL forum that are discussing the awt/swing >>> problem, and the latest posts about it indicate that they were very >>> close in having a awt/swing adapter class. There was some code for >>> it posted on the forums, but I haven't found it in their CVS >>> yet.Here are some related forum threads: >>> http://lwjgl.org/forum/viewtopic.php?t=904&highlight=awt >>> http://lwjgl.org/forum/viewtopic.php?t=900&highlight=awt >>> >>> As I understand it, their approach is to use a pbuffer in which the >>> gl is rendered and draw the resulting pixels in a custom JComponent. >>> Looks like a more elegant solution to me, altough I don't know how >>> bad it will affect performance. >>> >>> -- Sannie >>> >> .. but it looks like pbuffer support (SDL calls it rendertarget) >> won't be implemented until the 1.3 release :( Or does anyone know an >> alternative? >> >> -- Sannie > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > sdljava-users mailing list > sdl...@li... > https://lists.sourceforge.net/lists/listinfo/sdljava-users > |