Sign in to follow this  
Followers 0
justin12343

OpenGL
Porting point sprites from DirectX

2 posts in this topic

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.

0

Share this post


Link to post
Share on other sites

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
0

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!
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0