ms-is-coding / MiniLibX-OpenGL

Repository from Github https://github.comms-is-coding/MiniLibX-OpenGLRepository from Github https://github.comms-is-coding/MiniLibX-OpenGL

MiniLibX OpenGL

Caution

Please exercise caution when using this library for your 42 projects. It was developed by a fellow student and may be considered cheating, depending on your campus's policies. Make sure you understand the implications of using it in your projects, and don't hesitate to ask the staff if you have any questions or concerns.

Note

This library has not been tested on macOS. If you would like to contribute compatibility modifications, you are always welcome to submit a PR.

Description

This project is a replacement for the outdated MiniLibX library, designed to optimize rendering using OpenGL. It maintains a similar API while introducing new features.

Features

  • OpenGL rendering for improved performance
  • Compatibility with the MiniLibX API
  • Loading XPM images
  • Managing multiple windows
  • Event handling
  • Font rendering
  • Audio playback

Getting Started

You can build the library by running the following commands:

git clone https://github.com/ms-is-coding/MiniLibX-OpenGL.git
cd MiniLibX-OpenGL
make

Usage

You can refer to the original MiniLibX's usage page, all of the APIs are the same.

Function reference

  • mlx_init
  • mlx_new_window
  • mlx_clear_window
  • mlx_pixel_put
  • mlx_new_image
  • mlx_get_data_addr
  • mlx_put_image_to_window
  • mlx_get_color_value
  • mlx_mouse_hook
  • mlx_key_hook
  • mlx_expose_hook
  • mlx_loop_hook
  • mlx_loop
  • mlx_loop_end
  • mlx_string_put
  • mlx_set_font
  • mlx_xpm_to_image
  • mlx_xpm_file_to_image
  • mlx_destroy_window
  • mlx_destroy_image
  • mlx_destroy_display
  • mlx_hook
  • mlx_do_key_autorepeatoff
  • mlx_do_key_autorepeaton
  • mlx_do_sync
  • mlx_mouse_get_pos
  • mlx_mouse_move
  • mlx_mouse_hide
  • mlx_mouse_show
  • mlx_get_screen_size

Warning

All of the functions below are not present in the original MiniLibX, therefore you must only use them when IS_MLX_OPENGL is present. Make sure your code respects the norm :)

  • mlx_window_move

License

MiniLibX OpenGL is released under the MIT License, see LICENSE for details

About

License:MIT License


Languages

Language:C 94.1%Language:Makefile 5.9%