Black screen or texture issues on some graphic card

9 views
Skip to first unread message

laetit...@hotmail.fr

unread,
Aug 14, 2010, 8:00:14 PM8/14/10
to Rabbyt
Hello marshall, I hope you can help me.
First of all Rabbyt is awesome. Thanks for creating it. Really. :)

I did a game using it, and most of the people have no problems with
it.
However, some get a black screen (if mipmap is set to False) when
running the game, and it renders only the last texture everywhere.
Like...
If the last texture loaded had a "L" written on it, then "L" would be
rendered at the place of any other texture. I can't find why. The game
seems fluent, though.
I suggered them to set mipmap to True. Here the texture were correctly
rendered, but the game is terribly slow, absolutely unplayable.

Those people had a intel GMA 4500/Ati radeon 9200/Ati Xpress 200m
graphic card. I can tell there is almost 800 tiles of 32px*32px on the
screen being rendered at the same time.

I hope you can help me, or gimme some clue.

Thanks again,

Laetitia

laetit...@hotmail.fr

unread,
Aug 14, 2010, 8:03:16 PM8/14/10
to Rabbyt
oh, i forgot to precise:
all my textures have a power of 2 height and width.

Joseph Marshall

unread,
Aug 14, 2010, 9:10:58 PM8/14/10
to rab...@googlegroups.com
Do you have a custom texture loading hook in place? Or are you using rabbyt's default? And are you using pygame or pyglet?

If you want to maintain compatibility with older video cards also make sure that your textures do not exceed 512x512. I have found some older cards will fail to load textures larger than that.

Joseph

On Sat, Aug 14, 2010 at 7:03 PM, laetit...@hotmail.fr <laetit...@hotmail.fr> wrote:
oh, i forgot to precise:
all my textures have a power of 2 height and width.

--
You received this message because you are subscribed to the Google Groups "Rabbyt" group.
To post to this group, send email to rab...@googlegroups.com.
To unsubscribe from this group, send email to rabbyt+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rabbyt?hl=en.


laetit...@hotmail.fr

unread,
Aug 15, 2010, 5:33:28 AM8/15/10
to Rabbyt
Yes, I have a bigger texture than 512, like the login background.
Thanks for this, i'll change it :)

here is the code to load textures:

def load_pygame_surface(img):
#Convert a pygame surface into a texture

filter = library.config["filter"]
mipmap = library.config["mipmap"]

img.set_colorkey((255, 0, 255));

t = Tex()
t.width, t.height = size = list(img.get_size())
size[0] = next_pow2(size[0])
size[1] = next_pow2(size[1])
t.tex_coords = (0, t.height / size[1], t.width / size[0], 0)

n = pygame.Surface(size, pygame.SRCALPHA | pygame.HWSURFACE)
n.blit(img, (0, size[1] - t.height))

data = pygame.image.tostring(n, 'RGBA', True)
t.id = rabbyt.load_texture(data, size, "RGBA", filter, mipmap)
return t

then I do myRabbytSprite.texture = t

thanks again!

On Aug 15, 3:10 am, Joseph Marshall <marshallpeng...@gmail.com> wrote:
> Do you have a custom texture loading hook in place? Or are you using
> rabbyt's default? And are you using pygame or pyglet?
>
> If you want to maintain compatibility with older video cards also make sure
> that your textures do not exceed 512x512. I have found some older cards will
> fail to load textures larger than that.
>
> Joseph
>
> On Sat, Aug 14, 2010 at 7:03 PM, laetitiak...@hotmail.fr <
>
> laetitiak...@hotmail.fr> wrote:
> > oh, i forgot to precise:
> > all my textures have a power of 2 height and width.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Rabbyt" group.
> > To post to this group, send email to rab...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > rabbyt+un...@googlegroups.com<rabbyt%2Bunsu...@googlegroups.com>
> > .

Joseph Marshall

unread,
Aug 15, 2010, 11:03:38 AM8/15/10
to rab...@googlegroups.com
I can't see off hand anything wrong with it. Perhaps try using this method instead and see if it helps:
(It's similar to your method but caches and uses rabbyts set_load_texture_file_hook function)

To unsubscribe from this group, send email to rabbyt+un...@googlegroups.com.

laetit...@hotmail.fr

unread,
Aug 18, 2010, 6:22:16 AM8/18/10
to Rabbyt
Hello,
I have a function that caches texture already :-)

Here is a little picture to explain the problem visually:
http://i812.photobucket.com/albums/zz48/lethal101/Misc/no.png
We can see that every other textures have been replaced by a white
'no'. (Which is the 'no' of a button in my gui windows)

Would it be possible that the video memory is full?
The people having this problem, when they set mipmap to true, and
reduce the screen to 400x300,
they have much more less lag. (when it's unplayable in 800x600).

Thanks for your consideration.

Laetitia

On Aug 15, 5:03 pm, Joseph Marshall <marshallpeng...@gmail.com> wrote:
> I can't see off hand anything wrong with it. Perhaps try using this method
> instead and see if it helps:http://weblog.arcticpaint.com/2009/05/better-pygame-and-rabbyt-textur...
> <http://weblog.arcticpaint.com/2009/05/better-pygame-and-rabbyt-textur...>(It's
> similar to
> your method but caches and uses rabbyts set_load_texture_file_hook function)
>
> On Sun, Aug 15, 2010 at 4:33 AM, laetitiak...@hotmail.fr <
> > <rabbyt%2Bunsu...@googlegroups.com<rabbyt%252Buns...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages