Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
March 12, 2010, 09:31:41 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Join our IRC channel: ##psp-programming on freenode
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: Triangle Tesselation  (Read 1062 times)
Vincent
Mudkips
C/C++ Developer
Hero Member
*

Karma: +75/-2
Offline Offline

Posts: 1374
9999999.99 points

View Inventory
Send Money to Vincent

Me and my 'Vette


View Profile WWW
« on: March 06, 2008, 02:11:35 PM »

Are there any triangle tesselation function in the PSPGU library like in OpenGL? I want to be able to tesselate triangles for my viewing frustum, but all the OpenGL examples I found use OpenGL functions that I don't think the PSP supports. I'd like to develop my own software tesselation. Right now, I have a process setup:
1) Setup 6 infinite planes that exist on the border of my perspective view plus a little bit for precision.
2) Transform the planes with the camera
3) Check to see if the planes intersect any of the triangles (somewhat like a mesh-mesh collision)
4) Find the points of intersection
5) Temporarily allocate and add a vertex at the point of intersect and index that vertex into my structure

How would I do step 5? I can't think of any ways of manipulating index arrays. I'd like to be able to write an algorithm that will cut down on the amount of vertices in a model, and generate indices for them, then save it into a file for load-time.
Logged



Insert_Witty_Name
Global Moderator
Hero Member
*

Karma: +148/-17
Offline Offline

Posts: 1602
1141.66 points

View Inventory
Send Money to Insert_Witty_Name

View Profile WWW
« Reply #1 on: March 06, 2008, 02:35:31 PM »

Sounds like the clipping used in Quake.

Grab the source for the PSP Quake port, I'm sure i've seen in it in there.
Logged

Coder formerly known as:

Check out my homebrew & C tutorials at http://insomniac.0x89.org
Last updated 6th Oct 06 - Tutorial 2 added.
Vincent
Mudkips
C/C++ Developer
Hero Member
*

Karma: +75/-2
Offline Offline

Posts: 1374
9999999.99 points

View Inventory
Send Money to Vincent

Me and my 'Vette


View Profile WWW
« Reply #2 on: March 10, 2008, 09:32:44 AM »

I looked through the source and couldn't find it. Would the Suthland-Hodgman algorithm be a good method to use?
Logged

Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.123 seconds with 27 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com