Strange problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
utunnels
Posts: 37
Joined: Thu Apr 05, 2012 2:52 pm

Strange problem

Post by utunnels »

I'm using 1.7.3.

I created a camera at (128,0,0) looking at (0,0,0). I then added a textured rectangle (or 2 triangles) near the center of the screen.

Problems is, if I scale (or change the vertices) the rectangle to make part of it fall out of the screen area, the entire rectangle will disappear.

Any idea?


The positions and indices are like this (using drawVertexPrimitiveList):

verts:
{pos[0.000000,0.000000,0.000000], uv[0.000000, 0.000000]}
{pos[0.000000,10.000000,0.000000], uv[0.000000, 0.990000]}
{pos[0.000000,0.000000,-40.000000], uv[0.990000, 0.000000]}
{pos[0.000000,10.000000,-40.000000], uv[0.990000, 0.990000]}

indices: 3, 1, 0, 0, 2, 3,


There doesn't seems to be serious problems because when the rect is small enough it just shows correctly.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Strange problem

Post by hybrid »

Seems like you're using the sw renderer, which does not support clipping. So everything needs to stay within the screen. Just use a different renderer when creating the device.
utunnels
Posts: 37
Joined: Thu Apr 05, 2012 2:52 pm

Re: Strange problem

Post by utunnels »

Ah, thank you. I'll try another (now running that on a virtual machine so software causes less problems).
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Strange problem

Post by Mel »

Burnings Video is another software renderer
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply