Hi,
What's the fastest method of rendering in pspgl? I've not browsed through the source yet, but I'm assuming vertex arrays? Or does it feature an implentation of vertexbuffer objects? (And if so, are they emulated?)
Reason I ask is cos atm I'm using the highest level rendering possible, tris within glBegin/GlEnd and even on a pretty small model that flies on my pc engine (Whcih is 95% identical code ) crawls the psp.
My main question is though, is it better in the long run to write my rendering code using direct gu? I.e are there much fatest ways of rendering not possible with pspgl? (I'm going to assume yes unless told otherwise, given the great look of some psp games)
pspGL questions (Clipping/Render to Texture)
pspGL questions (Clipping/Render to Texture)
Last edited by Kojima on Sun Jul 23, 2006 9:39 pm, edited 1 time in total.
Ah it's not quite as slow as first expected, I had debug output going to a file every frame, removing that speed it up to a reasonable level, but there's another problem now, clipping. It's a simple room made in Maplet, so I have no control over tri distribution so I'm just wondering if there's anyway of disabling automatic tri clipping/culling etc? Or do I have to subdivide my mesh?
Atm whole areas of the room are culled when the vertices of a tri go off-screen.
Atm whole areas of the room are culled when the vertices of a tri go off-screen.
-
- Posts: 376
- Joined: Wed May 10, 2006 11:31 pm
How would I go about disabling clipping? I'll be using my own frustrum culling on dynamic entities so it's not very important, it may even slow things down depending on how the clipping is done(I.e software or hardware) since it's done on every vertex.
Would it be the GL equilivent of disabling clipping(Not even sure if there is one, never had this problem on a pc)? or do I disable culling with glDisable(GL_CULL_FACE)?
Would it be the GL equilivent of disabling clipping(Not even sure if there is one, never had this problem on a pc)? or do I disable culling with glDisable(GL_CULL_FACE)?
Was also wondering, since it's possible to render directly to a texture using gu (So I read from a thread. Not sure if he was using some code to manually copy a framebuffer render to a texture or not) is it possible in PspGL? I've skimmed through the functions and never saw anything specific to pspgl, but I'd imagine if it's possible in gu, and since pspgl just calls gu funcs anyway, I could add the functionality to pspgl myself? If so, anyone know of a good render to texture example using gu?
Thanks.
Thanks.
I suppose you refer to my latest thread where I wanted to render to a 512x512 texture.Kojima wrote:Was also wondering, since it's possible to render directly to a texture using gu (So I read from a thread. Not sure if he was using some code to manually copy a framebuffer render to a texture or not)
Well, it's pretty easy on GU. Just call sceGuSetDrawBufferList with the address of your offscreen texture and you're ready.
About PSPGL I can't tell you, but I suppose it should work if you just insert that one gu function. You need to call the function again and set it to your framebuffer if you want to render to screen again.
I think it crashes because your code turns up to draw outside the screen then. Have you enabled scissoring? Probably you need to turn up with your own frustum-clipping code.Kojima wrote:I had a look through the gu header and found the only thing related to clipping state was GU_CLIPPING_PLANES
but when I added,
sceGuDisable( GU_CLIP_PLANES );
to my code right before the main loop, it crashed. Any ideas why?
Ah so with clipping disabled you have to do your own to prevent it crashing?
Isn't there no way of just rendering off screen or is it a physical limitation of the hardware/gpu?
Frustrum culling can easily be added but I don't like the idea of having to manually clip everything.
Shouldn't be a problem for the game we're doing though, so may not come up.
Isn't there no way of just rendering off screen or is it a physical limitation of the hardware/gpu?
Frustrum culling can easily be added but I don't like the idea of having to manually clip everything.
Shouldn't be a problem for the game we're doing though, so may not come up.