Class VkPipelineRasterizationStateCreateInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkPipelineRasterizationStateCreateInfo
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying parameters of a newly created pipeline rasterization state.
    Description

    The application can also add a VkPipelineRasterizationStateRasterizationOrderAMD structure to the pNext chain of a VkPipelineRasterizationStateCreateInfo structure. This structure enables selecting the rasterization order to use when rendering with the corresponding graphics pipeline as described in Rasterization Order.

    Valid Usage
    Valid Usage (Implicit)
    See Also

    VkGraphicsPipelineCreateInfo

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • flags – reserved for future use.
    • depthClampEnable – controls whether to clamp the fragment’s depth values as described in Depth Test. If the pipeline is not created with VkPipelineRasterizationDepthClipStateCreateInfoEXT present then enabling depth clamp will also disable clipping primitives to the z planes of the frustrum as described in Primitive Clipping. Otherwise depth clipping is controlled by the state set in VkPipelineRasterizationDepthClipStateCreateInfoEXT.
    • rasterizerDiscardEnable – controls whether primitives are discarded immediately before the rasterization stage.
    • polygonMode – the triangle rendering mode. See VkPolygonMode.
    • cullMode – the triangle facing direction used for primitive culling. See VkCullModeFlagBits.
    • frontFace – a VkFrontFace value specifying the front-facing triangle orientation to be used for culling.
    • depthBiasEnable – controls whether to bias fragment depth values.
    • depthBiasConstantFactor – a scalar factor controlling the constant depth value added to each fragment.
    • depthBiasClamp – the maximum (or minimum) depth bias of a fragment.
    • depthBiasSlopeFactor – a scalar factor applied to a fragment’s slope in depth bias calculations.
    • lineWidth – the width of rasterized line segments.

    Layout

    
     struct VkPipelineRasterizationStateCreateInfo {
         VkStructureType sType;
         void const * pNext;
         VkPipelineRasterizationStateCreateFlags flags;
         VkBool32 depthClampEnable;
         VkBool32 rasterizerDiscardEnable;
         VkPolygonMode polygonMode;
         VkCullModeFlags cullMode;
         VkFrontFace frontFace;
         VkBool32 depthBiasEnable;
         float depthBiasConstantFactor;
         float depthBiasClamp;
         float depthBiasSlopeFactor;
         float lineWidth;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, FLAGS, DEPTHCLAMPENABLE, RASTERIZERDISCARDENABLE, POLYGONMODE, CULLMODE, FRONTFACE, DEPTHBIASENABLE, DEPTHBIASCONSTANTFACTOR, DEPTHBIASCLAMP, DEPTHBIASSLOPEFACTOR, LINEWIDTH

        The struct member offsets.
    • Constructor Detail

      • VkPipelineRasterizationStateCreateInfo

        public VkPipelineRasterizationStateCreateInfo​(java.nio.ByteBuffer container)
        Creates a VkPipelineRasterizationStateCreateInfo instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • sType

        public int sType()
        Returns the value of the sType field.
      • pNext

        public long pNext()
        Returns the value of the pNext field.
      • flags

        public int flags()
        Returns the value of the flags field.
      • depthClampEnable

        public boolean depthClampEnable()
        Returns the value of the depthClampEnable field.
      • rasterizerDiscardEnable

        public boolean rasterizerDiscardEnable()
        Returns the value of the rasterizerDiscardEnable field.
      • polygonMode

        public int polygonMode()
        Returns the value of the polygonMode field.
      • cullMode

        public int cullMode()
        Returns the value of the cullMode field.
      • frontFace

        public int frontFace()
        Returns the value of the frontFace field.
      • depthBiasEnable

        public boolean depthBiasEnable()
        Returns the value of the depthBiasEnable field.
      • depthBiasConstantFactor

        public float depthBiasConstantFactor()
        Returns the value of the depthBiasConstantFactor field.
      • depthBiasClamp

        public float depthBiasClamp()
        Returns the value of the depthBiasClamp field.
      • depthBiasSlopeFactor

        public float depthBiasSlopeFactor()
        Returns the value of the depthBiasSlopeFactor field.
      • lineWidth

        public float lineWidth()
        Returns the value of the lineWidth field.
      • set

        public VkPipelineRasterizationStateCreateInfo set​(int sType,
                                                          long pNext,
                                                          int flags,
                                                          boolean depthClampEnable,
                                                          boolean rasterizerDiscardEnable,
                                                          int polygonMode,
                                                          int cullMode,
                                                          int frontFace,
                                                          boolean depthBiasEnable,
                                                          float depthBiasConstantFactor,
                                                          float depthBiasClamp,
                                                          float depthBiasSlopeFactor,
                                                          float lineWidth)
        Initializes this struct with the specified values.
      • malloc

        public static VkPipelineRasterizationStateCreateInfo malloc()
        Returns a new VkPipelineRasterizationStateCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static VkPipelineRasterizationStateCreateInfo calloc()
        Returns a new VkPipelineRasterizationStateCreateInfo instance allocated with memCalloc. The instance must be explicitly freed.
      • callocStack

        public static VkPipelineRasterizationStateCreateInfo callocStack()
        Returns a new VkPipelineRasterizationStateCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VkPipelineRasterizationStateCreateInfo mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkPipelineRasterizationStateCreateInfo instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static VkPipelineRasterizationStateCreateInfo callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkPipelineRasterizationStateCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nsType

        public static int nsType​(long struct)
        Unsafe version of sType().
      • npNext

        public static long npNext​(long struct)
        Unsafe version of pNext().
      • nflags

        public static int nflags​(long struct)
        Unsafe version of flags().
      • ndepthClampEnable

        public static int ndepthClampEnable​(long struct)
        Unsafe version of depthClampEnable().
      • nrasterizerDiscardEnable

        public static int nrasterizerDiscardEnable​(long struct)
        Unsafe version of rasterizerDiscardEnable().
      • npolygonMode

        public static int npolygonMode​(long struct)
        Unsafe version of polygonMode().
      • ncullMode

        public static int ncullMode​(long struct)
        Unsafe version of cullMode().
      • nfrontFace

        public static int nfrontFace​(long struct)
        Unsafe version of frontFace().
      • ndepthBiasEnable

        public static int ndepthBiasEnable​(long struct)
        Unsafe version of depthBiasEnable().
      • ndepthBiasConstantFactor

        public static float ndepthBiasConstantFactor​(long struct)
        Unsafe version of depthBiasConstantFactor().
      • ndepthBiasClamp

        public static float ndepthBiasClamp​(long struct)
        Unsafe version of depthBiasClamp().
      • ndepthBiasSlopeFactor

        public static float ndepthBiasSlopeFactor​(long struct)
        Unsafe version of depthBiasSlopeFactor().
      • nlineWidth

        public static float nlineWidth​(long struct)
        Unsafe version of lineWidth().
      • nsType

        public static void nsType​(long struct,
                                  int value)
        Unsafe version of sType.
      • npNext

        public static void npNext​(long struct,
                                  long value)
        Unsafe version of pNext.
      • nflags

        public static void nflags​(long struct,
                                  int value)
        Unsafe version of flags.
      • ndepthClampEnable

        public static void ndepthClampEnable​(long struct,
                                             int value)
        Unsafe version of depthClampEnable.
      • nrasterizerDiscardEnable

        public static void nrasterizerDiscardEnable​(long struct,
                                                    int value)
        Unsafe version of rasterizerDiscardEnable.
      • npolygonMode

        public static void npolygonMode​(long struct,
                                        int value)
        Unsafe version of polygonMode.
      • ncullMode

        public static void ncullMode​(long struct,
                                     int value)
        Unsafe version of cullMode.
      • nfrontFace

        public static void nfrontFace​(long struct,
                                      int value)
        Unsafe version of frontFace.
      • ndepthBiasEnable

        public static void ndepthBiasEnable​(long struct,
                                            int value)
        Unsafe version of depthBiasEnable.
      • ndepthBiasConstantFactor

        public static void ndepthBiasConstantFactor​(long struct,
                                                    float value)
        Unsafe version of depthBiasConstantFactor.
      • ndepthBiasClamp

        public static void ndepthBiasClamp​(long struct,
                                           float value)
        Unsafe version of depthBiasClamp.
      • ndepthBiasSlopeFactor

        public static void ndepthBiasSlopeFactor​(long struct,
                                                 float value)
        Unsafe version of depthBiasSlopeFactor.
      • nlineWidth

        public static void nlineWidth​(long struct,
                                      float value)
        Unsafe version of lineWidth.