Problem with software renderer

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
RenoRosco
Posts: 11
Joined: Sat Sep 15, 2007 7:26 am

Problem with software renderer

Post by RenoRosco »

Hello everybody,

I got some wired problems with the EDT_SOFTWARE and EDT_BURNINGVIDEOS driver tryed to solve this for 2 days now and got no solution.

1st to the EDT_SOFTWARE problem:
I want to a plane under my game to check for collision with my MouseCursor but if one vertex is outside the screen it gets culled whole same with node->setAutomaticCulling(EAC_OFF).
I read through the forums and read that i should use EDT_BURNINGSVIDEO so i did.

EDT_BURNINGSVIDEO problem:
after i changed tho this renderer all textures where scaled up to the number which is the next power of 2. all Button textures won´t fit. If i scale them to a small number of 2 (64x32) the image would be to small and didn´t clamp to the button edges if the texture is to big it gets clipped.
The same happens with my background images.
I knew it is a bit noobisch but how can i fit the smaller / larger textures in the buttons / screen?

Thx 4 help and sry for my english
RenoRosco
Posts: 11
Joined: Sat Sep 15, 2007 7:26 am

Post by RenoRosco »

Hmm dont´t know if this is a bug or why i get moved but i provid some screenshots of the render issue.

Here is a pic of the software renderer (renders the menu well):
EDT_SOFTWARE screenshot

and here is a pic of the burningsvideo renderer where the textures are oversized:
EDT_BURNINGSVIDEO screenshot

and here is the code that renders the background image:

Code: Select all

      

  position2d<s32>tex_pos;
  dimension2d<s32>tex_size=tex->getSize();
  int alpha=255;

  if (center)
  {
      tex_pos.X=(SCREEN_RES_X-tex_size.Height) /2;
      tex_pos.Y=(SCREEN_RES_Y-tex_size.Width) /2;
      if (tex_pos.X < 0) tex_pos.X=0;
      if (tex_pos.Y < 0) tex_pos.Y=0;
  }
  else
  {
    tex_pos.X=0;
    tex_pos.Y=0;
  };

              
 driver->draw2DImage(&(*tex),
                     tex_pos,
                     rect<s32>(0,0,tex_size.Width,tex_size.Height),
                     NULL,
                     SColor(alpha,alpha,alpha,alpha),
                     true);
as mentined before with the software renderer it looks all nice but with BurningsVideo the textures scale up or if i use smaller ones they wouldnt fit the screen or buttons. How can i avoid this or clamp the textures.

or how can i avoid clipping in edt_software mode, EAC_OFF isn´t working for me
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The problem with the software renderer is not culling, hence EAC is no option here. The clipping is just not properly implemented.
The problem with the draw2DImage call is that you use the upscaled size, you should use tex->getOriginalSize() for the rect dimensions.
RenoRosco
Posts: 11
Joined: Sat Sep 15, 2007 7:26 am

Post by RenoRosco »

thx for your answer hybrid

Now i get the original size but i can´t use it correct with draw2DImage it still looks the same ( i only get the upper left part of the texture displayed on screen).
I think now i render just the visible part on the screen but the tex is still overstreched and wont´t fit in my screen or button.
I´m sure there is a way to fit the textures in my sceens and buttons this properly but i got no clue how to do it ot tried it already.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You shoould also try the other drivers (the hw accelerated ones) to see what those are doing. Because usually those also show the correct behavior (i.e. the one to expect)
Post Reply