www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: anonymous_reality on May 22, 2012, 01:18:50 pm

Title: drawWireframe() - only drawing top-left quarter
Post by: anonymous_reality on May 22, 2012, 01:18:50 pm
I'm having a problem with drawWireframe(). It's not really an important issue, but it's a weird one.

When using drawWireframe(), the first draw is fine, but any subsequent drawing (like after moving my camera), it's only drawing to the top-left quarter of the frameBuffer (or the buffer is only drawing the top-left quarter to the Graphics object, not sure which).

Drawing normally, (i.e. draw()) is fine.

Any idea why? Is there something I need to do in the setup that you wouldn't normally do?
Title: Re: drawWireframe() - only drawing top-left quarter
Post by: EgonOlsen on May 22, 2012, 01:21:00 pm
Which renderer are you using?
Title: Re: drawWireframe() - only drawing top-left quarter
Post by: anonymous_reality on May 22, 2012, 01:33:43 pm
The software renderer.
Title: Re: drawWireframe() - only drawing top-left quarter
Post by: EgonOlsen on May 22, 2012, 10:44:23 pm
I can't see a reason for this behaviour. The wireframe's will be drawn into the same buffer as the normal rendering and there's no code that i'm aware of that clips it in this way. Please try to do a normal draw-call first and the wireframe-draw right after that. If it's really a problem with the wireframe only, the result should be a normal render with some wireframes in the top left corner only.
Title: Re: drawWireframe() - only drawing top-left quarter
Post by: anonymous_reality on May 29, 2012, 03:40:30 pm
Thanks, it's not really an important issue, I won't be using wireframe other than for testing.

Strangely, the first draw of the WF is fine, it's only once I start moving the camera that it goes wonky. I'll give your suggestion a go!