Skip to content

Commit 4691e91

Browse files
committed
update to plugin used
1 parent d506573 commit 4691e91

File tree

23 files changed

+11888
-87
lines changed

23 files changed

+11888
-87
lines changed

builds_raylib_dev.sh

Lines changed: 34 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ case ${answer:0:1} in y|Y )
88
echo -e "\e[0"
99
sudo apt install -y libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-dev
1010
sudo apt-get install -y mingw-w64-x86-64-dev
11-
#sudo apt-get install -y mingw-w64-i686-dev
11+
sudo apt-get install -y mingw-w64-i686-dev
1212
sudo apt-get install -y unzip
1313
sudo apt-get install -y gcc-mingw-w64-x86-64
14-
#sudo apt-get install -y gcc-mingw-w64-i686
15-
#sudo apt-get install -y gcc-mingw-w64-i686-posix
16-
#sudo apt-get install -y gcc-mingw-w64-i686-win32
14+
sudo apt-get install -y gcc-mingw-w64-i686
15+
sudo apt-get install -y gcc-mingw-w64-i686-posix
16+
sudo apt-get install -y gcc-mingw-w64-i686-win32
1717
sudo apt-get install -y build-essential #libc6-dev-i386
18-
#sudo apt-get install -y libgl1-mesa-dev:i386
19-
sudo apt-get install -y libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev
18+
sudo apt-get install -y libgl1-mesa-dev:i386
19+
#sudo apt-get install -y libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev
2020
#sudo apt-get install -y libavcodec-dev:386 libavformat-dev:386 libavutil-dev:386 libswresample-dev:386 libswscale-dev:386
2121

2222

@@ -35,9 +35,9 @@ rm -f master
3535

3636
mkdir libs
3737
mkdir libs/x86_64-linux
38-
#mkdir libs/x86_32-linux
38+
mkdir libs/x86_32-linux
3939
mkdir libs/x86_64-win64
40-
#mkdir libs/i386-win32
40+
mkdir libs/i386-win32
4141
#mkdir libs/wasm32-wasi
4242

4343
echo -e "\e[92m \e[1m"
@@ -64,16 +64,6 @@ mkdir raylib_tmp/src/extras
6464
echo "Download raygui"
6565
wget https://raw.githubusercontent.com/raysan5/raygui/master/src/raygui.h -q --show-progress
6666

67-
# wget https://raw.githubusercontent.com/cloudofoz/raylib-gizmo/refs/heads/main/src/raygizmo.c -q --show-progress
68-
# wget https://raw.githubusercontent.com/cloudofoz/raylib-gizmo/refs/heads/main/src/raygizmo.h -q --show-progress
69-
70-
#cp headers/extras/ray-gizmo/raygizmo.h raylib_tmp/src/raygizmo.h
71-
#cp headers/extras/ray-gizmo/raygizmo.c raylib_tmp/src/raygizmo.c
72-
73-
#cp headers/extras/ray-media/rmedia.h raylib_tmp/src/rmedia.h
74-
#cp headers/extras/ray-media/rmedia.c raylib_tmp/src/rmedia.c
75-
76-
#cp headers/Makefile raylib_tmp/src/Makefile
7767

7868
#echo "Download physac "
7969
#wget https://raw.githubusercontent.com/raysan5/physac/master/src/physac.h -q --show-progress
@@ -107,24 +97,24 @@ make PLATFORM=PLATFORM_DESKTOP RAYLIB_MODULE_RAYGUI=TRUE #RAYLIB_MODULE_RAYGIZMO
10797
cp libraylib.a ../../libs/x86_64-linux/libraylib.a
10898

10999

