Git Product home page Git Product logo

macrolibx's People

Contributors

dependabot[bot] avatar kbz-8 avatar namonay avatar xtrm-en avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

namonay y-syo

macrolibx's Issues

Maybe a problem with img allocation

We noticed that the use of RAM only increases until the PC freezes. It gets faster and faster if you put pixels in the image. We noticed this in the function below called in a loop with mlx_loop_hook()

void	function(t_mlx *mlx)
{
	if (mlx->img)
		mlx_destroy_image(mlx->mlx, mlx->img);
	mlx->img = mlx_new_image(mlx->mlx, WIDTH, HEIGHT);
	mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->img, 0, 0);
}

mlx_set_fps_goal strange behavior

When setting the fps goal to a value lower than the maximum fps, the macrolibx will sometimes uncap the fps briefly, either randomly or after lagging (eg using valgrind or mashing the refresh key on fdf)
image
random spike
image
mashing refresh on fdf

SDL init crash

#include <mlx.h>

int main()
{
    void* mlx = mlx_init();
    mlx_destroy_display(mlx);

    mlx = mlx_init(); // crash with SDL_Init
    mlx_destroy_display(mlx);

    return 0;
}

wtf

Graphics leak with texts

[MacroLibX] Error : Graphics allocator : some MLX-dependant allocations were not freed before destroying the display (2644 active allocations), please report, this should not happen

Can't use multiple fonts simultaneously

I can't figure out how to use multiple fonts on one image/frame on rendering, I don't know if that's supposed to be possible, and if not I think it'd be a great addition. In any case, great, clean and fast code !

e.g:

int	my_loop(t_mlx *mlx)
{
	mlx_set_font(mlx->mlx, mlx->win, "font1.ttf");
	mlx_string_put(mlx->mlx, mlx->win, 200, 50, 0xFF00FFFF, "Hello im font1");
	mlx_set_font(mlx->mlx, mlx->win, "font2.ttf");
	mlx_string_put(mlx->mlx, mlx->win, 200, 100, 0xFF00FFFF, "Hi font1, im font2");
	return (0);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.