Development question regarding polygon rendering on PSX hardware

PhilPotter

New member
Dear all,

I'm hoping people can clear this up for me. I am developing a PSX emulator as part of my final university module, using a combination of Java and OpenGL 4 - there is a reason for using Java, as part of the module is investigating JIT techniques in Java bytecode. Anyhow, I am currently implementing the GPU using the excellent NOPSX documentation - it mentions that for GP0 polygon commands, the "Polygons are displayed up to <excluding> their lower-right coordinates.". This is what I would like more info on:

(1) Does this apply only to four pointed polygons? (I guess so as a triangle doesn't really have a bottom-right).
(2) Does it apply to the last vertex in the command stream, regardless of coordinates? (so even if in terms of coordinates, it isn't 'bottom-right').
(3) Does it modify the other vertices so that (for example) a rectangle is still a rectangle, just -1 px in width and height?

I can't seem to find definite answers so would appreciate any help. Thanks :)

Regards,
Phil
 

ulaoulao

Controller Man
Staff member
I'd try http://www.gamedev.net , although it is related to emulation, that question is most certainly related to 3d game dev. I have a lot go gaming development experiace and agree that it must refer to 4 point poly's but can not give you in-depth answers in confidence.
 

PhilPotter

New member
Thanks for the replies so far - I've read the OpenGL bible, and it was most helpful in explaining a lot of the math and other things. The issue is not the OpenGL API - I have been getting on ok with that. The problem is that I need to transform the vertices 'before' I send them (or modify them in a shader) in order that the bottom-right coordinate is rendered up to but not including. Just trying to think about the best way of doing that - I have a few ideas like calculating offsets with some basic cos/sin magic. With non-rotated rectangles it is easy because I can just minus one from each axis.
 
Top