Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  "RADEON 9200" in jogl becomes "GDI Generic" in JSR-231?  (Read 3382 times)
0 Members and 1 Guest are viewing this topic.
Offline Markus_Persson

JGO Wizard


Medals: 15
Projects: 19


Mojang Specifications


« Posted 2006-05-02 14:26:57 »

Using JOGL from http://www.wurmonline.com/client/wurmclient.jnlp :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
----------------
OpenGL information:
----------------
JOGL version: 1.1.0-b12
OpenGL vendor: ATI Technologies Inc.
OpenGL renderer: RADEON 9200 Series DDR x86/MMX/3DNow!/SSE
OpenGL version: 1.3.4582 WinXP Release
OpenGL extensions:
    GL_ARB_multitexture
    GL_EXT_texture_env_add
    GL_EXT_compiled_vertex_array
    [... and many more ...]


Using JSR-231 from http://www.wurmonline.com/newclient/ :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
----------------
OpenGL information:
----------------
JOGL version: 1.0.0-beta4
OpenGL vendor: Microsoft Corporation
OpenGL renderer: GDI Generic
OpenGL version: 1.1.0
OpenGL extensions:
    GL_WIN_swap_hint
    GL_EXT_bgra
    GL_EXT_paletted_texture


The later one loads JSR-231 from the jnlp using the following line:
<extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" />

Obviously, it's kinda hard to play the game using the horrible software opengl implementation. ;-)

Is there anything I can do to fix this?

Play Minecraft!
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2006-05-02 16:19:36 »

What are the GLCapabilities you're requesting? What happens if you use the default GLCapabilities? Are you using the DefaultGLCapabilitiesChooser or your own?

Can you run the game standalone rather than via Java Web Start? Or specify -Djogl.debug.DefaultGLCapabilitiesChooser via your JNLP file?
Offline Markus_Persson

JGO Wizard


Medals: 15
Projects: 19


Mojang Specifications


« Reply #2 - Posted 2006-05-02 17:02:26 »

Ah, interesting.

I was doing this:
1  
2  
3  
4  
5  
6  
        GLCapabilities glCaps = new GLCapabilities();
        glCaps.setRedBits(8);
        glCaps.setBlueBits(8);
        glCaps.setGreenBits(8);
        glCaps.setAlphaBits(8);
        glCaps.setDepthBits(16);


Would setting "glCaps.setHardwareAccelerated(true);" make it never ever return the software one?

Play Minecraft!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #3 - Posted 2006-05-02 17:59:35 »

No, the hardware accelerated bit is only set (on some platforms) for GLCapabilities provided to the chooser as an advisory measure, but it isn't robust enough to be used. It's ignored on GLCapabilities passed in when determining the window system's recommended choice.

Where do you stand at this point? If you avoid touching the GLCapabilities do you get hardware acceleration? I suspect touching the number of depth bits may be causing your problem. The default there is 24 bits.

I'd be surprised there is a behavioral difference here. I suspect the JSR-231 code may be taking a different code path (ChoosePixelFormat) than the old JOGL 1.1 code (wglChoosePixelFormatARB) and that ATI's drivers behave differently with wglChoosePixelFormatARB. Unfortunately it was a memory leak in ATI's drivers which forced us to use ChoosePixelFormat by default when multisampling was not requested.
Offline Markus_Persson

JGO Wizard


Medals: 15
Projects: 19


Mojang Specifications


« Reply #4 - Posted 2006-05-02 20:28:51 »

The behavioral difference most likely comes from the fact that I used my own capabilitieschooser in the old wurm version. ;-)

I tried to get a hold of the guy who had the problems, but it was very difficult to run proper tests. Undecided

Anyway, does the GLCapabilitiesChooser try to use exacty 16 bits if you specify that, and not just 16 bits and upwards? If so, how does one say that "I require at least 8 bits stencil buffer", for example?
It's pretty dangerous/bug prone to have a default glcapabilities that reverts to the software implementation if there are better hardware accelerated ones than what you've specified available..

Ah, well, I'll roll my own chooser again. I'll attach the code for your pleasure (it's kinda wurm specific, but could probably be reused by others with some tweaks:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
package com.wurmonline.client;

import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLCapabilitiesChooser;


public class WurmCapabilitiesChooser implements GLCapabilitiesChooser
{
    public int chooseCapabilities(GLCapabilities desired, GLCapabilities[] available, int systemChoice)
    {
        int chosen = systemChoice;
        for (int i = 0; i < available.length; i++)
        {
            if (isBetter(available[chosen], available[i])) chosen = i;
        }
        return chosen;
    }

    private boolean isBetter(GLCapabilities oldCaps, GLCapabilities newCaps)
    {
        if (newCaps==null) return false;
        if (oldCaps==null) return true;

        // ALWAYS trade to hardware acceleration and double buffering if possible
       if (!oldCaps.getHardwareAccelerated() && newCaps.getHardwareAccelerated()) return true;
        if (!oldCaps.getDoubleBuffered() && newCaps.getDoubleBuffered()) return true;
       
        // NEVER trade from hardware acceleration and double buffering if possible
       if (oldCaps.getHardwareAccelerated() && !newCaps.getHardwareAccelerated()) return false;
        if (oldCaps.getDoubleBuffered() && !newCaps.getDoubleBuffered()) return false;
       
        if (newCaps.getDepthBits()>oldCaps.getDepthBits()) return true;
        if (newCaps.getRedBits()>oldCaps.getRedBits()) return true;
        if (newCaps.getGreenBits()>oldCaps.getGreenBits()) return true;
        if (newCaps.getBlueBits()>oldCaps.getBlueBits()) return true;
        if (newCaps.getAlphaBits()>oldCaps.getAlphaBits()) return true;
        if (newCaps.getStencilBits()>oldCaps.getStencilBits()) return true;
        return false;
    }
}



Play Minecraft!
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #5 - Posted 2006-05-02 21:34:01 »

I have a 9200, if you would like me to test the new configuration, i'd be more than happy to; just drop me a PM.

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #6 - Posted 2006-05-02 21:39:08 »

In general the capabiliites requested are used as a minimum specification. By default JOGL just uses whatever the window system-specific pixel format selection algorithm returns; on Windows this uses ChoosePixelFormat, on X11 platforms glXChooseVisual, and Mac OS X the NSOpenGLPixelFormat allocation routine.
Offline Markus_Persson

JGO Wizard


Medals: 15
Projects: 19


Mojang Specifications


« Reply #7 - Posted 2006-05-03 07:15:29 »

Ah, I see. That makes sense. :-)

Play Minecraft!
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.

Dwinin (21 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (66 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (54 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (28 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
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!