| View previous topic :: View next topic |
| Author |
Message |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Mon Nov 07, 2005 3:27 pm Post subject: SVN PSPGL updated |
|
|
I have now updated the SVN PSPGL to include everything in the goop.org PSPGL.
See http://www.goop.org/psp/gl for documentation about PSPGL.
Features:- Lots of standard OpenGL stuff
- Textures cached in VRAM
- Efficient vertex arrays
- Vertex buffer objects
- Hardware-generated mipmaps
- Extensions for beziers and splines
- Extension for skinning
- Performance monitoring
As usual, work in progress, send me bugs, suggestions, etc. |
|
| Back to top |
|
 |
Grom
Joined: 29 Oct 2005 Posts: 21 Location: Russia
|
Posted: Mon Nov 07, 2005 7:51 pm Post subject: |
|
|
You're using a "convert" tool to convert images in samples. But I have no such tool in my WinXP/cygwin system.
I'm not a unix guru, please tell me how to install this tool. |
|
| Back to top |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
|
| Back to top |
|
 |
Grom
Joined: 29 Oct 2005 Posts: 21 Location: Russia
|
Posted: Mon Nov 07, 2005 9:25 pm Post subject: |
|
|
Thanks, rinco!
It works now.
I think, somebody have to upgrade http://wiki.ps2dev.org/psp:programming_faq
and write there about Imagemagick in cygwin installation.
I also found a problem - tests failed to compile because there is no .deps directory in ./tests. I added an empty ".deps" dir there and all started to work.
Last edited by Grom on Tue Nov 08, 2005 1:32 am; edited 1 time in total |
|
| Back to top |
|
 |
Grom
Joined: 29 Oct 2005 Posts: 21 Location: Russia
|
Posted: Mon Nov 07, 2005 9:59 pm Post subject: |
|
|
..And it seems that unmount works improperly in cygwin. make install compiles and copies bezier to my PSP then fails:
| Code: |
while [ ! -d /cygdrive/e/psp/game ]; do mount /cygdrive/e; sleep 1; done
PSP_MOUNTDIR=/cygdrive/e \
../tools/psp-install --psp-revision=1.50 bezier.elf \
--eboot-title="bezier 2005/11/07 14:25:50" --eboot-icon="firefox.png"
install bezier.elf for rev1.50 on '/cygdrive/e/PSP/GAME/bezier/'...
umount /cygdrive/e
umount: /cygdrive/e: No such file or directory
make: *** [install-bezier] Error 1
|
|
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Tue Nov 08, 2005 2:32 am Post subject: |
|
|
| Yeah, that stuff is probably a bit specific to my (linux-based) setup. I'll see if I can clean it up. |
|
| Back to top |
|
 |
Grom
Joined: 29 Oct 2005 Posts: 21 Location: Russia
|
Posted: Tue Nov 15, 2005 2:27 am Post subject: |
|
|
We're trying to render a terrain with texture splatting. And following code doesn't work.
We need to modulate alpha values from texture with alpha values given in vertexes. Then to blend polygons with framebuffer using that alpha value. What are we doing wrong?
We're using latest pspgl from svn repository.
| Code: |
...
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glEnable( GL_TEXTURE_2D );
glDisable( GL_LIGHTING );
glDisable( GL_ALPHA_TEST );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
glEnableClientState( GL_COLOR_ARRAY );
glUnlockArraysEXT() ;
glVertexPointer( 3, GL_FLOAT, sizeof(SMapVertex), &layer.pVertices->pos.x ) );
glTexCoordPointer( 2, GL_FLOAT, sizeof(SMapVertex), layer.pVertices->tex.x );
glNormalPointer( GL_FLOAT, sizeof(SMapVertex), &layer.pVertices->norm.x );
glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(SMapVertex), &layer.pVertices->color );
glLockArraysEXT( 0, layer.nVertCount );
glDrawElements( GL_TRIANGLES, layer.nIndexCount, GL_UNSIGNED_SHORT, layer.pIndices );
glDisableClientState( GL_COLOR_ARRAY );
...
|
|
|
| Back to top |
|
 |
