Vertex Rendering/Rendering Failure: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
Renaming "rendering command" to "drawing command", in accordance with the specification's distinction.
m Bot: Updating section links to use redirects.
Line 10: Line 10:
** Programs from one program object cannot come between two shader stages that are defined by different program object. So if you have program A which has a vertex and fragment shader, you cannot put program B into the pipeline with a geometry shader between them.
** Programs from one program object cannot come between two shader stages that are defined by different program object. So if you have program A which has a vertex and fragment shader, you cannot put program B into the pipeline with a geometry shader between them.
** The number of active [[Sampler (GLSL)|samplers]], [[Image Load Store|images]], [[Uniform Buffer Object|uniform buffers]], and [[Shader Storage Buffer Object|shader storage buffers]] (where applicable) across all images must not [[Shader#Resource limitations|exceed the combined implementation-defined limits]]. This is statically checked by the linker for non-separate programs, but must be render-time checked with program pipelines.
** The number of active [[Sampler (GLSL)|samplers]], [[Image Load Store|images]], [[Uniform Buffer Object|uniform buffers]], and [[Shader Storage Buffer Object|shader storage buffers]] (where applicable) across all images must not [[Shader#Resource limitations|exceed the combined implementation-defined limits]]. This is statically checked by the linker for non-separate programs, but must be render-time checked with program pipelines.
** If a [[Geometry Shader]] and a [[Tessellation Evaluation Shader]] are present and not linked into the same program, the [[Geometry_Shader#Primitive_in.2Fout_specification|GS's input primitive type]] must match the primitive generated by the [[Tessellation_Evaluation_Shader#Abstract_patch_type|TES's patch output type]].
** If a [[Geometry Shader]] and a [[Tessellation Evaluation Shader]] are present and not linked into the same program, the [[Geometry Shader Primitive Specification|GS's input primitive type]] must match the primitive generated by the [[TES Patch Type|TES's patch output type]].
** If a [[Tessellation Control Shader]] is active, a [[Tessellation Evaluation Shader]] must also be active.
** If a [[Tessellation Control Shader]] is active, a [[Tessellation Evaluation Shader]] must also be active.
* Textures used by the current programs' samplers and/or images must be complete.
* Textures used by the current programs' samplers and/or images must be complete.
* If a [[Geometry Shader]] is present, the primitive type fed to the GS must be compatible with the primitive input for the GS. If no TES is active, then the {{param|mode}} primitive type from the drawing command must match.
* If a [[Geometry Shader]] is present, the primitive type fed to the GS must be compatible with the primitive input for the GS. If no TES is active, then the {{param|mode}} primitive type from the drawing command must match.
* If [[Transform Feedback]] is active, the transform feedback mode must match the applicable primitive mode. That mode is determined as follows:
* If [[Transform Feedback]] is active, the transform feedback mode must match the applicable primitive mode. That mode is determined as follows:
** If a [[Geometry Shader]] is active, then the applicable primitive mode is the [[Geometry_Shader#Primitive_in.2Fout_specification|GS's output primitive type]].
** If a [[Geometry Shader]] is active, then the applicable primitive mode is the [[Geometry Shader Primitive Specification|GS's output primitive type]].
** If no GS is active but a [[Tessellation Evaluation Shader]] is active, then the applicable primitive mode is the TES's output primitive type.
** If no GS is active but a [[Tessellation Evaluation Shader]] is active, then the applicable primitive mode is the TES's output primitive type.
** Otherwise, the applicable primitive type is the primitive mode provided to the drawing command.
** Otherwise, the applicable primitive type is the primitive mode provided to the drawing command.

Revision as of 15:01, 12 April 2015

The GL_INVALID_OPERATION error can happen when issuing any drawing command for many reasons, most of which have little to do with the actual drawing command itself. The following represent conditions you must ensure are valid when issuing a drawing command.

This list is not comprehensive. If you know of more, please add them here.