123456789101112131415161718192021222324252627282930313233 |
- /*
- * 3D Engine
- * display.h:
- * Based on pikuma.com 3D software renderer in C
- * Copyright (c) 2021 986-Studio. All rights reserved.
- *
- * Created by Manoël Trapier on 01/03/2021.
- */
- #ifndef THREEDENGINE_SOURCE_INCLUDE_DISPLAY_H
- #define THREEDENGINE_SOURCE_INCLUDE_DISPLAY_H
- #include <SDL.h>
- extern SDL_Window *window;
- extern SDL_Renderer *renderer;
- extern bool isRunning;
- extern uint32_t *frameBuffer;
- extern SDL_Texture *frameBufferTexture;
- extern int windowWidth;
- extern int windowHeight;
- //
- bool initialiseWindow(bool fullScreen);
- void destroy_window();
- void clearFrameBuffer(uint32_t colour);
- void drawGrid(int spacing, uint32_t colour);
- void drawRectangle(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t colour);
- void renderFrameBuffer();
- #endif /* THREEDENGINE_SOURCE_INCLUDE_DISPLAY_H */
|