mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
remove delete scene in window destructor, change protection to only allow at least one arg
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/27 14:51:49 by TheRed #+# #+# */
|
/* Created: 2024/09/27 14:51:49 by TheRed #+# #+# */
|
||||||
/* Updated: 2025/01/08 20:09:47 by ycontre ### ########.fr */
|
/* Updated: 2025/01/09 16:17:29 by tomoron ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
Scene scene;
|
Scene scene;
|
||||||
|
|
||||||
if (argc > 1 && !scene.parseScene(argv[1]))
|
if (argc <= 1 || !scene.parseScene(argv[1]))
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
Window window(&scene, WIDTH, HEIGHT, "RT_GPU", 0);
|
Window window(&scene, WIDTH, HEIGHT, "RT_GPU", 0);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/10/13 16:16:24 by TheRed #+# #+# */
|
/* Created: 2024/10/13 16:16:24 by TheRed #+# #+# */
|
||||||
/* Updated: 2024/12/23 18:39:37 by ycontre ### ########.fr */
|
/* Updated: 2025/01/09 16:34:48 by tomoron ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -48,8 +48,6 @@ Window::Window(Scene *scene, int width, int height, const char *title, int sleep
|
|||||||
|
|
||||||
Window::~Window(void)
|
Window::~Window(void)
|
||||||
{
|
{
|
||||||
delete _scene;
|
|
||||||
|
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user