Skip to content

Commit

Permalink
fix viewport type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
szabolcsdombi committed Oct 24, 2021
1 parent 1414927 commit 5df41aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zengl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ class BlendingSettings(TypedDict, total=False):
dst_alpha: BlendConstant


Viewport = Tuple[int, int, int, int] | Tuple[int, int] | None


class Context:
def load(name: str) -> int: ...

Expand Down Expand Up @@ -140,6 +143,7 @@ class Image:
class Renderer:
vertex_count: int
instance_count: int
viewport: Viewport
def render(self) -> None: ...


Expand All @@ -153,7 +157,7 @@ class Instance:
index_buffer: Buffer | None = None, vertex_count: int = 0, instance_count: int = 0, short_index: bool = False,
primitive_restart: bool = False, point_size: float = 1.0, line_width: float = 1.0, front_face: str = 'ccw', cull_face: str = 'none',
color_mask: int = 0xffffffffffffffff, depth: DepthSettings | bool | None = None, stencil: StencilSettings | None = None,
blending: BlendingSettings | None = None, polygon_offset: PolygonOffsetSettings | None = None, viewport: Tuple[int, int, int, int] | None) -> Renderer: ...
blending: BlendingSettings | None = None, polygon_offset: PolygonOffsetSettings | None = None, viewport: Viewport = None) -> Renderer: ...


def instance(context: Context | Any) -> Instance: ...
Expand Down

0 comments on commit 5df41aa

Please sign in to comment.