Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
This commit is contained in:
commit
38c0f75c43
|
|
@ -44,7 +44,7 @@ int main()
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
|
|
||||||
ClearBackground(WHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
Begin3dMode(camera);
|
Begin3dMode(camera);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ int main()
|
||||||
// Initialization
|
// Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
int screenWidth = 800;
|
int screenWidth = 800;
|
||||||
int screenHeight = 480;
|
int screenHeight = 450;
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [textures] example - texture formats loading");
|
InitWindow(screenWidth, screenHeight, "raylib [textures] example - texture formats loading");
|
||||||
|
|
||||||
|
|
@ -128,8 +128,8 @@ int main()
|
||||||
|
|
||||||
for (int i = 0; i < NUM_TEXTURES; i++)
|
for (int i = 0; i < NUM_TEXTURES; i++)
|
||||||
{
|
{
|
||||||
if (i < NUM_TEXTURES/2) selectRecs[i] = (Rectangle){ 40, 45 + 32*i, 150, 30 };
|
if (i < NUM_TEXTURES/2) selectRecs[i] = (Rectangle){ 40, 30 + 32*i, 150, 30 };
|
||||||
else selectRecs[i] = (Rectangle){ 40 + 152, 45 + 32*(i - NUM_TEXTURES/2), 150, 30 };
|
else selectRecs[i] = (Rectangle){ 40 + 152, 30 + 32*(i - NUM_TEXTURES/2), 150, 30 };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Texture sizes in KB
|
// Texture sizes in KB
|
||||||
|
|
@ -215,7 +215,7 @@ int main()
|
||||||
// Draw selected texture
|
// Draw selected texture
|
||||||
if (sonic[selectedFormat].id != 0)
|
if (sonic[selectedFormat].id != 0)
|
||||||
{
|
{
|
||||||
DrawTexture(sonic[selectedFormat], 350, 0, WHITE);
|
DrawTexture(sonic[selectedFormat], 350, -10, WHITE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -225,9 +225,9 @@ int main()
|
||||||
DrawText("ON YOUR GPU", 520, 240, 20, MAROON);
|
DrawText("ON YOUR GPU", 520, 240, 20, MAROON);
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawText("Select texture format (use cursor keys):", 40, 26, 10, DARKGRAY);
|
DrawText("Select texture format (use cursor keys):", 40, 10, 10, DARKGRAY);
|
||||||
DrawText("Required GPU memory size (VRAM):", 40, 442, 10, DARKGRAY);
|
DrawText("Required GPU memory size (VRAM):", 40, 427, 10, DARKGRAY);
|
||||||
DrawText(FormatText("%4.0f KB", textureSizes[selectedFormat]), 240, 435, 20, DARKBLUE);
|
DrawText(FormatText("%4.0f KB", textureSizes[selectedFormat]), 240, 420, 20, DARKBLUE);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
90
src/core.c
90
src/core.c
|
|
@ -95,6 +95,11 @@
|
||||||
#define DEFAULT_GAMEPAD_DEV "/dev/input/js0"
|
#define DEFAULT_GAMEPAD_DEV "/dev/input/js0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PLATFORM_WEB)
|
||||||
|
#include <emscripten/emscripten.h>
|
||||||
|
#include <emscripten/html5.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Defines and Macros
|
// Defines and Macros
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
@ -158,6 +163,10 @@ static int renderOffsetY = 0; // Offset Y from render area (must b
|
||||||
static bool fullscreen = false; // Fullscreen mode (useful only for PLATFORM_DESKTOP)
|
static bool fullscreen = false; // Fullscreen mode (useful only for PLATFORM_DESKTOP)
|
||||||
static Matrix downscaleView; // Matrix to downscale view (in case screen size bigger than display size)
|
static Matrix downscaleView; // Matrix to downscale view (in case screen size bigger than display size)
|
||||||
|
|
||||||
|
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
|
||||||
|
static Vector2 touchPosition; // Touch position on screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
|
||||||
static const char *windowTitle; // Window text title...
|
static const char *windowTitle; // Window text title...
|
||||||
|
|
||||||
|
|
@ -247,6 +256,10 @@ static void TakeScreenshot(void);
|
||||||
static void AndroidCommandCallback(struct android_app *app, int32_t cmd); // Process Android activity lifecycle commands
|
static void AndroidCommandCallback(struct android_app *app, int32_t cmd); // Process Android activity lifecycle commands
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PLATFORM_WEB)
|
||||||
|
static EM_BOOL EmscriptenFullscreenChangeCallback(int eventType, const EmscriptenFullscreenChangeEvent *e, void *userData);
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Functions Definition - Window and OpenGL Context Functions
|
// Module Functions Definition - Window and OpenGL Context Functions
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
@ -279,6 +292,12 @@ void InitWindow(int width, int height, const char *title)
|
||||||
InitGamepad(); // Gamepad init
|
InitGamepad(); // Gamepad init
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PLATFORM_WEB)
|
||||||
|
InitGesturesSystem();
|
||||||
|
|
||||||
|
emscripten_set_fullscreenchange_callback(0, 0, 1, EmscriptenFullscreenChangeCallback);
|
||||||
|
#endif
|
||||||
|
|
||||||
mousePosition.x = screenWidth/2;
|
mousePosition.x = screenWidth/2;
|
||||||
mousePosition.y = screenHeight/2;
|
mousePosition.y = screenHeight/2;
|
||||||
|
|
||||||
|
|
@ -336,6 +355,8 @@ void InitWindow(int width, int height, struct android_app *state)
|
||||||
|
|
||||||
InitAssetManager(app->activity->assetManager);
|
InitAssetManager(app->activity->assetManager);
|
||||||
|
|
||||||
|
InitGesturesSystem(app);
|
||||||
|
|
||||||
TraceLog(INFO, "Android app initialized successfully");
|
TraceLog(INFO, "Android app initialized successfully");
|
||||||
|
|
||||||
while (!windowReady)
|
while (!windowReady)
|
||||||
|
|
@ -814,7 +835,7 @@ Vector2 GetMousePosition(void)
|
||||||
void SetMousePosition(Vector2 position)
|
void SetMousePosition(Vector2 position)
|
||||||
{
|
{
|
||||||
mousePosition = position;
|
mousePosition = position;
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
||||||
// NOTE: emscripten not implemented
|
// NOTE: emscripten not implemented
|
||||||
glfwSetCursorPos(window, position.x, position.y);
|
glfwSetCursorPos(window, position.x, position.y);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -969,6 +990,41 @@ bool IsGamepadButtonUp(int gamepad, int button)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
|
||||||
|
// Returns touch position X
|
||||||
|
int GetTouchX(void)
|
||||||
|
{
|
||||||
|
return (int)touchPosition.x;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns touch position Y
|
||||||
|
int GetTouchY(void)
|
||||||
|
{
|
||||||
|
return (int)touchPosition.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns touch position XY
|
||||||
|
// TODO: touch position should be scaled depending on display size and render size
|
||||||
|
Vector2 GetTouchPosition(void)
|
||||||
|
{
|
||||||
|
Vector2 position = touchPosition;
|
||||||
|
|
||||||
|
if ((screenWidth > displayWidth) || (screenHeight > displayHeight))
|
||||||
|
{
|
||||||
|
// TODO: Seems to work ok but... review!
|
||||||
|
position.x = position.x*((float)screenWidth/(float)(displayWidth - renderOffsetX)) - renderOffsetX/2;
|
||||||
|
position.y = position.y*((float)screenHeight/(float)(displayHeight - renderOffsetY)) - renderOffsetY/2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
position.x = position.x*((float)renderWidth/(float)displayWidth) - renderOffsetX/2;
|
||||||
|
position.y = position.y*((float)renderHeight/(float)displayHeight) - renderOffsetY/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module specific Functions Definition
|
// Module specific Functions Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
@ -1547,6 +1603,13 @@ static bool GetMouseButtonStatus(int button)
|
||||||
// Poll (store) all input events
|
// Poll (store) all input events
|
||||||
static void PollInputEvents(void)
|
static void PollInputEvents(void)
|
||||||
{
|
{
|
||||||
|
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
|
||||||
|
// Touch events reading (requires gestures module)
|
||||||
|
touchPosition = GetRawTouchPosition();
|
||||||
|
|
||||||
|
UpdateGestures();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
||||||
// Mouse input polling
|
// Mouse input polling
|
||||||
double mouseX;
|
double mouseX;
|
||||||
|
|
@ -1940,6 +2003,31 @@ static void SetupFramebufferSize(int displayWidth, int displayHeight)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PLATFORM_WEB)
|
||||||
|
static EM_BOOL EmscriptenFullscreenChangeCallback(int eventType, const EmscriptenFullscreenChangeEvent *e, void *userData)
|
||||||
|
{
|
||||||
|
//isFullscreen: int e->isFullscreen
|
||||||
|
//fullscreenEnabled: int e->fullscreenEnabled
|
||||||
|
//fs element nodeName: (char *) e->nodeName
|
||||||
|
//fs element id: (char *) e->id
|
||||||
|
//Current element size: (int) e->elementWidth, (int) e->elementHeight
|
||||||
|
//Screen size:(int) e->screenWidth, (int) e->screenHeight
|
||||||
|
|
||||||
|
if (e->isFullscreen)
|
||||||
|
{
|
||||||
|
TraceLog(INFO, "Canvas scaled to fullscreen. ElementSize: (%ix%i), ScreenSize(%ix%i)", e->elementWidth, e->elementHeight, e->screenWidth, e->screenHeight);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TraceLog(INFO, "Canvas scaled to windowed. ElementSize: (%ix%i), ScreenSize(%ix%i)", e->elementWidth, e->elementHeight, e->screenWidth, e->screenHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Depending on scaling factor (screen vs element), calculate factor to scale mouse/touch input
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Plays raylib logo appearing animation
|
// Plays raylib logo appearing animation
|
||||||
static void LogoAnimation(void)
|
static void LogoAnimation(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ static int currentGesture = GESTURE_NONE;
|
||||||
|
|
||||||
static unsigned int enabledGestures = 0; // TODO: Currently not in use...
|
static unsigned int enabledGestures = 0; // TODO: Currently not in use...
|
||||||
|
|
||||||
static Vector2 touchPosition;
|
static Vector2 rawTouchPosition;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module specific Functions Declaration
|
// Module specific Functions Declaration
|
||||||
|
|
@ -148,55 +148,15 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
||||||
// Module Functions Definition
|
// Module Functions Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Returns touch position X
|
// Get touch position (could require further processing depending on display size)
|
||||||
int GetTouchX(void)
|
Vector2 GetRawTouchPosition(void)
|
||||||
{
|
{
|
||||||
return (int)touchPosition.x;
|
return rawTouchPosition;
|
||||||
}
|
|
||||||
|
|
||||||
// Returns touch position Y
|
|
||||||
int GetTouchY(void)
|
|
||||||
{
|
|
||||||
return (int)touchPosition.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns touch position XY
|
|
||||||
// TODO: touch position should be scaled depending on display size and render size
|
|
||||||
Vector2 GetTouchPosition(void)
|
|
||||||
{
|
|
||||||
Vector2 position = touchPosition;
|
|
||||||
/*
|
|
||||||
if ((screenWidth > displayWidth) || (screenHeight > displayHeight))
|
|
||||||
{
|
|
||||||
// TODO: Seems to work ok but... review!
|
|
||||||
position.x = position.x*((float)screenWidth / (float)(displayWidth - renderOffsetX)) - renderOffsetX/2;
|
|
||||||
position.y = position.y*((float)screenHeight / (float)(displayHeight - renderOffsetY)) - renderOffsetY/2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
position.x = position.x*((float)renderWidth / (float)displayWidth) - renderOffsetX/2;
|
|
||||||
position.y = position.y*((float)renderHeight / (float)displayHeight) - renderOffsetY/2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return position;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if a gesture have been detected
|
// Check if a gesture have been detected
|
||||||
bool IsGestureDetected(void)
|
bool IsGestureDetected(void)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
if (currentGesture == GESTURE_DRAG) TraceLog(INFO, "DRAG");
|
|
||||||
else if (currentGesture == GESTURE_TAP) TraceLog(INFO, "TAP");
|
|
||||||
else if (currentGesture == GESTURE_DOUBLETAP) TraceLog(INFO, "DOUBLE");
|
|
||||||
else if (currentGesture == GESTURE_HOLD) TraceLog(INFO, "HOLD");
|
|
||||||
else if (currentGesture == GESTURE_SWIPE_RIGHT) TraceLog(INFO, "RIGHT");
|
|
||||||
else if (currentGesture == GESTURE_SWIPE_UP) TraceLog(INFO, "UP");
|
|
||||||
else if (currentGesture == GESTURE_SWIPE_LEFT) TraceLog(INFO, "LEFT");
|
|
||||||
else if (currentGesture == GESTURE_SWIPE_DOWN) TraceLog(INFO, "DOWN");
|
|
||||||
else if (currentGesture == GESTURE_PINCH_IN) TraceLog(INFO, "PINCH IN");
|
|
||||||
else if (currentGesture == GESTURE_PINCH_OUT) TraceLog(INFO, "PINCH OUT");
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (currentGesture != GESTURE_NONE) return true;
|
if (currentGesture != GESTURE_NONE) return true;
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
@ -383,7 +343,7 @@ static void ProcessMotionEvent(GestureEvent event)
|
||||||
{
|
{
|
||||||
lastDragPosition = endDragPosition;
|
lastDragPosition = endDragPosition;
|
||||||
|
|
||||||
endDragPosition = touchPosition;
|
endDragPosition = rawTouchPosition;
|
||||||
|
|
||||||
//endDragPosition.x = AMotionEvent_getX(event, 0);
|
//endDragPosition.x = AMotionEvent_getX(event, 0);
|
||||||
//endDragPosition.y = AMotionEvent_getY(event, 0);
|
//endDragPosition.y = AMotionEvent_getY(event, 0);
|
||||||
|
|
@ -595,8 +555,8 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
||||||
|
|
||||||
if (type == AINPUT_EVENT_TYPE_MOTION)
|
if (type == AINPUT_EVENT_TYPE_MOTION)
|
||||||
{
|
{
|
||||||
touchPosition.x = AMotionEvent_getX(event, 0);
|
rawTouchPosition.x = AMotionEvent_getX(event, 0);
|
||||||
touchPosition.y = AMotionEvent_getY(event, 0);
|
rawTouchPosition.y = AMotionEvent_getY(event, 0);
|
||||||
}
|
}
|
||||||
else if (type == AINPUT_EVENT_TYPE_KEY)
|
else if (type == AINPUT_EVENT_TYPE_KEY)
|
||||||
{
|
{
|
||||||
|
|
@ -677,10 +637,13 @@ static EM_BOOL EmscriptenInputCallback(int eventType, const EmscriptenTouchEvent
|
||||||
gestureEvent.pointCount = touchEvent->numTouches;
|
gestureEvent.pointCount = touchEvent->numTouches;
|
||||||
|
|
||||||
// Position
|
// Position
|
||||||
gestureEvent.position[0] = (Vector2){ touchEvent->touches[0].canvasX, touchEvent->touches[0].canvasY };
|
//gestureEvent.position[0] = (Vector2){ touchEvent->touches[0].canvasX, touchEvent->touches[0].canvasY };
|
||||||
gestureEvent.position[1] = (Vector2){ touchEvent->touches[1].canvasX, touchEvent->touches[1].canvasY };
|
//gestureEvent.position[1] = (Vector2){ touchEvent->touches[1].canvasX, touchEvent->touches[1].canvasY };
|
||||||
|
gestureEvent.position[0] = (Vector2){ touchEvent->touches[0].targetX, touchEvent->touches[0].targetY };
|
||||||
|
gestureEvent.position[1] = (Vector2){ touchEvent->touches[1].targetX, touchEvent->touches[1].targetY };
|
||||||
|
printf("EVENT DETECTED!\n");
|
||||||
|
|
||||||
touchPosition = gestureEvent.position[0];
|
rawTouchPosition = gestureEvent.position[0];
|
||||||
|
|
||||||
ProcessMotionEvent(gestureEvent);
|
ProcessMotionEvent(gestureEvent);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -496,13 +496,14 @@ bool IsGamepadButtonUp(int gamepad, int button); // Detect if a gamepad b
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
|
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
|
||||||
//------------------------------------------------------------------------------------
|
|
||||||
// Gestures and Touch Handling Functions (Module: gestures)
|
|
||||||
//------------------------------------------------------------------------------------
|
|
||||||
int GetTouchX(void); // Returns touch position X (relative to screen size)
|
int GetTouchX(void); // Returns touch position X (relative to screen size)
|
||||||
int GetTouchY(void); // Returns touch position Y (relative to screen size)
|
int GetTouchY(void); // Returns touch position Y (relative to screen size)
|
||||||
Vector2 GetTouchPosition(void); // Returns touch position XY (relative to screen size)
|
Vector2 GetTouchPosition(void); // Returns touch position XY (relative to screen size)
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Gestures and Touch Handling Functions (Module: gestures)
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
Vector2 GetRawTouchPosition(void); // Gewt touch position (raw)
|
||||||
#if defined(PLATFORM_WEB)
|
#if defined(PLATFORM_WEB)
|
||||||
void InitGesturesSystem(void); // Init gestures system (web)
|
void InitGesturesSystem(void); // Init gestures system (web)
|
||||||
#elif defined(PLATFORM_ANDROID)
|
#elif defined(PLATFORM_ANDROID)
|
||||||
|
|
|
||||||
|
|
@ -1008,7 +1008,8 @@ void rlglInit(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// DDS texture compression support
|
// DDS texture compression support
|
||||||
if (strcmp(extList[i], (const char *)"GL_EXT_texture_compression_s3tc") == 0) texCompDXTSupported = true;
|
if ((strcmp(extList[i], (const char *)"GL_EXT_texture_compression_s3tc") == 0) ||
|
||||||
|
(strcmp(extList[i], (const char *)"GL_WEBKIT_WEBGL_compressed_texture_s3tc") == 0)) texCompDXTSupported = true;
|
||||||
|
|
||||||
// ETC1 texture compression support
|
// ETC1 texture compression support
|
||||||
if (strcmp(extList[i], (const char *)"GL_OES_compressed_ETC1_RGB8_texture") == 0) texCompETC1Supported = true;
|
if (strcmp(extList[i], (const char *)"GL_OES_compressed_ETC1_RGB8_texture") == 0) texCompETC1Supported = true;
|
||||||
|
|
|
||||||
|
|
@ -1028,8 +1028,6 @@ void ImageColorTint(Image *image, Color color)
|
||||||
UnloadImage(*image);
|
UnloadImage(*image);
|
||||||
free(pixels);
|
free(pixels);
|
||||||
|
|
||||||
TraceLog(INFO,"color tint applied");
|
|
||||||
|
|
||||||
image->data = processed.data;
|
image->data = processed.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1160,11 +1158,11 @@ void ImageColorBrightness(Image *image, int brightness)
|
||||||
void GenTextureMipmaps(Texture2D texture)
|
void GenTextureMipmaps(Texture2D texture)
|
||||||
{
|
{
|
||||||
#if PLATFORM_WEB
|
#if PLATFORM_WEB
|
||||||
int potWidth = GetNextPOT(image->width);
|
int potWidth = GetNextPOT(texture.width);
|
||||||
int potHeight = GetNextPOT(image->height);
|
int potHeight = GetNextPOT(texture.height);
|
||||||
|
|
||||||
// Check if texture is POT
|
// Check if texture is POT
|
||||||
if ((potWidth != image->width) || (potHeight != image->height))
|
if ((potWidth != texture.width) || (potHeight != texture.height))
|
||||||
{
|
{
|
||||||
TraceLog(WARNING, "Limited NPOT support, no mipmaps available for NPOT textures");
|
TraceLog(WARNING, "Limited NPOT support, no mipmaps available for NPOT textures");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user