Software & Hardware

Started by nailian, January 19, 2010, 11:56:41 AM

Previous topic - Next topic

nailian

Is it possible to do 2 renderings at the same time?

Drawing 2 different Framebuffers. One with Hardware and one with software rendering?

EgonOlsen

Yes, you can either draw the world multiple times into different frame buffers or enable the OpenGL renderer without disabling the software one. That way, the scene should be rendered using both renderers and because the target is different (image buffer for software, a native window or a canvas for OpenGL), this can be done with one buffer....in theory. In practice, i've never tried this in the last few years. However, support for doing it should still be in.
Anyway, you have to consider some things when using either way: The performance of the OpenGL renderer will suffer, because it will be limited by software renderer's performance. And you may run into problems when using compile() on objects that should be rendered with the software renderer.
May i ask what the purpose is?

nailian

I needed to draw 2 worlds at the same time. And that did not work, so i assumend it would work if i used hardware and software rendering at the same time.

Java console gave me a facepalm...  >:(

I solved it somehow by drawing one world at a time using both hardware rendering.

EgonOlsen

I'm not sure, if i got this right: Two worlds into ONE buffer or two worlds into TWO buffers?

nailian

Two worlds into two buffers.

Now im getting this if i rotate the camera:




And im clearing my buffer.

Thnx in advance  :)




EgonOlsen

It shouldn't be a problem to do this. Worlds and buffers should be independent from each each and their counterparts. Can you post the part of your code that does the clearing/rendering?

nailian

Just found the cause of my rendering problem.

I narrowed it done by disabeling the config settings one by one.
And it seems that setting the indoor property to true was causing this for me.


private void doConfig()
{

Config.maxPolysVisible = 64000;
Config.saveMemory = true;
Config.collideOffset = 500;
Config.glTrilinear = true;
Config.farPlane = 10000;
//Config.isIndoor = true; <---------------------------
Config.glVertexArrays = true;
Config.tuneForIndoor();
Config.zTrick = true;
Config.glShadowZBias = 0.8f;
Config.lightMul = 1;

}


Thnx for your replys!  :)

EgonOlsen

Yes. That's why the docs say: "Enables some optimizations for indoor scenes (like not clearing the framebuffer for every frame). Should be enabled if indoor rendering is performed.".. ;)

nailian

I am new to this learning every day. thnx for your fast replys !!