110-
#echo -e "\e[34m \e[1m"
111-
#echo "build x86_32 linux"
112-
#echo -e "\e[0m"
113-
#make clean
114-
#echo "#define RAYGUI_IMPLEMENTATION" > raygui.c && echo "#include <extras/raygui.h>" >> raygui.c
100+
echo -e "\e[34m \e[1m"
101+
echo "build x86_32 linux"
102+
echo -e "\e[0m"
103+
make clean
104+
echo "#define RAYGUI_IMPLEMENTATION" > raygui.c && echo "#include <extras/raygui.h>" >> raygui.c
115105
#echo "#define PHYSAC_IMPLEMENTATION" > physac.c && echo "#include <extras/physac.h>" >> physac.c
116-
#make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_MODULE_RAYGUI=TRUE LDFLAG=-m32
117-
#rm -f ../../libs/x86_32-linux/*
118-
#cp libraylib.so.5.5.0 ../../libs/x86_32-linux/libraylib.so
106+
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_MODULE_RAYGUI=TRUE LDFLAG=-m32
107+
rm -f ../../libs/x86_32-linux/*
108+
cp libraylib.so.5.5.0 ../../libs/x86_32-linux/libraylib.so
119109

120110
#echo -e "\e[34m \e[1m"
121-
#echo "Build x86_32_LINUX Statics"
122-
#echo -e "\e[0m"
123-
#make clean
124-
#echo "#define RAYGUI_IMPLEMENTATION" > raygui.c && echo "#include <extras/raygui.h>" >> raygui.c
111+
echo "Build x86_32_LINUX Statics"
112+
echo -e "\e[0m"
113+
make clean
114+
echo "#define RAYGUI_IMPLEMENTATION" > raygui.c && echo "#include <extras/raygui.h>" >> raygui.c
125115
#echo "#define PHYSAC_IMPLEMENTATION" > physac.c && echo "#include <extras/physac.h>" >> physac.c
126-
#make PLATFORM=PLATFORM_DESKTOP RAYLIB_MODULE_RAYGUI=TRUE LDFLAG=-m32
127-
#cp libraylib.a ../../libs/x86_32-linux
116+
make PLATFORM=PLATFORM_DESKTOP RAYLIB_MODULE_RAYGUI=TRUE LDFLAG=-m32
117+
cp libraylib.a ../../libs/x86_32-linux
128118
#--------------------------------------------------------------------------------------------------------
129119

130120
#echo -e "\e[34m \e[1m"
@@ -150,28 +140,28 @@ echo "#define RAYGUI_IMPLEMENTATION" > raygui.c && echo "#include <extras/raygui
150140

151141
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_MODULE_RAYGUI=TRUE OS=Windows_NT CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar
152142
rm -f ../../libs/x86_64-win64/*
153-
cp libraylibdll.a ../../libs/x86_64-win64
154-
cp raylib.dll ../../libs/x86_64-win64
143+
#cp libraylibdll.a ../../libs/x86_64-win64
144+
cp raylib.dll ../../libs/x86_64-win64/libraylib.dll
155145

156146

157147

158148
#---------------------------------------------------------------------------------------------------------
159149

160-
#make clean
161-
#echo -e "\e[34m \e[1m"
162-
#echo " build x32 windows"
163-
#echo -e "\e[0m"
164-
#i686-w64-mingw32-windres raylib.rc -o raylib.rc.data
165-
#i686-w64-mingw32-windres raylib.dll.rc -o raylib.dll.rc.data
150+
make clean
151+
echo -e "\e[34m \e[1m"
152+
echo " build x32 windows"
153+
echo -e "\e[0m"
154+
i686-w64-mingw32-windres raylib.rc -o raylib.rc.data
155+
i686-w64-mingw32-windres raylib.dll.rc -o raylib.dll.rc.data
166156

167-
#echo "#define RAYGUI_IMPLEMENTATION" > raygui.c && echo "#include <extras/raygui.h>" >> raygui.c
157+
echo "#define RAYGUI_IMPLEMENTATION" > raygui.c && echo "#include <extras/raygui.h>" >> raygui.c
168158
#echo "#define PHYSAC_IMPLEMENTATION" > physac.c && echo "#include <extras/physac.h>" >> physac.c
169159

170-
#make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_MODULE_RAYGUI=TRUE OS=Windows_NT CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar
160+
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_MODULE_RAYGUI=TRUE OS=Windows_NT CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar
171161

172-
#rm -f ../../libs/i386-win32/*
162+
rm -f ../../libs/i386-win32/*
173163
#cp libraylibdll.a ../../libs/i386-win32
174-
#cp raylib.dll ../../libs/i386-win32
164+
cp raylib.dll ../../libs/i386-win32/libraylib.dll
175165

176166
#---------------------------------------------------------------------------------------------------
177167
cp raylib.h ../../headers/extras/ray-media/src/raylib.h
@@ -183,41 +173,6 @@ cd ../../
183173
rm -rvf raylib_tmp
184174
#---------------------------------------------------------------------------------------------------
185175

186-
echo -e "\e[34m \e[1m"
187-
echo "RayMedia x86_64-linux "
188-
echo -e "\e[0m"
189-
cd headers/extras/ray-media/
190-
mkdir build
191-
cd build
192-
193-
cmake -DBUILD_SHARED_LIBS=ON ..
194-
make
195-
cp librmedia.a ../../../../libs/x86_64-linux
196-
197-
cmake -DBUILD_SHARED_LIBS=OFF ..
198-
make
199-
#cp librmedia.so ../../../../libs/x86_64-linux
200-
cp librmedia.so.0 ../../../../libs/x86_64-linux
201-
202-
cd ../
203-
rm -rvf build
204-
205-
rm src/raylib.h
206-
207-
cd ../
208-
cd ray-gizmo
209-
mkdir build
210-
cd build
211-
212-
cmake -DBUILD_SHARED_LIBS=ON ..
213-
make
214-
cp libraygizmo.a ../../../../libs/x86_64-linux
215-
216-
cmake -DBUILD_SHARED_LIBS=OFF ..
217-
make
218-
#cp libraygizmo.so ../../../../libs/x86_64-linux
219-
cp libraygizmo.so.0 ../../../../libs/x86_64-linux
220-
221176
cd ../
222177
rm -rvf build
223178
rm src/raylib.h

examples/extra/rayGizmo/raygizmos.lpi

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<CONFIG>
3+
<ProjectOptions>
4+
<Version Value="12"/>
5+
<General>
6+
<Flags>
7+
<MainUnitHasCreateFormStatements Value="False"/>
8+
<MainUnitHasTitleStatement Value="False"/>
9+
<MainUnitHasScaledStatement Value="False"/>
10+
</Flags>
11+
<SessionStorage Value="InProjectDir"/>
12+
<Title Value="raygizmos"/>
13+
<UseAppBundle Value="False"/>
14+
<ResourceType Value="res"/>
15+
</General>
16+
<BuildModes>
17+
<Item Name="Default" Default="True"/>
18+
</BuildModes>
19+
<PublishOptions>
20+
<Version Value="2"/>
21+
<UseFileFilters Value="True"/>
22+
</PublishOptions>
23+
<RunParams>
24+
<FormatVersion Value="2"/>
25+
</RunParams>
26+
<RequiredPackages>
27+
<Item>
28+
<PackageName Value="ray4lazgizmo"/>
29+
</Item>
30+
<Item>
31+
<PackageName Value="ray4laz"/>
32+
</Item>
33+
</RequiredPackages>
34+
<Units>
35+
<Unit>
36+
<Filename Value="raygizmos.lpr"/>
37+
<IsPartOfProject Value="True"/>
38+
</Unit>
39+
</Units>
40+
</ProjectOptions>
41+
<CompilerOptions>
42+
<Version Value="11"/>
43+
<Target>
44+
<Filename Value="../../../binary/raygizmos"/>
45+
</Target>
46+
<SearchPaths>
47+
<IncludeFiles Value="$(ProjOutDir)"/>
48+
<UnitOutputDirectory Value="../../../temp/$(TargetCPU)-$(TargetOS)"/>
49+
</SearchPaths>
50+
<Linking>
51+
<Debugging>
52+
<DebugInfoType Value="dsDwarf3"/>
53+
</Debugging>
54+
</Linking>
55+
</CompilerOptions>
56+
<Debugging>
57+
<Exceptions>
58+
<Item>
59+
<Name Value="EAbort"/>
60+
</Item>
61+
<Item>
62+
<Name Value="ECodetoolError"/>
63+
</Item>
64+
<Item>
65+
<Name Value="EFOpenError"/>
66+
</Item>
67+
</Exceptions>
68+
</Debugging>
69+
</CONFIG>

examples/extra/rayGizmo/raygizmos.lpr

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
program raygizmos;
2+
3+
{$mode objfpc}{$H+}
4+
5+
uses
6+
{$IFNDEF WINDOWS}cthreads,{$ENDIF}
7+
Classes, SysUtils, CustApp, raylib, raymath, raygizmo;
8+
9+
type
10+
{ TRayApplication }
11+
TRayApplication = class(TCustomApplication)
12+
protected
13+
procedure DoRun; override;
14+
public
15+
constructor Create(TheOwner: TComponent); override;
16+
destructor Destroy; override;
17+
end;
18+
19+
const AppTitle = 'raylib - basic window';
20+
CRATE_COUNT = 4;
21+
var crateTransforms: array [0..CRATE_COUNT -1] of TTransform;
22+
crateTexture: TTexture;
23+
crateModel: TModel;
24+
cam: TCamera;
25+
gizmoTypes: array[0..CRATE_COUNT -1] of integer;
26+
{ TRayApplication }
27+
28+
constructor TRayApplication.Create(TheOwner: TComponent);
29+
var i: integer;
30+
begin
31+
inherited Create(TheOwner);
32+
33+
InitWindow(800, 600, AppTitle); // for window settings, look at example - window flags
34+
35+
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
36+
37+
// Initialize the transforms with default values
38+
for i:= 0 to CRATE_COUNT -1 do
39+
begin
40+
crateTransforms[i] := GizmoIdentity();
41+
crateTransforms[i].translation.x := -15.0 + 6.0 * i; // Offset crates along the X-axis
42+
end;
43+
44+
// Assign each crate a different gizmo type
45+
gizmoTypes[0] := GIZMO_TRANSLATE;
46+
gizmoTypes[1] := GIZMO_SCALE;
47+
gizmoTypes[2] := GIZMO_ROTATE;
48+
gizmoTypes[3] := GIZMO_ALL;
49+
50+
// Load the crate texture.
51+
crateTexture := LoadTexture('resources/models/crate_texture.jpg');
52+
GenTextureMipmaps(@crateTexture);
53+
SetTextureFilter(crateTexture, TEXTURE_FILTER_TRILINEAR);
54+
55+
// Load the crate model and apply the texture.
56+
crateModel := LoadModel('resources/models/crate_model.obj');
57+
crateModel.materials[0].maps[MATERIAL_MAP_ALBEDO].texture := crateTexture;
58+
59+
// Setup the 3D camera.
60+
cam.fovy := 45.0;
61+
cam.position := Vector3Create( 7.5, 5.5, 5.0 );
62+
cam.target := Vector3Create( 0, 1.5, 0 );
63+
cam.up := Vector3Create( 0, 1, 0 );
64+
cam.projection := CAMERA_PERSPECTIVE;
65+
66+
67+
end;
68+
69+
procedure TRayApplication.DoRun;
70+
var i: integer;
71+
begin
72+
73+
while (not WindowShouldClose) do // Detect window close button or ESC key
74+
begin
75+
BeginDrawing();
76+
77+
// Clear the background with a dark blue color.
78+
ClearBackground(ColorCreate( 0, 0, 25, 255 ));
79+
80+
BeginMode3D(cam);
81+
82+
// Draw the crates with their updated transforms
83+
for i := 0 to CRATE_COUNT - 1 do
84+
begin
85+
crateModel.transform := GizmoToMatrix(crateTransforms[i]);
86+
DrawModel(crateModel, Vector3Zero(), 1.0, WHITE);
87+
end;
88+
89+
// Draw the gizmos and handle user input
90+
for i := 0 to CRATE_COUNT - 1 do
91+
DrawGizmo3D(gizmoTypes[i], @crateTransforms[i]);
92+
93+
94+
EndMode3D();
95+
EndDrawing();
96+
97+
end;
98+
99+
// Stop program loop
100+
Terminate;
101+
end;
102+
103+
destructor TRayApplication.Destroy;
104+
begin
105+
// Unload resources and clean up.
106+
UnloadTexture(crateTexture);
107+
UnloadModel(crateModel);
108+
// De-Initialization
109+
CloseWindow(); // Close window and OpenGL context
110+
111+
// Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
112+
TraceLog(LOG_INFO, 'your first window is close and destroy');
113+
114+
115+
inherited Destroy;
116+
end;
117+
118+
var
119+
Application: TRayApplication;
120+
begin
121+
Application:=TRayApplication.Create(nil);
122+
Application.Title:=AppTitle;
123+
Application.Run;
124+
Application.Free;
125+
end.
126+

0 commit comments

Comments
 (0)