Personal toolkit for C graphics programming using minilibx
Developed with the software and tools below.
Table of Contents
Libgraphic is a C library crafted to streamline the development of visually-rich applications using 42's MLX graphics library. It provides a robust abstraction layer for direct pixel drawing, color manipulation, and complex geometric transformations, making interactive graphics development both straightforward and powerful.
Libgraphic integrates dedicated utilities for the MLX library, enhancing its native graphical capabilities while simplifying the programming interface. Specific functions are designed to optimize and extend the library's features as detailed.
See mlx_tools.h for details
Handling colors precisely is crucial for design, simulation, or gaming applications. Libgraphic offers utilities for managing RGB, RGBA, and HSL color spaces, including quick conversions between these formats and tools for adjusting brightness, saturation, and other color properties.
See color.h for details
Efficient vertex and vector management is key for 3D rendering or physical simulations. LibGraphic provides robust functions for handling 2D and 3D vertices in integer and float types, and 2D and 3D float vectors, simplifying everything from shape transformations to dynamics management.
See vertex.h or vector.h for details
With advanced functions for handling rotations via quaternions, Euler angles, spheric rotations, and axe angles, Libgraphic allows for precise and flexible orientation and transformation management. Support for 4D matrices for 3D space transformations is also included, promising future enhancements.
See rotation.h or matrix.h for details
Libgraphic also simplifies the setup of cameras based on the pinhole model, enabling quick and easy adjustments for realistic renderings. The provided graphics math functions further extend the libraryβs capabilities in image and shape manipulation.
See camera.h for details
Poor debug functions, still needs a big improvement
See debug.h for details
Libgraphic is designed to be extensible, high-performing, and user-friendly, suitable for any graphic project you plan to undertake.
Show repository structure
βββ README.md
βββ camera/
βββ includes/
β βββ camera.h
βββ sources/
βββ ft_cam_new.c
βββ ft_cam_init.c
βββ ft_cam_lookat.c
βββ ft_view_mat4.c
βββ color/
βββ colorhsl/
β βββ includes/
β β βββ colorhsl.h
β βββ sources/
β βββ ft_hsl_new.c
β βββ ft_hsl_default.c
β βββ ft_hsl_from_rgba.c
β βββ ft_hsl_add.c
β βββ ft_hsl_sub.c
β βββ ft_hsl_lerp.c
βββ colorrgb/
β βββ includes/
β β βββ colorrgb.h
β βββ sources/
β βββ ft_rgb_new.c
β βββ ft_rgb_default.c
β βββ ft_rgb_from_i.c
β βββ ft_rgb_to_i.c
β βββ ft_rgb_lerp.c
βββ colorrgba/
β βββ includes/
β β βββ colorrgba.h
β βββ sources/
β βββ ft_rgba_new.c
β βββ ft_rgba_default.c
β βββ ft_rgba_from_i.c
β βββ ft_rgba_from_hsl.c
β βββ ft_rgba_add.c
β βββ ft_rgba_sub.c
β βββ ft_icolor_lerp.c
βββ includes/
βββ colorstruct.h
βββ color.h
βββ debug/
βββ includes/
β βββ debug.h
βββ sources/
βββ print_camera.c
βββ print_matrix.c
βββ print_vector.c
βββ graphic_math/
βββ includes/
β βββ g_math.h
βββ sources/
βββ ft_orthoproj_mat4.c
βββ ft_to_frange.c
βββ ft_vieport_llc.c
βββ ft_persproj_mat4.c
βββ ft_vertex3f_proj.c
βββ ft_vieport_tlc.c
βββ matrix/
βββ includes/
β βββ matrixstruct.h
β βββ matrix.h
βββ matrix2/
β βββ includes/
β βββ sources/
βββ matrix3/
β βββ includes/
β βββ sources/
βββ matrix4/
β βββ includes/
β β βββ matrix4.h
β βββ sources/
β βββ ft_mat4_null.c
β βββ ft_mat4_identity.c
β βββ ft_mat4_from_aarot.c
β βββ ft_mat4_from_eulerrot.c
β βββ ft_mat4_from_quat.c
β βββ ft_mat4_from_sphrot.c
β βββ ft_mat4_mul.c
β βββ ft_mat4_premul_quat.c
β βββ ft_mat4_premul_norm_quat.c
β βββ ft_mat4_premul_vector3.c
β βββ ft_mat4_postmul_quat.c
β βββ ft_mat4_postmul_vector3.c
β βββ ft_mat4_scale_from_vector3.c
β βββ ft_mat4_translate_from_vector3.c
βββ matrixX/
βββ includes/
βββ sources/
βββ mlx_tools/
βββ includes/
β βββ mlx_tools.h
βββ sources/
βββ fast_line.c
βββ mlx_bresenham.c
βββ mlx_end.c
βββ mlx_init.c
βββ pixel_to_img.c
βββ rotation/
βββ axeAngleRot/
β βββ includes/
β β βββ aarot.h
β βββ sources/
β βββ ft_aarot_new.c
β βββ ft_aarot_from_eulerrot.c
β βββ ft_aarot_from_quat.c
β βββ ft_aarot_from_mat4.c
β βββ ft_aarot_from_sphrot.c
β βββ ft_aarot_normalize.c
βββ eulerRot/
β βββ includes/
β β βββ eulerrot.h
β βββ sources/
β βββ ft_eulerrot_new.c
β βββ ft_eulerrot_from_aarot.c
β βββ ft_eulerrot_from_quat.c
β βββ ft_eulerrot_from_mat4.c
β βββ ft_eulerrot_from_sphrot.c
β βββ ft_eulerrot_add.c
β βββ ft_eulerrot_sub.c
β βββ ft_eulerrot_equal.c
β βββ ft_eulerrot_lerp.c
βββ quaternion/
β βββ includes/
β β βββ quaternion.h
β βββ sources/
β βββ ft_quat_new.c
β βββ ft_quat_from_aarot.c
β βββ ft_quat_from_mat4.c
β βββ ft_quat_from_vector3.c
β βββ ft_quat_from_sphrot.c
β βββ ft_quat_add.c
β βββ ft_quat_sub.c
β βββ ft_quat_add_n.c
β βββ ft_quat_sub_n.c
β βββ ft_quat_mul.c
β βββ ft_quat_equal.c
β βββ ft_quat_opp.c
β βββ ft_quat_inv.c
β βββ ft_quat_scale.c
β βββ ft_quat_normalize.c
β βββ ft_quat_magn.c
β βββ ft_quat_crossprod.c
β βββ ft_quat_dotnormalize.c
β βββ ft_quat_dotprod.c
β βββ ft_quat_lerp.c
β βββ ft_quat_from_eulerrot.c
β βββ ft_quat_slerp.c
βββ sphericRot/
β βββ includes/
β β βββ sphrot.h
β βββ sources/
β βββ ft_sphrot_from_aarot.c
β βββ ft_sphrot_from_eulerrot.c
β βββ ft_sphrot_from_quat.c
β βββ ft_sphrot_from_mat4.c
ββ includes/
|ββ rotationstruct.h
βββ rotation.h
βββ vector/
βββ includes/
β βββ vectorstruct.h
β βββ vector.h
βββ vector2/
β βββ includes/
β β βββ vector2.h
β βββ sources/
β βββ ft_vector2_new.c
β βββ ft_vector2_add.c
β βββ ft_vector2_sub.c
β βββ ft_vector2_equal.c
β βββ ft_vector2_opp.c
β βββ ft_vector2_scale.c
β βββ ft_vector2_magn.c
β βββ ft_vector2_normalize.c
β βββ ft_vector2_det.c
β βββ ft_vector2_dotprod.c
βββ vector3/
βββ includes/
β βββ vector3.h
βββ sourceGs/
βββ ft_vector3_new.c
βββ ft_vector3_null.c
βββ ft_vector3_from_quat.c
βββ ft_vector3_add.c
βββ ft_vector3_sub.c
βββ ft_vector3_opp.c
βββ ft_vector3_scale.c
βββ ft_vector3_equal.c
βββ ft_vector3_magn.c
βββ ft_vector3_crossprod.c
βββ ft_vector3_dotprod.c
βββ ft_vector3_normalize.c
βββ vertex/
βββ includes/
β βββ vertexstruct.h
β βββ vertex.h
βββ vertex2f/
β βββ includes/
β β βββ vertex2f.h
β βββ sources/
β βββ ft_vertex2f_new.c
β βββ ft_vertex2f_null.c
β βββ ft_vertex2f_add.c
β βββ ft_vertex2f_sub.c
β βββ ft_vertex2f_mul.c
β βββ ft_vertex2f_div.c
β βββ ft_vertex2f_opp.c
βββ vertex2i/
β βββ includes/
β β βββ vertex2i.h
β βββ sources/
β βββ ft_vertex2i_new.c
β βββ ft_vertex2i_null.c
β βββ ft_vertex2i_add.c
β βββ ft_vertex2i_sub.c
β βββ ft_vertex2i_mul.c
β βββ ft_vertex2i_div.c
β βββ ft_vertex2i_opp.c
βββ vertex3f/
β βββ includes/
β β βββ vertex3f.h
β βββ sources/
β βββ ft_vertex3f_new.c
β βββ ft_vertex3f_null.c
β βββ ft_vertex3f_add.c
β βββ ft_vertex3f_sub.c
β βββ ft_vertex3f_mul.c
β βββ ft_vertex3f_div.c
β βββ ft_vertex3f_opp.c
β βββ ft_vertex3f_from_vertex3i.c
βββ vertex3i/
βββ includes/
β βββ vertex3i.h
βββ sources/
βββ ft_vertex3i_new.c
βββ ft_vertex3i_null.c
βββ ft_vertex3i_add.c
βββ ft_vertex3i_sub.c
βββ ft_vertex3i_mul.c
βββ ft_vertex3i_div.c
βββ ft_vertex3i_opp.c
System Requirements:
- Clone the libgraphic repository:
$ git clone https://github.com/lvoneduval/libgraphic
- Pull the submodules:
$ git clone https://github.com/lvoneduval/libgraphic
- Add the header into your files:
#include "<path to libgraphic>/libraphic.h"
Kickstart your journey by following our straightforward Quick Start Guide. This guide is designed to help you set up and start using the Libgraphic with practical examples and essential setup instructions.
- Begin Your Experience: Follow the steps outlined to quickly integrate and utilize our tools. View the Quick Start Guide.
Explore the comprehensive documentation to familiarize yourself with all aspects of our platform. This documentation serves as a central hub to guide you through the features and functionalities of our system.
- Explore the Full Documentation: Dive deeper into each component of our platform. Visit the Documentation Home.
-
βΊ MAKEFILE
-
βΊ DEPENDENCIES:
-
βΊ DOCUMENTATION:
-
βΊ Quick Start
-
βΊ ADD MATRIX
-
βΊ UPDATE DEBUG
- Ugo PopΓ©e
- Olivier Crouzet for the minilibX
- OpenGL-Tutoriel Developpez.com
- OpenGL-Tutoriel opengl-tutorial.org