-
Member
Regular Contributor
Pixel Shader, C++ or Java?
Hi to everyone. It's been a long time since I've posted anything in these forums but my latest activities have brought me back to the kind of programming I love.
I would like to write a pixel shader that would perform some filtering operations on an image. Would there be any difference in speed if I use Java or C++? Since the operations would take place in the graphics card I suppose no, but I just want some more opinions.
-
Senior Member
OpenGL Pro
Re: Pixel Shader, C++ or Java?
Really, there is no difference what programming language you use, the speed of graphics card won't be touched by that :-/ Java is sligtly slower then C++, it's true, but even Quake2 port to Java is almost as fast as original. Don't fall for legends like "C++ is the fastest"
-
Re: Pixel Shader, C++ or Java?
Its most likely that you performance bottleneck will be the fragment processor down on the GPU, and the CPU will be sitting idle waiting for the results, so its highly unlikely that your choice of language to interface with OpenGL will make any performance difference.
If you have a scene with 100's of thousands of seperate objects then you are much more likely to be CPU limited, in which case your language choice will be more critical, but even then there isn't a clear cut choice these days.
Robert.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules