Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
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 3203 times)
0 Members and 1 Guest are viewing this topic.
Offline AI Guy

Senior Newbie

« Posted 2007-10-29 19: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-29 23: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 {[] contexts; // where each context is a different graphics card

    public GLContextManager(){
        java.awt.GraphicsDevice[] devices = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
               factory =;
        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 00: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?

People make games and games make people
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 15:17:31 »

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, .  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,  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 16:00:24 »

Cool... Good luck!

People make games and games make people
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

KaiHH (12 views)
2015-10-06 20:22:20

KaiHH (11 views)
2015-10-06 19:41:59

BurntPizza (20 views)
2015-10-06 19:04:48

basil_ (44 views)
2015-09-30 17:04:40

shadowstryker (22 views)
2015-09-29 15:55:06

TheSpaceHedgehog (28 views)
2015-09-29 01:58:48

GamerC4 (54 views)
2015-09-24 21:10:38

GamerC4 (71 views)
2015-09-24 21:09:48

htuy (28 views)
2015-09-24 04:57:24

htuy (38 views)
2015-09-24 04:56:35
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
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!