From c3b8a41f952f1d6da8d943ebfed9163898824fc0 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 3 Apr 2017 23:10:49 +0200 Subject: Remove function declaration --- src/raylib.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/raylib.h b/src/raylib.h index 3e6c68ff..e8f301ec 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -892,7 +892,6 @@ RLAPI void UnloadMesh(Mesh *mesh); RLAPI void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) RLAPI Material LoadMaterial(const char *fileName); // Load material from file -RLAPI Material LoadMaterialEx(Shader shader, Texture2D diffuse, Color color); // Load material from basic shading data RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) -- cgit v1.2.3 From 1f56e8e5d0000e1c46483530331887dbd0f8ce75 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 4 Apr 2017 12:16:13 +0200 Subject: Minor code tweaks --- src/text.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/text.c b/src/text.c index 09f69ff6..a057e347 100644 --- a/src/text.c +++ b/src/text.c @@ -39,6 +39,8 @@ // Default supported features //------------------------------------- #define SUPPORT_DEFAULT_FONT +#define SUPPORT_FILEFORMAT_FNT +#define SUPPORT_FILEFORMAT_TTF //------------------------------------- #include "raylib.h" -- cgit v1.2.3 From 99affa0cafb466bc960137a4a67128c1c4fd2e17 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 4 Apr 2017 23:44:36 +0200 Subject: Corrected issue when retrieving texture from GPU --- src/textures.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/textures.c b/src/textures.c index fff0e4e9..8e3a1ee1 100644 --- a/src/textures.c +++ b/src/textures.c @@ -516,12 +516,14 @@ Image GetTextureData(Texture2D texture) image.width = texture.width; image.height = texture.height; image.mipmaps = 1; -#if defined(GRAPHICS_API_OPENGL_ES2) - // NOTE: Data retrieved on OpenGL ES 2.0 comes as RGB (from framebuffer) - image.format = UNCOMPRESSED_R8G8B8A8; -#else - image.format = texture.format; -#endif + + if (rlGetVersion() == OPENGL_ES_20) + { + // NOTE: Data retrieved on OpenGL ES 2.0 comes as RGBA (from framebuffer) + image.format = UNCOMPRESSED_R8G8B8A8; + } + else image.format = texture.format; + TraceLog(INFO, "Texture pixel data obtained successfully"); } else TraceLog(WARNING, "Texture pixel data could not be obtained"); -- cgit v1.2.3 From fdf8501e81f15de54af09580449dd8add42fc96e Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 5 Apr 2017 00:02:40 +0200 Subject: Improve vr support and simulator --- src/rlgl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/rlgl.c b/src/rlgl.c index 546fbe6e..5f7b6cb2 100644 --- a/src/rlgl.c +++ b/src/rlgl.c @@ -57,6 +57,7 @@ // Default configuration flags (supported features) //------------------------------------------------- #define SUPPORT_VR_SIMULATION +#define SUPPORT_DISTORTION_SHADER //------------------------------------------------- #include "rlgl.h" @@ -2240,7 +2241,7 @@ void *rlglReadTexturePixels(Texture2D texture) pixels = (unsigned char *)malloc(texture.width*texture.height*4*sizeof(unsigned char)); - // NOTE: Despite FBO color texture is RGB, we read data as RGBA... reading as RGB doesn't work... o__O + // NOTE: We read data as RGBA because FBO texture is configured as RGBA, despite binding a RGB texture... glReadPixels(0, 0, texture.width, texture.height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); // Re-attach internal FBO color texture before deleting it @@ -2558,7 +2559,7 @@ void InitVrSimulator(int vrDevice) hmd.chromaAbCorrection[2] = 1.014f; // HMD chromatic aberration correction parameter 2 hmd.chromaAbCorrection[3] = 0.0f; // HMD chromatic aberration correction parameter 3 - TraceLog(WARNING, "Initializing VR Simulator (Oculus Rift DK2)"); + TraceLog(INFO, "Initializing VR Simulator (Oculus Rift DK2)"); } else if ((vrDevice == HMD_DEFAULT_DEVICE) || (vrDevice == HMD_OCULUS_RIFT_CV1)) { @@ -2585,11 +2586,11 @@ void InitVrSimulator(int vrDevice) hmd.chromaAbCorrection[2] = 1.014f; // HMD chromatic aberration correction parameter 2 hmd.chromaAbCorrection[3] = 0.0f; // HMD chromatic aberration correction parameter 3 - TraceLog(WARNING, "Initializing VR Simulator (Oculus Rift CV1)"); + TraceLog(INFO, "Initializing VR Simulator (Oculus Rift CV1)"); } else { - TraceLog(WARNING, "VR Simulator doesn't support current device yet,"); + TraceLog(WARNING, "VR Simulator doesn't support selected device parameters,"); TraceLog(WARNING, "using default VR Simulator parameters"); } -- cgit v1.2.3