using glMatrixMode and
glScalef to scale texture coordinates before you start drawing. That
would save two divisions per vertex.
--
Alistair Buxton
[EMAIL PROTECTED]
Here it is. I didn't spend any time making this code nice, but you can
just rip out the parts you need.
2008/5/8 Alistair Buxton [EMAIL PROTECTED]:
I have a full example of doing exactly this task using python to
render to a series of png images (which you can load into something
like adobe
are very similar to those of rect and ellipse, with
just 2 extra parameters: xr and yr, which are the radius of the corner
ellipses in x and y respectively. It should respect the current clip
region if there is one, and restore it afterwards - but I have not
tested this.
--
Alistair Buxton
[EMAIL
arguments, a rect with width 1 is larger
than it's input rect, while an ellipse is always bounded by it's input
rect, with the width being used to shrink the inner radius. It seems
strange, you would think they would behave the same.
--
Alistair Buxton
[EMAIL PROTECTED]
/Depth_of_field
(3) http://graphics.cs.lth.se/research/shadows/
--
Alistair Buxton
[EMAIL PROTECTED]
the shadows into the framebuffer, then
copies the result to a texture. This means that if the shadow texture
is larger than the framebuffer, some parts of it won't be drawn.
--
Alistair Buxton
[EMAIL PROTECTED]
.
--
Alistair Buxton
[EMAIL PROTECTED]
the
shadow texture will be stretched. Turning on filtering for the shadow
texture should also help a bit.
--
Alistair Buxton
[EMAIL PROTECTED]
scenes.
--
Alistair Buxton
[EMAIL PROTECTED]
file-type' error
It always helps if you say where an exception occurs. Pasting the
traceback is good.
douglas
--
- PyMike
--
- PyMike
--
Alistair Buxton
[EMAIL PROTECTED]
bit bitmaps and converting them to 8 bit, and
imageop.mono2grey is fine for this. Unfortunately it would be much
less useful for sound without the ability to check mixer format, so if
anyone can solve that problem, I'll try to code from_buffer for
sounds.
--
Alistair Buxton
[EMAIL PROTECTED]
but if I don't post a patch within a couple of
days it probably means I've given up...
--
Alistair Buxton
[EMAIL PROTECTED]
the previous code returns on error. Correct? So I'm
guessing this is already WIP by somebody :)
--
Alistair Buxton
[EMAIL PROTECTED]
totally understand this now, but we will see when I try to
actually use it. I don't need to modify the sound after loading it so
I should have everything I need.
--
Alistair Buxton
[EMAIL PROTECTED]
subversion code.
Demo script and patch are attached.
--
Alistair Buxton
[EMAIL PROTECTED]
from struct import unpack
from imageop import mono2grey, scale
import pygame
from pygame.locals import *
pygame.init()
sx,sy = 320,320
screen = pygame.display.set_mode((sx,sy))
# 8x8
15 matches
Mail list logo