mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-05 19:08:13 +00:00
Merge branch 'raysan5:master' into master
This commit is contained in:
@@ -82,16 +82,18 @@ int main(void)
|
||||
|
||||
BeginShaderMode(shader);
|
||||
|
||||
// WARNING: Additional samplers are enabled for all draw calls in the batch,
|
||||
// EndShaderMode() forces batch drawing and consequently resets active textures
|
||||
// to let other sampler2D to be activated on consequent drawings (if required)
|
||||
// WARNING: Additional textures (sampler2D) are enabled for ALL draw calls in the batch,
|
||||
// but EndShaderMode() forces batch drawing and resets active textures, this way
|
||||
// other textures (sampler2D) can be activated on consequent drawings (if required)
|
||||
// The downside of this approach is that SetShaderValue() must be called inside the loop,
|
||||
// to be set again after every EndShaderMode() reset
|
||||
SetShaderValueTexture(shader, texBlueLoc, texBlue);
|
||||
|
||||
// We are drawing texRed using default sampler2D texture0 but
|
||||
// an additional texture units is enabled for texBlue (sampler2D texture1)
|
||||
// We are drawing texRed using default [sampler2D texture0] but
|
||||
// an additional texture units is enabled for texBlue [sampler2D texture1]
|
||||
DrawTexture(texRed, 0, 0, WHITE);
|
||||
|
||||
EndShaderMode();
|
||||
EndShaderMode(); // Texture sampler2D is reseted, needs to be set again for next frame
|
||||
|
||||
DrawText("Use KEY_LEFT/KEY_RIGHT to move texture mixing in shader!", 80, GetScreenHeight() - 40, 20, RAYWHITE);
|
||||
|
||||
|
@@ -95,7 +95,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// rcore: Configuration values
|
||||
//------------------------------------------------------------------------------------
|
||||
#define MAX_FILEPATH_CAPACITY 8192 // Maximum file paths capacity
|
||||
@@ -153,7 +152,6 @@
|
||||
#endif
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCE_TX 9
|
||||
|
||||
|
||||
// Default shader vertex attribute names to set location points
|
||||
// NOTE: When a new shader is loaded, the following locations are tried to be set for convenience
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
|
||||
@@ -173,7 +171,6 @@
|
||||
#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
|
||||
#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Module: rshapes - Configuration Flags
|
||||
//------------------------------------------------------------------------------------
|
||||
@@ -185,7 +182,6 @@
|
||||
//------------------------------------------------------------------------------------
|
||||
#define SPLINE_SEGMENT_DIVISIONS 24 // Spline segments subdivisions
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Module: rtextures - Configuration Flags
|
||||
//------------------------------------------------------------------------------------
|
||||
@@ -213,7 +209,6 @@
|
||||
// If not defined, still some functions are supported: ImageFormat(), ImageCrop(), ImageToPOT()
|
||||
#define SUPPORT_IMAGE_MANIPULATION 1
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Module: rtext - Configuration Flags
|
||||
//------------------------------------------------------------------------------------
|
||||
@@ -240,7 +235,6 @@
|
||||
// TextFormat(), TextSubtext(), TextToUpper(), TextToLower(), TextToPascal(), TextSplit()
|
||||
#define MAX_TEXTSPLIT_COUNT 128 // Maximum number of substrings to split: TextSplit()
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Module: rmodels - Configuration Flags
|
||||
//------------------------------------------------------------------------------------
|
||||
|
1
src/external/rl_gputex.h
vendored
1
src/external/rl_gputex.h
vendored
@@ -141,7 +141,6 @@ RLGPUTEXAPI int rl_save_ktx_to_memory(const char *fileName, void *data, int widt
|
||||
|
||||
#endif // RL_GPUTEX_H
|
||||
|
||||
|
||||
/***********************************************************************************
|
||||
*
|
||||
* RL_GPUTEX IMPLEMENTATION
|
||||
|
@@ -451,7 +451,6 @@ void SetAudioBufferPan(AudioBuffer *buffer, float pan);
|
||||
void TrackAudioBuffer(AudioBuffer *buffer);
|
||||
void UntrackAudioBuffer(AudioBuffer *buffer);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Functions Definition - Audio Device initialization and Closing
|
||||
//----------------------------------------------------------------------------------
|
||||
@@ -996,7 +995,6 @@ Sound LoadSoundAlias(Sound source)
|
||||
return sound;
|
||||
}
|
||||
|
||||
|
||||
// Checks if a sound is valid (data loaded and buffers initialized)
|
||||
bool IsSoundValid(Sound sound)
|
||||
{
|
||||
@@ -2349,7 +2347,6 @@ void DetachAudioMixedProcessor(AudioCallback process)
|
||||
ma_mutex_unlock(&AUDIO.System.lock);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module specific Functions Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@@ -1889,7 +1889,7 @@ void TakeScreenshot(const char *fileName)
|
||||
char path[512] = { 0 };
|
||||
strcpy(path, TextFormat("%s/%s", CORE.Storage.basePath, fileName));
|
||||
|
||||
ExportImage(image, path); // WARNING: Module required: rtextures
|
||||
ExportImage(image, path); // WARNING: Module required: rtextures
|
||||
RL_FREE(imgData);
|
||||
|
||||
if (FileExists(path)) TRACELOG(LOG_INFO, "SYSTEM: [%s] Screenshot taken successfully", path);
|
||||
@@ -1936,7 +1936,7 @@ bool FileExists(const char *fileName)
|
||||
}
|
||||
|
||||
// Check file extension
|
||||
// NOTE: Extensions checking is not case-sensitive
|
||||
// TODO: Avoid [rtext] module dependency
|
||||
bool IsFileExtension(const char *fileName, const char *ext)
|
||||
{
|
||||
#define MAX_FILE_EXTENSION_LENGTH 16
|
||||
|
Reference in New Issue
Block a user