minor fixes

This commit is contained in:
Carlos Aragones 2020-09-18 17:45:24 +02:00
parent 3552c1f019
commit 42270f4c53
5 changed files with 15 additions and 4 deletions

View File

@ -138,11 +138,18 @@ if(NOT MSVC)
#--------------------------------------
add_compile_options("$<$<CONFIG:Debug>:-g>")
add_compile_options("$<IF:$<CONFIG:Debug>,-O0,-O2>")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-switch -Wno-unused-function -Wno-implicit-fallthrough")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_OBJC_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_OBJCXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-D_DEBUG)
add_definitions(-DDEBUG)
endif()
# Set compiler/platform specific flags and dependencies
#--------------------------------------
if(WIN32)

View File

@ -145,13 +145,16 @@ destroy_GL_context(SWindowData *window_data) {
}
//-------------------------------------
#if defined(RGB)
#undef RGB
#endif
#define TEXTURE0 0x84C0 // [ Core in gl 1.3, gles1 1.0, gles2 2.0, glsc2 2.0, Provided by GL_ARB_multitexture (gl) ]
#define RGB 0x1907 // [ Core in gl 1.0, gles1 1.0, gles2 2.0, glsc2 2.0 ]
#define RGBA 0x1908 // [ Core in gl 1.0, gles1 1.0, gles2 2.0, glsc2 2.0 ]
#define BGR 0x80E0 // [ Core in gl 1.2 ]
#define BGRA 0x80E1 // [ Core in gl 1.2, Provided by GL_ARB_vertex_array_bgra (gl|glcore) ]
//-------------------------------------
void
init_GL(SWindowData *window_data) {

View File

@ -2,8 +2,7 @@
#if defined(USE_OPENGL_API)
#include "WindowData.h"
#include <stdbool.h>
#include <WindowData.h>
bool create_GL_context(SWindowData *window_data);
void destroy_GL_context(SWindowData *window_data);

View File

@ -5,6 +5,9 @@
#if defined(USE_OPENGL_API)
#include "gl/MiniFB_GL.h"
#endif
#if defined(_DEBUG) || defined(DEBUG)
#include <stdio.h>
#endif
#include <stdlib.h>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1,7 +1,6 @@
#pragma once
#include <MiniFB_enums.h>
#include <stdint.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>