Merge pull request #3376 from ReinUsesLisp/point-sprite
gl_rasterizer: Implement GL_POINT_SPRITE
This commit is contained in:
commit
37f1cf8cbd
4 changed files with 9 additions and 1 deletions
|
@ -1220,6 +1220,7 @@ void RasterizerOpenGL::SyncPointState() {
|
|||
// Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid
|
||||
// in OpenGL).
|
||||
state.point.program_control = regs.vp_point_size.enable != 0;
|
||||
state.point.sprite = regs.point_sprite_enable != 0;
|
||||
state.point.size = std::max(1.0f, regs.point_size);
|
||||
}
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ void OpenGLState::ApplyClipDistances() {
|
|||
|
||||
void OpenGLState::ApplyPointSize() {
|
||||
Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control);
|
||||
Enable(GL_POINT_SPRITE, cur_state.point.sprite, point.sprite);
|
||||
if (UpdateValue(cur_state.point.size, point.size)) {
|
||||
glPointSize(point.size);
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ public:
|
|||
|
||||
struct {
|
||||
bool program_control = false; // GL_PROGRAM_POINT_SIZE
|
||||
bool sprite = false; // GL_POINT_SPRITE
|
||||
GLfloat size = 1.0f; // GL_POINT_SIZE
|
||||
} point;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue