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 TypeMethodDescriptionvoidbindIndexBuffer(@NonNull @RawPtr GLBuffer buffer) Set element buffer (index buffer).booleanbindTextures(GLCommandBuffer commandBuffer, ImageViewProxy[] geomTextures) Deprecated.booleanbindUniforms(GLCommandBuffer commandBuffer, int width, int height) Deprecated.voidbindVertexBuffer(int binding, @NonNull @RawPtr GLBuffer buffer, long offset) Set the buffer that stores the attribute data.protected voidOverride this method to invoke de-allocation of the underlying resource.voiddiscard()protected GLDevicebyte@Nullable GLProgram@Nullable GLVertexArrayintintgetVertexInputRate(int binding) intgetVertexStride(int binding)
-
Method Details
-
discard
public void discard() -
deallocate
protected void deallocate()Description copied from class:RefCntOverride this method to invoke de-allocation of the underlying resource.- Specified by:
deallocatein classRefCnt
-
getProgram
-
getVertexArray
-
bindUniforms
Deprecated. -
bindTextures
@Deprecated public boolean bindTextures(GLCommandBuffer commandBuffer, 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:
getDevicein classManagedResource
-