Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075919 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 03:33:48 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Point sprites, resolution, sound, insanity
Pages: [1]
Print
Author Topic: Point sprites, resolution, sound, insanity  (Read 652 times)
Pishtaco
Level 10
*****



View Profile WWW
« on: September 17, 2010, 11:33:24 PM »

This is in D (which you can think of as C++ with bad library support and a fragmented community) on an ATI radeon mobility 9700. I'm using the derelict libary in D for opengl etc., but otherwise the engine is written from scratch.

I'm using point sprites for various particle effects. When they work, they should look like this:

The sprites are the gunsmoke. Also, you can't really see it in this screenshot, but there are a few thousand almost transparent particles randomly scattered around to make the atmosphere look thicker. These are point sprites with a plain circle texture on them, drawn using shaders. At one stage I was using opengl points, but I switched to the sprites because they were actually faster (and I was worried the points would just show as squares on some computers).

A couple of months ago, the game stopped working unless I ran it windowed or at desktop resolution. This was annoying, as it's meant to run at 640x400. What was doubly annoying was that I had a recent backup in another directory, which still worked, but which stopped working when I renamed it to turn it into my working project. However this may simply be me being crazy; I haven't been able to reproduce this recently. Anyway, it's now time to fix this. At the moment, the game works if I do any one of the following:

It works if I run it windowed or at desktop resolution (1280x800).

It works if I disable all sound and music (I'm using OpenAL and SDLMixer, respectively, for these).

It works if I comment out the line "glEnable(GL_POINT_SPRITE_ARB);". But it runs about 5ms per frame slower and my particles turn square.

Does anyone have any suggestions about what I can do? I vaguely recall reading in a couple of other places about problems with ATI point sprites. Should I give up and use billboarded quads instead?
« Last Edit: September 18, 2010, 12:47:13 AM by Pishtaco » Logged

biino
Guest
« Reply #1 on: September 18, 2010, 04:45:13 AM »

Hey,

Sorry I don't know any work around you can try. I used gDebugger demo at work recently and it was helpful, perhaps it could help you?

I've also heard the same thing regarding point sprites and ATI cards. There's a lot of discussion to be found Googling it. Most of it indicating they're broken with ATI.

You're video card is pretty old, I'm happy to test your program on my PC as a sanity check, if you want. I'm running a Nvidia 280GTX.

Bino
Logged
Pishtaco
Level 10
*****



View Profile WWW
« Reply #2 on: September 18, 2010, 05:29:21 AM »

Now it works! Beer!

Thanks for your post! It encouraged me to have a google for discussions of the ATI problem, and one of them gave me an idea. I bound glEnable(GL_POINT_SPRITE_ARB) to a key, and found that activating it in the middle of the game worked with no problems. So I moved it to after the first frame was rendered, and now we're in business.

Hand Metal Left Wizard Hand Metal Right
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic