mirror of
https://github.com/libretro/libretro-3dengine.git
synced 2026-11-07 11:06:04 -10:00
Cleanups
This commit is contained in:
1 parent
062cffac4b
commit
9d67a8b49f
9 files changed
+17
-17
No files matched your search
@@ -155,8 +155,8 @@ CXXFLAGS += $(INCFLAGS)
|
||||
|
||||
LIBS += -lz
|
||||
ifeq ($(GLES), 1)
|
||||
CXXFLAGS += -DGLES
|
||||
CFLAGS += -DGLES
|
||||
CXXFLAGS += -DHAVE_OPENGLES
|
||||
CFLAGS += -DHAVE_OPENGLES
|
||||
ifneq (,$(findstring ios,$(platform)))
|
||||
LIBS += $(GL_LIB)
|
||||
else
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
INCFLAGS += -I$(CORE_DIR) -I$(CORE_DIR)/utils -I$(CORE_DIR)/helpers
|
||||
INCFLAGS += -I$(CORE_DIR) -I$(CORE_DIR)/utils -I$(CORE_DIR)/helpers -I$(CORE_DIR)/include
|
||||
|
||||
SOURCES_CXX := $(CORE_DIR)/engine/mesh.cpp \
|
||||
$(CORE_DIR)/engine/texture.cpp \
|
||||
|
||||
+4
-4
@@ -23,7 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef GLES
|
||||
#ifndef HAVE_OPENGLES
|
||||
#include "gli/gli.hpp"
|
||||
#include "gli/gtx/gl_texture2d.hpp"
|
||||
#endif
|
||||
@@ -59,7 +59,7 @@ namespace GL
|
||||
GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
SYM(glTexParameteri)(GL_TEXTURE_2D,
|
||||
GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
#ifndef GLES
|
||||
#ifndef HAVE_OPENGLES
|
||||
GLint max = 0.0f;
|
||||
SYM(glGetIntegerv)(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &max);
|
||||
if (log_cb)
|
||||
@@ -78,7 +78,7 @@ namespace GL
|
||||
unbind();
|
||||
}
|
||||
|
||||
#ifndef GLES
|
||||
#ifndef HAVE_OPENGLES
|
||||
void Texture::load_dds(const std::string& path)
|
||||
{
|
||||
if (!tex)
|
||||
@@ -118,7 +118,7 @@ namespace GL
|
||||
|
||||
string ext = Path::ext(path);
|
||||
|
||||
#ifndef GLES
|
||||
#ifndef HAVE_OPENGLES
|
||||
if (ext == "dds")
|
||||
load_dds(path);
|
||||
else
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#endif
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#if defined(GLES)
|
||||
#if defined(HAVE_OPENGLES)
|
||||
#ifdef IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
@@ -49,7 +49,7 @@
|
||||
#define decltype(type) typeof(type)
|
||||
#endif
|
||||
|
||||
#ifdef GLES
|
||||
#ifdef HAVE_OPENGLES
|
||||
#define SYM(sym) sym
|
||||
#else
|
||||
#define SYM(sym) (::GL::symbol<decltype(&sym)>(#sym))
|
||||
|
||||
@@ -296,7 +296,7 @@ void coll_test_crash_detection(void)
|
||||
float b = point_crash_time(pos, vec3(1, 0, 0), vec3(2, 2, 0));
|
||||
float c = point_crash_time(pos, vec3(1, 0, 0), vec3(1.0, 0.5, 0.0));
|
||||
float d = point_crash_time(pos, vec3(0, 1, 0), vec3(0.5, 1.0, 0.0));
|
||||
float e = line_crash_time(pos, vec3(1, 0, 0), vec3(4, -1, 0), vec3(4, 1, 0), out_pos);
|
||||
float e = line_crash_time(pos, vec3(1, 0, 0), vec3(4, -1, 0), vec3(4, 1, 0), out_pos);
|
||||
|
||||
assert(fequal(a, 2.0f));
|
||||
assert(fequal(b, 10.0f));
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -22,7 +22,7 @@ CORE_DIR := ..
|
||||
include $(CORE_DIR)/Makefile.common
|
||||
|
||||
LOCAL_SRC_FILES += $(SOURCES_CXX) $(SOURCES_C)
|
||||
LOCAL_CXXFLAGS += -O2 -Wall -ffast-math -fexceptions -DGLES -DANDROID $(INCFLAGS)
|
||||
LOCAL_CXXFLAGS += -O2 -Wall -ffast-math -fexceptions -DHAVE_OPENGLES -DANDROID $(INCFLAGS)
|
||||
LOCAL_CFLAGS += $(INCFLAGS)
|
||||
LOCAL_LDLIBS += -lz -llog -lGLESv2
|
||||
|
||||
|
||||
+5
-5
@@ -61,7 +61,7 @@ static bool display_position;
|
||||
|
||||
#define BASE_WIDTH 320
|
||||
#define BASE_HEIGHT 240
|
||||
#ifdef GLES
|
||||
#ifdef HAVE_OPENGLES
|
||||
#define MAX_WIDTH 1024
|
||||
#define MAX_HEIGHT 1024
|
||||
#else
|
||||
@@ -129,7 +129,7 @@ void retro_set_environment(retro_environment_t cb)
|
||||
struct retro_variable variables[] = {
|
||||
{ "3dengine-resolution",
|
||||
"Internal resolution; 320x240|360x480|480x272|512x384|512x512|640x240|640x448|640x480|720x576|800x600|960x720|1024x768"
|
||||
#ifndef GLES
|
||||
#ifndef HAVE_OPENGLES
|
||||
"|1024x1024|1280x720|1280x960|1600x1200|1920x1080|1920x1440|1920x1600|2048x1152|2048x1536|2048x2048|320x240"
|
||||
#endif
|
||||
},
|
||||
@@ -311,7 +311,7 @@ static uint8_t *convert_buffer;
|
||||
#define GL_UNPACK_ROW_LENGTH 0x0CF2
|
||||
#endif
|
||||
|
||||
#ifdef GLES
|
||||
#ifdef HAVE_OPENGLES
|
||||
#define INTERNAL_FORMAT GL_BGRA_EXT
|
||||
#define TEX_TYPE GL_BGRA_EXT
|
||||
#define TEX_FORMAT GL_UNSIGNED_BYTE
|
||||
@@ -511,7 +511,7 @@ bool retro_load_game(const struct retro_game_info *info)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GLES
|
||||
#ifdef HAVE_OPENGLES
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGLES2;
|
||||
#else
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGL;
|
||||
@@ -523,7 +523,7 @@ bool retro_load_game(const struct retro_game_info *info)
|
||||
if (!environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER, &hw_render))
|
||||
return false;
|
||||
|
||||
#ifdef GLES
|
||||
#ifdef HAVE_OPENGLES
|
||||
if (camera_enable && camera_cb.caps & (1 << RETRO_CAMERA_BUFFER_RAW_FRAMEBUFFER) && !gl_query_extension("BGRA8888"))
|
||||
{
|
||||
if (log_cb)
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
#define RPNG_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "boolean.h"
|
||||
#include <boolean.h>
|
||||
|
||||
// Modified version of RetroArch's PNG loader.
|
||||
// Uses bottom-left origin rather than top-left.
|
||||
|
||||
Reference in new issue
Block a user