Package icyllis.arc3d.opengl
Class GLGraphicsPipeline
java.lang.Object
icyllis.arc3d.core.RefCnt
icyllis.arc3d.engine.ManagedResource
icyllis.arc3d.engine.GraphicsPipeline
icyllis.arc3d.opengl.GLGraphicsPipeline
- All Implemented Interfaces:
RefCounted
This class manages a GPU program and records per-program information. It also records the vertex
and instance attribute layouts that are to be used with the program.
This class holds onto a GLProgram
object that we use for draws. Besides storing the actual
GLProgram
object, this class is also responsible handling all uniforms, buffers, samplers,
and other similar objects that are used along with the GLProgram and GLVertexArray in the draw.
This includes both allocating and freeing these objects, as well as updating their values.
Supports OpenGL 3.3 and OpenGL 4.5.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bindIndexBuffer
(@RawPtr GLBuffer buffer) Set element buffer (index buffer).boolean
bindTextures
(GLCommandBuffer commandBuffer, GraphicsPipelineDesc_Old graphicsPipelineDesc, ImageViewProxy[] geomTextures) Deprecated.boolean
bindUniforms
(GLCommandBuffer commandBuffer, GraphicsPipelineDesc_Old graphicsPipelineDesc, int width, int height) Deprecated.void
bindVertexBuffer
(int binding, @RawPtr GLBuffer buffer, long offset) Set the buffer that stores the attribute data.protected void
Override this method to invoke de-allocation of the underlying resource.void
discard()
protected GLDevice
byte
int
int
getVertexInputRate
(int binding) int
getVertexStride
(int binding)
-
Method Details
-
discard
public void discard() -
deallocate
protected void deallocate()Description copied from class:RefCnt
Override this method to invoke de-allocation of the underlying resource.- Specified by:
deallocate
in classRefCnt
-
getProgram
-
getVertexArray
-
bindUniforms
@Deprecated public boolean bindUniforms(GLCommandBuffer commandBuffer, GraphicsPipelineDesc_Old graphicsPipelineDesc, int width, int height) Deprecated. -
bindTextures
@Deprecated public boolean bindTextures(GLCommandBuffer commandBuffer, GraphicsPipelineDesc_Old graphicsPipelineDesc, ImageViewProxy[] geomTextures) Deprecated.Binds all geometry processor and fragment processor textures. -
getPrimitiveType
public byte getPrimitiveType() -
getBlendInfo
-
getDepthStencilSettings
-
getVertexBindingCount
public int getVertexBindingCount() -
getVertexStride
public int getVertexStride(int binding) -
getVertexInputRate
public int getVertexInputRate(int binding) -
bindIndexBuffer
Set element buffer (index buffer).Bind pipeline first.
- Parameters:
buffer
- the element buffer object, raw ptr
-
bindVertexBuffer
Set the buffer that stores the attribute data.The stride, the distance to the next vertex data, in bytes, is determined in constructor.
Bind pipeline first.
- Parameters:
binding
- the binding indexbuffer
- the vertex buffer object, raw ptroffset
- first vertex data to the head of the buffer, in bytes
-
getDevice
- Overrides:
getDevice
in classManagedResource
-