Dev-Express
Joined: 11 Oct 2005 Posts: 5
|
Posted: Tue Nov 15, 2005 2:47 am Post subject: |
|
|
Haven't you missed the pointer in this call ?
glTexCoordPointer( 2, GL_FLOAT, sizeof(SMapVertex), &layer.pVertices->tex.x );
Try this... |
|
| Back to top |
|
 |
Thanhda

Joined: 09 Apr 2005 Posts: 331 Location: Canada
|
Posted: Tue Nov 15, 2005 9:58 am Post subject: |
|
|
| Grom wrote: | We're trying to render a terrain with texture splatting. And following code doesn't work.
We need to modulate alpha values from texture with alpha values given in vertexes. Then to blend polygons with framebuffer using that alpha value. What are we doing wrong?
We're using latest pspgl from svn repository.
| Code: |
...
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glEnable( GL_TEXTURE_2D );
glDisable( GL_LIGHTING );
glDisable( GL_ALPHA_TEST );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
glEnableClientState( GL_COLOR_ARRAY );
glUnlockArraysEXT() ;
glVertexPointer( 3, GL_FLOAT, sizeof(SMapVertex), &layer.pVertices->pos.x ) );
glTexCoordPointer( 2, GL_FLOAT, sizeof(SMapVertex), layer.pVertices->tex.x );
glNormalPointer( GL_FLOAT, sizeof(SMapVertex), &layer.pVertices->norm.x );
glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(SMapVertex), &layer.pVertices->color );
glLockArraysEXT( 0, layer.nVertCount );
glDrawElements( GL_TRIANGLES, layer.nIndexCount, GL_UNSIGNED_SHORT, layer.pIndices );
glDisableClientState( GL_COLOR_ARRAY );
...
|
|
your supose to pass the code into the GLCHK(); function. example
| Code: | | GLCHK(glDisable(GL_STENCIL_TEST)); |
try that. _________________ There are 10 types of people in the world: Those who understand binary, and those who don't... |
|
| Back to top |
|
 |
Thanhda

Joined: 09 Apr 2005 Posts: 331 Location: Canada
|
Posted: Tue Nov 15, 2005 10:19 am Post subject: Re: SVN PSPGL updated |
|
|
| jsgf wrote: | I have now updated the SVN PSPGL to include everything in the goop.org PSPGL.
See http://www.goop.org/psp/gl for documentation about PSPGL.
Features:- Lots of standard OpenGL stuff
- Textures cached in VRAM
- Efficient vertex arrays
- Vertex buffer objects
- Hardware-generated mipmaps
- Extensions for beziers and splines
- Extension for skinning
- Performance monitoring
As usual, work in progress, send me bugs, suggestions, etc. |
cant seem to compile the makefile in the pspgl/test directory.
| Code: | convert firefox.png rgba:firefox.raw
(sym=`echo firefox | tr '-' '_'`; \
echo -e ".data\n.global ${sym}_start\n${sym}_start:\n\t.incbin \"firefox.raw\"" | psp-as -o firefox.o)
make: *** No rule to make target `depthtest.elf', needed by `all'. Stop.
rm firefox.raw |
_________________ There are 10 types of people in the world: Those who understand binary, and those who don't... |
|
| Back to top |
|
 |
Grom
Joined: 29 Oct 2005 Posts: 21 Location: Russia
|
Posted: Tue Nov 15, 2005 6:22 pm Post subject: |
|
|
| Dev-Express wrote: | Haven't you missed the pointer in this call ?
glTexCoordPointer( 2, GL_FLOAT, sizeof(SMapVertex), &layer.pVertices->tex.x );
Try this... |
thanks, but I missed an '&' while posting the code. In project it is where it has to be. |
|
| Back to top |
|
 |
