Jump to content

  • Log In with Google      Sign In   
  • Create Account

Porting point sprites from DirectX


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 justin12343   Members   -  Reputation: 198

Like
0Likes
Like

Posted 21 December 2012 - 03:09 PM

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.



Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 8279

Like
0Likes
Like

Posted 22 December 2012 - 05:54 AM


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, 22 December 2012 - 05:54 AM.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 justin12343   Members   -  Reputation: 198

Like
0Likes
Like

Posted 22 December 2012 - 10:04 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS