Software only rendering

Hi,

I think I’ve read once on a OpenGL forum that it’s possible to make OpenGL to do software rendering instead of hardware accelerated. By asking OpenGL to give a window with more bpp for the frame or z buffer or whatever than it actually has got.

Is this possible? Or does my memory serve my wrong…

If it’s possible: how would it be possible to activate this in Xith3d?

Hi,

Some time ago I added to JOGL-based RenderPeerImpl a method that can accepl JOGL GLCapabilities as a parameter, so you can specify buffer structure and some other aspects of GL context to be used for rendering in your app. GLCapabilities have peoperty named “hardwareAccelerated” which you can set using setHardareAccelerated(boolean). This looks like right way on how to turn HW accel off, but I never tested that.

Yuri

Not sure if this is your question - but I have a laptop which does software rendering in linux but that is because it has a hopeless graphics card and so I had to install the Mesa software drivers.

The good thing is that Mesa is a very faithful implementation of OpenGL and it’s 1.4 so everything is there.

This has nothing to do with JOGL however - just my drivers.

Will.

[quote]Hi,
Some time ago I added to JOGL-based RenderPeerImpl a method that can accepl JOGL GLCapabilities as a parameter, so you can specify buffer structure and some other aspects of GL context to be used for rendering in your app. GLCapabilities have peoperty named “hardwareAccelerated” which you can set using setHardareAccelerated(boolean). This looks like right way on how to turn HW accel off, but I never tested that.
[/quote]
Hi Yuri, hi all. Thanks for that hint. That sounds like the method I have to use.
Unfortunately it doesn’t seem to work. However I remember that some time ago I tried this with pure JOGL, too, and it didn’t work either. So I guess there’s some problem with JOGL not using that setHardwareAcceleratred(false) flag…?

In Xith3d I tried to use it in the following way:


GLCapabilities gc = new GLCapabilities();
gc.setHardwareAccelerated(false);
   
RenderPeerImpl renderpeer = new RenderPeerImpl();
CanvasPeer canvaspeer = renderpeer.makeCanvas(frame, width, height, 32, false, gc);
...

[quote]Not sure if this is your question - but I have a laptop which does software rendering in linux but that is because it has a hopeless graphics card and so I had to install the Mesa software drivers.

The good thing is that Mesa is a very faithful implementation of OpenGL and it’s 1.4 so everything is there.

This has nothing to do with JOGL however - just my drivers.
[/quote]
Hi Will. What I am looking for is to disable the hardware rendering of a fully OpenGL 1.3++ capable graphics cards for testing purposes. Yuri’s mentioned method looks to be the one but there’s a problem with JOGL (or OpenGL?) I suppose.

You can put this in your XF86Config-4:

Option "NoAccel" "TRUE"

However, I don’t know if your driver understands this.

It should work also on Windows…

Xith3D does not control explicitly the HW accel - this is up to underlying subsystems (i.e. JOGL, OpenGL core, drivers, card…). setHardwareAccelerated(false) should be correct way of how to disable HW accel, but there are some restrictions:

  1. JOGL uses GLCapabilitiesChooser that decides which mode actually should be used and treats GLCapabilities just as hints. This is very porbable but not guaranteed that you will get exactly config you requested.

  2. Some contexts may even not supply at all software-only modes (I never see such case in practice, but in theory it may happen).

As a possible solution I can suggest you to check which mode actually chosen by JOGL (OK, I modified JOGL a bit to be able to see this) and maybe implement your own CapabilitiesChooser, so you have full control over this process.

If you will need to pass your CapabilitiesChooser to Xith3D context creation code I can easily add this.

Yuri

Adding the ability to pass through a capabilities chooser would be a nice add.

However, isn’t that going to break the abstraction of the rendering layer since its only useful in a JOGL world?

Or is this just going to be an addendum that you don’t use if you’re using anything other than JOGL?

Kev

GLCapabilities, as well as in future CapabilitiesChooser, exposed only for JOGL Renderer Implementation. They are not part of generic Xith3D abstraction layer.

So if you [typically for now] create instance of GOGL Renderer explicitly, you can use them because of you anyway dealing with JOGL-specific stuff (read: renderer).

In future, if unified renderer creation mechanism will be introduced, there will be no direct access to these JOGL-specific classes, but maybe kind of hints for renderer creation code that may be used (or ignored) by actual implementation.

Yuri