Grom
Joined: 29 Oct 2005 Posts: 21 Location: Russia
|
Posted: Tue Nov 15, 2005 6:22 pm Post subject: Re: SVN PSPGL updated |
|
|
| Thanhda wrote: |
cant seem to compile the makefile in the pspgl/test directory.
| Code: | convert firefox.png rgba:firefox.raw
(sym=`echo firefox | tr '-' '_'`; \
echo -e ".data\n.global ${sym}_start\n${sym}_start:\n\t.incbin \"firefox.raw\"" | psp-as -o firefox.o)
make: *** No rule to make target `depthtest.elf', needed by `all'. Stop.
rm firefox.raw |
|
I have a same problem. |
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Wed Nov 16, 2005 5:49 am Post subject: |
|
|
That fragment looks OK to me. Are any of the calls failing (setting the GL error code)?
What does happen? Does it look OK except the alpha modulation isn't happening, or is it something else? What texture format(s) are you using? Are your vertex colours set to (255,255,255,alpha), or (alpha,alpha,alpha,alpha), or something else? |
|
| Back to top |
|
 |
Grom
Joined: 29 Oct 2005 Posts: 21 Location: Russia
|
Posted: Wed Nov 16, 2005 11:51 pm Post subject: |
|
|
| jsgf wrote: | That fragment looks OK to me. Are any of the calls failing (setting the GL error code)?
What does happen? Does it look OK except the alpha modulation isn't happening, or is it something else? What texture format(s) are you using? Are your vertex colours set to (255,255,255,alpha), or (alpha,alpha,alpha,alpha), or something else? |
We have found that indexed textures don't work with alpha. When we started using .raw RGBA textures, problem dissolved.
New question here:
Is it possible not to multiply alpha values (TEXalpha * VERTEXalpha) but add or substract them (TEXalpha - VERTEXalpha)?
If it is possible, please give a code sample. |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Tue Nov 22, 2005 1:52 am Post subject: |
|
|
Can I add one? (crackpot theory)
The host-chip is replaced by pure software ... is that possible? |
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Tue Nov 22, 2005 3:26 am Post subject: |
|
|
| Grom wrote: | | We have found that indexed textures don't work with alpha. When we started using .raw RGBA textures, problem dissolved. |
Hm, strange. I'm pretty sure that should work, though I can't remember if I've tested it. What texture format and cmap format did you use?
| Quote: | New question here:
Is it possible not to multiply alpha values (TEXalpha * VERTEXalpha) but add or substract them (TEXalpha - VERTEXalpha)?
If it is possible, please give a code sample. |
I don't think so. Muliply seems to be the only option; look at glTexEnv() to see if any of the GL_TEXTURE_ENV_MODEs do what you want. The hardware doesn't seem to have any capability beyond that. |
|
| Back to top |
|
 |
Zenurb
Joined: 30 Sep 2005 Posts: 106 Location: United Kingdom
|
Posted: Tue Nov 22, 2005 11:12 am Post subject: |
|
|
| Arwin wrote: | Can I add one? (crackpot theory)
The host-chip is replaced by pure software ... is that possible? |
Wrong threead? _________________ Proud Dvorak User
US 1.5 PSP (Original) |
|
| Back to top |
|
 |
Podj
Joined: 18 Dec 2005 Posts: 3
|
Posted: Sun Dec 18, 2005 9:00 am Post subject: |
|
|
Grom got further than I got. When I run make install I get:
| Code: |
while [ ! -d /cygdrive/e/psp/game ]; do mount /cygdrive/e; sleep 1; done
PSP_MOUNTDIR=/cygdrive/e \
../tools/psp-install --psp-revision=1.50 bezier.elf \
--eboot-title="bezier 2005/12/17 15:03:16" --eboot-icon="firefox.png"
../tools/psp-install: line 76: file: command not found
--------------------------------------------------------------------------------
no MIPS32-ELF binary, not installing...
-----------------------------------------------------------------------------
|
But make works and the bezier.elf is there. I swear.
Any ideas? |
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Sun Dec 18, 2005 3:12 pm Post subject: |
|
|
| You're missing "file". I think you need to install more cygwin stuff. |
|
| Back to top |
|
 |
|