picogl.utils.mesh.object_mesh ============================= .. py:module:: picogl.utils.mesh.object_mesh .. autoapi-nested-parse:: OBJ mesh with GPU VBO/EBO upload for position + UV drawing. Classes ------- .. autoapisummary:: picogl.utils.mesh.object_mesh.MeshObject Functions --------- .. autoapisummary:: picogl.utils.mesh.object_mesh.flip_texcoord_v Module Contents --------------- .. py:function:: flip_texcoord_v(texcoords: list[float]) -> list[float] Invert V for DDS/top-left origin (``TextureLoader.inversed_v_coords``). .. py:class:: MeshObject(path: pathlib.Path | str) OBJ mesh with GPU buffer upload helpers (positions + UVs + ushort indices). .. py:attribute:: path .. py:attribute:: vertices :type: list[float] | None :value: None .. py:attribute:: texcoords :type: list[float] | None :value: None .. py:attribute:: indices :type: list[int] | None :value: None .. py:attribute:: vertex_buffer :type: int | None :value: None .. py:attribute:: uv_buffer :type: int | None :value: None .. py:attribute:: index_buffer :type: int | None :value: None .. py:attribute:: indices_size :type: int :value: 0 .. py:method:: load_mesh() .. py:method:: get_mesh(*, flip_v: bool = False) -> MeshObject .. py:method:: _upload_vertices() -> None .. py:method:: _upload_texcoords() -> None .. py:method:: _upload_indices() -> None .. py:method:: upload() -> None .. py:method:: draw() -> None Draw the mesh. .. py:method:: _draw_vertices(index: int = 0) -> None .. py:method:: _draw_uvs(index: int = 1) -> None .. py:method:: _draw_indices() -> None