File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed
src/Graphics/Rendering/OpenGL/GL Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,12 @@ data PrimitiveMode =
82
82
-- 'patchVertices' is set to a value less than or equal to zero or greater
83
83
-- than the implementation-dependent maximum value 'maxPatchVertices'.
84
84
85
- patchVertices :: SettableStateVar GLint
86
- patchVertices = makeSettableStateVar $ glPatchParameteri gl_PATCH_VERTICES
85
+ patchVertices :: StateVar GLsizei
86
+ patchVertices =
87
+ makeStateVar (getSizei1 id GetMaxPatchVertices )
88
+ (glPatchParameteri gl_PATCH_VERTICES . fromIntegral )
87
89
88
90
-- | Contains the maximumum number of vertices in a single patch.
89
91
90
- maxPatchVertices :: GettableStateVar GLint
91
- maxPatchVertices = makeGettableStateVar $ getInteger1 id GetMaxPatchVertices
92
+ maxPatchVertices :: GettableStateVar GLsizei
93
+ maxPatchVertices = makeGettableStateVar $ getSizei1 id GetMaxPatchVertices
Original file line number Diff line number Diff line change @@ -370,8 +370,9 @@ data PName1I
370
370
| GetMaxVertexAttribs -- ^ sizei
371
371
| GetMaxVaryingFloats -- ^ sizei
372
372
-- tessellation
373
- | GetMaxPatchVertices -- ^ int
374
- | GetMaxTessellationLevel -- ^ int
373
+ | GetPatchVertices -- ^ sizei
374
+ | GetMaxPatchVertices -- ^ sizei
375
+ | GetMaxTessGenLevel -- ^ sizei
375
376
-- coordtrans
376
377
| GetMatrixMode -- ^ enum
377
378
| GetModelviewStackDepth -- ^ sizei
@@ -639,8 +640,9 @@ instance GetPName PName1I where
639
640
GetMaxVaryingFloats -> Just gl_MAX_VARYING_COMPONENTS
640
641
GetMaxVertexAttribs -> Just gl_MAX_VERTEX_ATTRIBS
641
642
-- tessellation
643
+ GetPatchVertices -> Just gl_PATCH_VERTICES
642
644
GetMaxPatchVertices -> Just gl_MAX_PATCH_VERTICES
643
- GetMaxTessellationLevel -> Just gl_MAX_TESS_GEN_LEVEL
645
+ GetMaxTessGenLevel -> Just gl_MAX_TESS_GEN_LEVEL
644
646
-- coordtrans
645
647
GetMatrixMode -> Just gl_MATRIX_MODE
646
648
GetModelviewStackDepth -> Just gl_MODELVIEW_STACK_DEPTH
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ module Graphics.Rendering.OpenGL.GL.Shaders.Limits (
16
16
maxVertexTextureImageUnits , maxTextureImageUnits ,
17
17
maxCombinedTextureImageUnits , maxTextureCoords , maxVertexUniformComponents ,
18
18
maxFragmentUniformComponents , maxVertexAttribs , maxVaryingFloats ,
19
- maxTessellationLevel
19
+ maxTessGenLevel
20
20
) where
21
21
22
22
import Graphics.Rendering.OpenGL.GL.StateVar
@@ -79,8 +79,8 @@ maxVaryingFloats = getLimit GetMaxVaryingFloats
79
79
80
80
-- | Contains the maximum allowed tessellation level.
81
81
82
- maxTessellationLevel :: GettableStateVar GLint
83
- maxTessellationLevel = makeGettableStateVar $ getInteger1 id GetMaxTessellationLevel
82
+ maxTessGenLevel :: GettableStateVar GLsizei
83
+ maxTessGenLevel = makeGettableStateVar $ getSizei1 id GetMaxTessGenLevel
84
84
85
85
getLimit :: PName1I -> GettableStateVar GLsizei
86
86
getLimit = makeGettableStateVar . getSizei1 id
You can’t perform that action at this time.
0 commit comments