GameFoundry / bsf

Modern C++14 library for the development of real-time graphical applications
https://www.bsframework.io
MIT License
1.74k stars 195 forks source link

way to enable vertex program point size with gl renderer #396

Open underdoeg opened 5 years ago

underdoeg commented 5 years ago

Is there a way to enable GL_VERTEX_PROGRAM_POINT_SIZE within the opengl renderer?

BearishSun commented 5 years ago

I don't believe this is supported.

You should ask questions on discourse.bsframework.io, github issues are reserved for bugs and feature requests as per contribution guidelines.

underdoeg commented 5 years ago

It is some sort of feature request. But yes, there probably isnt an implementation that would work for all render APIs.

BearishSun commented 5 years ago

Re-opening as a feature request. I'm not sure how well is this feature supported on modern hardware and render backends? I feel like I remember most modern hardware don't support varying point sizes, but I might be misremembering.

underdoeg commented 5 years ago

AFAIK the implementation is vendor dependent though all of them support it in some way or another. what is not defined is the max allowed point size. But it is part of the official opengl standart.

A little off topic but somewhat related. I usually use it to easily generate billboard point sprites. what method would you recommend with bsf?

BearishSun commented 5 years ago

It's probably easiest to use instanced rendering to draw the quads, potentially with a custom vertex shader to control the size and orient them towards the view.

Particle system might also be able to handle this out of the box, or at least with a custom shader.

underdoeg commented 5 years ago

i'll probably have to implement something like that at some point. FYI we develop software for clients that run on a single device. That's why we get away with using things like point size and don't worry about it.