Nugget
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
psyqo::Prim::MaskControl Struct Reference

The MaskControl primitive. More...

#include <psyqo/primitives/control.hh>

Public Types

enum  Set { FromSource , ForceSet }
 
enum class  Test { No , Yes }
 

Public Member Functions

 MaskControl ()
 
 MaskControl (Set set, Test test)
 
 MaskControl (Test test, Set set)
 
 MaskControl (Set set)
 
 MaskControl (Test test)
 
MaskControlset (Set set)
 
MaskControlset (Test test)
 
MaskControlset (Set set, Test test)
 
MaskControlset (Test test, Set set)
 

Detailed Description

The MaskControl primitive.

This primitive will control the masking of the drawing area. Masking on the GPU is used to prevent drawing in certain areas of the screen. It can be used to create and use a sort of stencil buffer. When the mask is set to ForceSet, the "stencil buffer" will be set to 1, and when it's set to FromSource, it will be set to the value read from the source texel, knowing it is bit 15 of the texel or the CLUT used by the texture. Texture-less primitives will set the stencil buffer to 0 in this mode, effectively allowing subsequent drawings in the area. The mask can also be set to test the stencil buffer, and only draw if the stencil buffer is set to 0. The mechanism used here can be a little bit counter-intuitive compared with modern hardware, but it's the way the PS1 GPU works.

Member Enumeration Documentation

◆ Set

Enumerator
FromSource 
ForceSet 

◆ Test

enum class psyqo::Prim::MaskControl::Test
strong
Enumerator
No 
Yes 

Constructor & Destructor Documentation

◆ MaskControl() [1/5]

psyqo::Prim::MaskControl::MaskControl ( )
inline

◆ MaskControl() [2/5]

psyqo::Prim::MaskControl::MaskControl ( Set  set,
Test  test 
)
inline

◆ MaskControl() [3/5]

psyqo::Prim::MaskControl::MaskControl ( Test  test,
Set  set 
)
inline

◆ MaskControl() [4/5]

psyqo::Prim::MaskControl::MaskControl ( Set  set)
inline

◆ MaskControl() [5/5]

psyqo::Prim::MaskControl::MaskControl ( Test  test)
inline

Member Function Documentation

◆ set() [1/4]

MaskControl & psyqo::Prim::MaskControl::set ( Set  set)
inline

◆ set() [2/4]

MaskControl & psyqo::Prim::MaskControl::set ( Set  set,
Test  test 
)
inline

◆ set() [3/4]

MaskControl & psyqo::Prim::MaskControl::set ( Test  test)
inline

◆ set() [4/4]

MaskControl & psyqo::Prim::MaskControl::set ( Test  test,
Set  set 
)
inline

The documentation for this struct was generated from the following file: