Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (407)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Context pooling feasability  (Read 2660 times)
0 Members and 1 Guest are viewing this topic.
Offline AI Guy

Senior Newbie





« Posted 2007-10-29 20:09:37 »

Hi, first post here.  Interested in GLSL, because I need large performance gains with a goal seeker, solving for 20 unknowns.  Part of process really needs to be brute forced (the first ten unknowns).  As you might imagine this is a large bottleneck.  java.util.conncurrent thread pools are nice for multi-core CPU's and I am currently implemented using them, but this is not cost effective.  T2 systems start at 15K.  CUDA seems a little too new, NVIDIA specific, & not integrated with Java.

I have spent about 2 weeks reading, re-coding a couple classes as in GLSL, and trying to plan out how much could be moved off.  Is it going to be possible to put multiple graphics cards in a computer, and build a context pool, that the thread pools can use.  I know you can buy Power Macs with multiple graphics cards, but am I being just way too greedy?  BTW, insane is already a given.

While just pulling anything off is no minor feat,  was just wondering what my option might be.
Offline AI Guy

Senior Newbie





« Reply #1 - Posted 2007-10-30 00:56:18 »

Well looks like I was just seduced by seeing AWTGraphicsDevice Class in the Java Docs, and references to devices in the Java Doc of GLDrawableFactory.  FYI, what I was looking for some like:

public class GLContextManager {
    javax.media.opengl.GLContext[] contexts; // where each context is a different graphics card

    public GLContextManager(){
        java.awt.GraphicsDevice[] devices = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
               
        javax.media.opengl.GLDrawableFactory factory = javax.media.opengl.GLDrawableFactory.getFactory();
        for(int i = 0; i < devices.length; i++){
            contexts = factory.getGLDrawable(devices, null, null).createContext(null);
        }
    }
}

This would be followed by a method for a member of a thread pool to request a context.  That thread would have to makeCurrent() and possibly wait, and then put release() in a finally block.  No return to the pool would've actually been required, it would just hand out contexts in a round robbin fashion.

Another problem with this is multiple screen devices could be connected to the same graphics card.  I guess I will just have to get a single card with the highest # of Fragment Processors as possible.
Offline SimonH
« Reply #2 - Posted 2007-10-30 01:34:56 »

I'm a bit of a openGL noob; I know what GLSL is but I've never used it. What I don't get is what you're trying to do... Multipass rendering in realtime?

Heroes' Keep is in development.
Meanwhile try Bloodridge
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline AI Guy

Senior Newbie





« Reply #3 - Posted 2007-10-30 16:17:31 »

Simon,
Not to crowd gamer's / renderer's, but the price/performance ratio of fragment processors is grabbing attention of some who have no interest in graphics.  There is a site for General-Purpose Computation Using Graphics Hardware,  http://www.gpgpu.org/ .  There you can find people, mostly researchers, doing many different kinds of systems, and Universities building Supercomputers out of video cards.  NVIDIA has come up with a new language, CUDA, http://developer.nvidia.com/object/cuda.html  which eliminates the need to fake out the cards by passing large amounts of data disguised as textures, and buiding an image to return that is not really an image.

I didn't really answer your question,  but the domain of my application is finance / investing.
Offline SimonH
« Reply #4 - Posted 2007-10-30 17:00:24 »

Cool... Good luck!

Heroes' Keep is in development.
Meanwhile try Bloodridge
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (94 views)
2013-05-17 21:29:12

alaslipknot (102 views)
2013-05-16 21:24:48

gouessej (132 views)
2013-05-16 00:53:38

gouessej (127 views)
2013-05-16 00:17:58

theagentd (138 views)
2013-05-15 15:01:13

theagentd (126 views)
2013-05-15 15:00:54

StreetDoggy (167 views)
2013-05-14 15:56:26

kutucuk (189 views)
2013-05-12 17:10:36

kutucuk (192 views)
2013-05-12 15:36:09

UnluckyDevil (199 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.15 seconds with 21 queries.