Jump to content
  • Advertisement
Sign in to follow this  
justin12343

OpenGL Porting point sprites from DirectX

This topic is 2127 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've hit a road block in the development of my OpenGL renderer regarding the size of point sprites. I have been writing the features of my renderers for DirectX first and then I immediately port them to OpenGL after I get them working, since Windows is my primary platform and DirectX seems to be easier to write for (come get it haters lol). I noticed that you can't set the point size for each point sprite individually in OpenGL as you can in DirectX (and OpenGLES), unless you use a shader. My readings tell me that I can cheat using the Z value and distance attenuation to achieve the same effect. My question is  how do I use this to make my point sprites look exactly the same in OpenGL as they would in DirectX? I trying to avoid taking the shader route for this because I want my engine to be able to run on older hardware.

Share this post


Link to post
Share on other sites
Advertisement

I trying to avoid taking the shader route for this because I want my engine to be able to run on older hardware.

Not a direct answer to your question, but I'd strongly urge you to reconsider this. The reason why is: it's now 2012, shaders have been available for over a decade, so: older hardware supports shaders too. In fact, point sprites are an OpenGL 2.0 feature, and OpenGL 2.0 includes shader support, so if you have support for point sprites then you also have support for shaders. Edited by mhagain

Share this post


Link to post
Share on other sites
<blockquote class='ipsBlockquote'data-author="mhagain" data-cid="5013381" data-time="1356177245"><p>
<blockquote class='ipsBlockquote'data-author="justin12343" data-cid="5013246" data-time="1356124157"><p><br />
I trying to avoid taking the shader route for this because I want my engine to be able to run on older hardware.</p></blockquote>
Not a direct answer to your question, but I'd strongly urge you to reconsider this. The reason why is: it's now 2012, shaders have been available for over a decade, so: older hardware supports shaders too. In fact, <a href='http://en.wikipedia.org/wiki/OpenGL#OpenGL_2.0'>point sprites are an OpenGL 2.0 feature, and OpenGL 2.0 includes shader support, so if you have support for point sprites then you also have support for shaders</a>.</p></blockquote>

Then I guess I'll be taking the shader route. Thanks for the reply!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!