feat(fixLib): fix release raylib
This commit is contained in:
parent
ae50bfa2cc
commit
2f5406bbd9
25 changed files with 1840 additions and 1840 deletions
|
|
@ -31,7 +31,7 @@ vec2 VectorRotateTime(vec2 v, float speed)
|
|||
return v;
|
||||
}
|
||||
|
||||
float Rectangle(in vec2 st, in float size, in float fill)
|
||||
float rayRectangle(in vec2 st, in float size, in float fill)
|
||||
{
|
||||
float roundSize = 0.5 - size/2.0;
|
||||
float left = step(roundSize, st.x);
|
||||
|
|
@ -53,7 +53,7 @@ void main()
|
|||
|
||||
fpos = VectorRotateTime(fpos, 0.2);
|
||||
|
||||
float alpha = Rectangle(fpos, 0.216, 1.0);
|
||||
float alpha = rayRectangle(fpos, 0.216, 1.0);
|
||||
vec3 color = vec3(0.3, 0.3, 0.3);
|
||||
|
||||
gl_FragColor = vec4(color, alpha);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ vec2 VectorRotateTime(vec2 v, float speed)
|
|||
return v;
|
||||
}
|
||||
|
||||
float Rectangle(in vec2 st, in float size, in float fill)
|
||||
float rayRectangle(in vec2 st, in float size, in float fill)
|
||||
{
|
||||
float roundSize = 0.5 - size/2.0;
|
||||
float left = step(roundSize, st.x);
|
||||
|
|
@ -54,7 +54,7 @@ void main()
|
|||
|
||||
fpos = VectorRotateTime(fpos, 0.2);
|
||||
|
||||
float alpha = Rectangle(fpos, 0.216, 1.0);
|
||||
float alpha = rayRectangle(fpos, 0.216, 1.0);
|
||||
vec3 color = vec3(0.3, 0.3, 0.3);
|
||||
|
||||
finalColor = vec4(color, alpha);
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ int main(void)
|
|||
UnloadModel(cube); // Unload the model
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ int main(void)
|
|||
// Enable shader using the custom uniform
|
||||
BeginShaderMode(shader);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Draw some 2d text over drawn texture
|
||||
|
|
@ -122,7 +122,7 @@ int main(void)
|
|||
UnloadModel(model); // Unload model
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ int main(void)
|
|||
.id = gBuffer.positionTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
}, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
}, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
DrawText("POSITION TEXTURE", 10, screenHeight - 30, 20, DARKGREEN);
|
||||
} break;
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ int main(void)
|
|||
.id = gBuffer.normalTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
}, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
}, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
DrawText("NORMAL TEXTURE", 10, screenHeight - 30, 20, DARKGREEN);
|
||||
} break;
|
||||
|
||||
|
|
@ -299,7 +299,7 @@ int main(void)
|
|||
.id = gBuffer.albedoSpecTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
}, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
}, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
DrawText("ALBEDO TEXTURE", 10, screenHeight - 30, 20, DARKGREEN);
|
||||
} break;
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ int main(void)
|
|||
rlUnloadTexture(gBuffer.albedoSpecTexture);
|
||||
rlUnloadTexture(gBuffer.depthRenderbuffer);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -67,11 +67,11 @@ int main(void)
|
|||
BeginTextureMode(target); // Enable drawing to texture
|
||||
ClearBackground(BLACK); // Clear the render texture
|
||||
|
||||
// Draw a rectangle in shader mode to be used as shader canvas
|
||||
// NOTE: Rectangle uses font white character texture coordinates,
|
||||
// Draw a rayRectangle in shader mode to be used as shader canvas
|
||||
// NOTE: rayRectangle uses font white character texture coordinates,
|
||||
// so shader can not be applied here directly because input vertexTexCoord
|
||||
// do not represent full screen coordinates (space where want to apply shader)
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
EndTextureMode(); // End drawing to texture (now we have a blank texture available for the shader)
|
||||
|
||||
BeginDrawing();
|
||||
|
|
@ -79,7 +79,7 @@ int main(void)
|
|||
|
||||
BeginShaderMode(shader);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE);
|
||||
EndShaderMode();
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -90,7 +90,7 @@ int main(void)
|
|||
UnloadShader(shader); // Unload shader
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ int main(void)
|
|||
UnloadTexture(texture); // Unload the texture
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -109,9 +109,9 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// We only draw a white full-screen rectangle, frame is generated in shader
|
||||
// We only draw a white full-screen rayRectangle, frame is generated in shader
|
||||
BeginShaderMode(shader);
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
DrawrayRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawText(TextFormat("PRESS [A] to TOGGLE SHADER AUTOLOADING: %s",
|
||||
|
|
@ -128,7 +128,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ int main(void)
|
|||
// Raymarch Scene
|
||||
rlEnableDepthTest(); //Manually enable Depth Test to handle multiple rendering methods.
|
||||
BeginShaderMode(shdrRaymarch);
|
||||
DrawRectangleRec((Rectangle){0,0, (float)screenWidth, (float)screenHeight},WHITE);
|
||||
DrawrayRectangleRec((rayRectangle){0,0, (float)screenWidth, (float)screenHeight},WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Raserize Scene
|
||||
|
|
@ -132,7 +132,7 @@ int main(void)
|
|||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawFPS(10, 10);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -144,7 +144,7 @@ int main(void)
|
|||
UnloadShader(shdrRaymarch);
|
||||
UnloadShader(shdrRaster);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -159,11 +159,11 @@ int main(void)
|
|||
BeginTextureMode(target); // Enable drawing to texture
|
||||
ClearBackground(BLACK); // Clear the render texture
|
||||
|
||||
// Draw a rectangle in shader mode to be used as shader canvas
|
||||
// NOTE: Rectangle uses font white character texture coordinates,
|
||||
// Draw a rayRectangle in shader mode to be used as shader canvas
|
||||
// NOTE: rayRectangle uses font white character texture coordinates,
|
||||
// so shader can not be applied here directly because input vertexTexCoord
|
||||
// do not represent full screen coordinates (space where want to apply shader)
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
EndTextureMode();
|
||||
|
||||
BeginDrawing();
|
||||
|
|
@ -195,7 +195,7 @@ int main(void)
|
|||
UnloadShader(shader); // Unload shader
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -98,24 +98,24 @@ int main(void)
|
|||
BeginBlendMode(BLEND_ADDITIVE);
|
||||
DrawTexturePro(
|
||||
light,
|
||||
(Rectangle){ 0, 0, light.width, light.height },
|
||||
(Rectangle){ 0, 0, 20, 20 },
|
||||
(rayRectangle){ 0, 0, light.width, light.height },
|
||||
(rayRectangle){ 0, 0, 20, 20 },
|
||||
(Vector2){ 10.0, 10.0 },
|
||||
0.0,
|
||||
RED
|
||||
);
|
||||
DrawTexturePro(
|
||||
light,
|
||||
(Rectangle){ 0, 0, light.width, light.height },
|
||||
(Rectangle){ 8, 4, 20, 20 },
|
||||
(rayRectangle){ 0, 0, light.width, light.height },
|
||||
(rayRectangle){ 8, 4, 20, 20 },
|
||||
(Vector2){ 10.0, 10.0 },
|
||||
0.0,
|
||||
BLUE
|
||||
);
|
||||
DrawTexturePro(
|
||||
light,
|
||||
(Rectangle){ 0, 0, light.width, light.height },
|
||||
(Rectangle){ 8, 8, 10, 10 },
|
||||
(rayRectangle){ 0, 0, light.width, light.height },
|
||||
(rayRectangle){ 8, 8, 10, 10 },
|
||||
(Vector2){ 5.0, 5.0 },
|
||||
0.0,
|
||||
GREEN
|
||||
|
|
@ -147,8 +147,8 @@ int main(void)
|
|||
|
||||
DrawTexturePro(
|
||||
lightmap.texture,
|
||||
(Rectangle){ 0, 0, -MAP_SIZE, -MAP_SIZE },
|
||||
(Rectangle){ GetRenderWidth() - MAP_SIZE*8 - 10, 10, MAP_SIZE*8, MAP_SIZE*8 },
|
||||
(rayRectangle){ 0, 0, -MAP_SIZE, -MAP_SIZE },
|
||||
(rayRectangle){ GetRenderWidth() - MAP_SIZE*8 - 10, 10, MAP_SIZE*8, MAP_SIZE*8 },
|
||||
(Vector2){ 0.0, 0.0 },
|
||||
0.0,
|
||||
WHITE);
|
||||
|
|
@ -165,7 +165,7 @@ int main(void)
|
|||
UnloadMesh(mesh); // Unload the mesh
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
RL_FREE(transforms); // Free transforms
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ int main(void)
|
|||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ int main(void)
|
|||
UnloadTexture(texRed); // Unload texture
|
||||
UnloadTexture(texBlue); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -124,9 +124,9 @@ int main(void)
|
|||
|
||||
for (int i = 0; i < COLORS_PER_PALETTE; i++)
|
||||
{
|
||||
// Draw horizontal screen-wide rectangles with increasing "palette index"
|
||||
// Draw horizontal screen-wide rayRectangles with increasing "palette index"
|
||||
// The used palette index is encoded in the RGB components of the pixel
|
||||
DrawRectangle(0, lineHeight*i, GetScreenWidth(), lineHeight, (Color){ i, i, i, 255 });
|
||||
DrawrayRectangle(0, lineHeight*i, GetScreenWidth(), lineHeight, (Color){ i, i, i, 255 });
|
||||
}
|
||||
|
||||
EndShaderMode();
|
||||
|
|
@ -145,7 +145,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -146,11 +146,11 @@ int main(void)
|
|||
// Render generated texture using selected postprocessing shader
|
||||
BeginShaderMode(shaders[currentShader]);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Draw 2d shapes and text over drawn texture
|
||||
DrawRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f));
|
||||
DrawrayRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f));
|
||||
|
||||
DrawText("(c) Church 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY);
|
||||
DrawText("CURRENT POSTPRO SHADER:", 10, 15, 20, BLACK);
|
||||
|
|
@ -170,7 +170,7 @@ int main(void)
|
|||
UnloadModel(model); // Unload model
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// We only draw a white full-screen rectangle,
|
||||
// We only draw a white full-screen rayRectangle,
|
||||
// frame is generated in shader using raymarching
|
||||
BeginShaderMode(shader);
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), WHITE);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", GetScreenWidth() - 280, GetScreenHeight() - 20, 10, BLACK);
|
||||
|
|
@ -110,7 +110,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ int main(void)
|
|||
|
||||
DrawText("USING CUSTOM SHADER", 190, 40, 10, RED);
|
||||
|
||||
DrawRectangle(250 - 60, 90, 120, 60, RED);
|
||||
DrawRectangleGradientH(250 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawRectangleLines(250 - 40, 320, 80, 60, ORANGE);
|
||||
DrawrayRectangle(250 - 60, 90, 120, 60, RED);
|
||||
DrawrayRectangleGradientH(250 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawrayRectangleLines(250 - 40, 320, 80, 60, ORANGE);
|
||||
|
||||
// Activate our default shader for next drawings
|
||||
EndShaderMode();
|
||||
|
|
@ -114,7 +114,7 @@ int main(void)
|
|||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(fudesumi); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle(16, 698, MeasureText(TextFormat("Frame: %i", framesCounter), 20) + 8, 42, BLUE);
|
||||
DrawrayRectangle(16, 698, MeasureText(TextFormat("Frame: %i", framesCounter), 20) + 8, 42, BLUE);
|
||||
DrawText(TextFormat("Frame: %i", framesCounter), 20, 700, 20, WHITE);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
|
@ -143,7 +143,7 @@ int main(void)
|
|||
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ int main(void)
|
|||
for (int n = 0; n < MAX_STARS; n++)
|
||||
{
|
||||
// Single pixel is just too small these days!
|
||||
DrawRectangle((int)stars[n].position.x, (int)stars[n].position.y, 2, 2, WHITE);
|
||||
DrawrayRectangle((int)stars[n].position.x, (int)stars[n].position.y, 2, 2, WHITE);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
|
|
@ -198,11 +198,11 @@ int main(void)
|
|||
|
||||
// Draw spot lights
|
||||
BeginShaderMode(shdrSpot);
|
||||
// Instead of a blank rectangle you could render here
|
||||
// Instead of a blank rayRectangle you could render here
|
||||
// a render texture of the full screen used to do screen
|
||||
// scaling (slight adjustment to shader would be required
|
||||
// to actually pay attention to the colour!)
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
DrawrayRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
|
@ -220,7 +220,7 @@ int main(void)
|
|||
UnloadTexture(texRay);
|
||||
UnloadShader(shdrSpot);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue