Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
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 2998 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 {
    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 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 »

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 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.

 

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

The first screenshot will be displayed as a thumbnail.

Riven (10 views)
2014-10-02 14:36:20

Pippogeek (41 views)
2014-09-24 16:13:29

Pippogeek (32 views)
2014-09-24 16:12:22

Pippogeek (22 views)
2014-09-24 16:12:06

Grunnt (48 views)
2014-09-23 14:38:19

radar3301 (30 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (44 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!