Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FIG Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BATON Theau
FIG Project
Commits
fc01a299
You need to sign in or sign up before continuing.
Commit
fc01a299
authored
8 months ago
by
BATON Theau
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
0342a3da
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+5
-1
5 additions, 1 deletion
README.md
assets/images/Screenshot_1.png
+0
-0
0 additions, 0 deletions
assets/images/Screenshot_1.png
source/main.cpp
+34
-9
34 additions, 9 deletions
source/main.cpp
with
39 additions
and
10 deletions
README.md
+
5
−
1
View file @
fc01a299
...
@@ -2,7 +2,11 @@
...
@@ -2,7 +2,11 @@
## Images
## Images
[
Screen_shot_0
](
assets/images/Screenshot_0.png
)
<p
float=
"left"
>
<img
src=
"assets/images/Screenshot_0.png"
width=
"280"
/>
<img
src=
"assets/images/Screenshot_1.png"
width=
"280"
/>
</p>
## Building
## Building
...
...
This diff is collapsed.
Click to expand it.
assets/images/Screenshot_1.png
0 → 100644
+
0
−
0
View file @
fc01a299
5.78 KiB
This diff is collapsed.
Click to expand it.
source/main.cpp
+
34
−
9
View file @
fc01a299
...
@@ -46,7 +46,7 @@ int main(int argc, const char * argv[]) {
...
@@ -46,7 +46,7 @@ int main(int argc, const char * argv[]) {
std
::
cout
<<
"Group Inited"
<<
std
::
endl
;
std
::
cout
<<
"Group Inited"
<<
std
::
endl
;
//? Image 1
//? Image 1
std
::
vector
<
int
>
map
=
{
/*
std::vector<int> map = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 3, 0, 0, 0, 0,
0, 0, 0, 0, 3, 3, 0, 0, 0, 0,
0, 0, 0, 3, 2, 2, 3, 0, 0, 0,
0, 0, 0, 3, 2, 2, 3, 0, 0, 0,
...
@@ -57,6 +57,24 @@ int main(int argc, const char * argv[]) {
...
@@ -57,6 +57,24 @@ int main(int argc, const char * argv[]) {
0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};*/
std
::
vector
<
int
>
map
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
2
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
2
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
0
,
0
,
0
,
2
,
0
,
0
,
1
,
3
,
1
,
1
,
2
,
1
,
1
,
3
,
1
,
0
,
0
,
2
,
2
,
0
,
0
,
3
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
3
,
0
,
0
,
2
,
1
,
0
,
0
,
1
,
1
,
1
,
2
,
1
,
2
,
1
,
1
,
1
,
0
,
0
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
1
,
1
,
1
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
2
,
2
,
0
,
1
,
0
,
2
,
2
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
};
};
size_t
x
=
0
;
size_t
x
=
0
;
...
@@ -64,17 +82,20 @@ int main(int argc, const char * argv[]) {
...
@@ -64,17 +82,20 @@ int main(int argc, const char * argv[]) {
std
::
vector
<
std
::
unique_ptr
<
megu
::
Image
>>
images
;
std
::
vector
<
std
::
unique_ptr
<
megu
::
Image
>>
images
;
megu
::
Texture
texture_0
;
texture_0
.
store
(
megu
::
TextureBuffer
(
"assets/textures/Cube_White.png"
));
megu
::
Texture
texture_1
;
megu
::
Texture
texture_1
;
texture_1
.
store
(
megu
::
TextureBuffer
(
"assets/textures/Cube_
GLab_1
.png"
));
texture_1
.
store
(
megu
::
TextureBuffer
(
"assets/textures/Cube_
White
.png"
));
megu
::
Texture
texture_2
;
megu
::
Texture
texture_2
;
texture_2
.
store
(
megu
::
TextureBuffer
(
"assets/textures/Cube_
GLab_2
.png"
));
texture_2
.
store
(
megu
::
TextureBuffer
(
"assets/textures/Cube_
Red
.png"
));
megu
::
Texture
texture_3
;
megu
::
Texture
texture_3
;
texture_3
.
store
(
megu
::
TextureBuffer
(
"assets/textures/Cube_
GLab_3
.png"
));
texture_3
.
store
(
megu
::
TextureBuffer
(
"assets/textures/Cube_
Blue
.png"
));
for
(
auto
id
:
map
)
{
for
(
auto
id
:
map
)
{
if
(
x
==
1
0
)
{
if
(
x
==
1
5
)
{
x
=
0
;
x
=
0
;
++
y
;
++
y
;
}
}
...
@@ -93,11 +114,15 @@ int main(int argc, const char * argv[]) {
...
@@ -93,11 +114,15 @@ int main(int argc, const char * argv[]) {
case
3
:
case
3
:
images
.
push_back
(
std
::
make_unique
<
megu
::
Image
>
(
texture_3
));
images
.
push_back
(
std
::
make_unique
<
megu
::
Image
>
(
texture_3
));
break
;
break
;
default:
images
.
push_back
(
std
::
make_unique
<
megu
::
Image
>
(
texture_0
));
break
;
}
}
glm
::
vec2
pos
=
to_screen_coordinate
({
x
,
y
},
32.f
,
32.f
,
1
.f
);
glm
::
vec2
pos
=
to_screen_coordinate
({
x
,
y
},
32.f
,
32.f
,
0
.f
);
images
.
back
()
->
setPosition
({
pos
.
x
+
window
.
width
()
/
2
-
16
.f
,
pos
.
y
+
window
.
height
()
/
4
});
images
.
back
()
->
setPosition
({
pos
.
x
+
window
.
width
()
/
2
+
24
.f
,
pos
.
y
+
window
.
height
()
/
8
});
}
}
++
x
;
++
x
;
...
@@ -163,8 +188,8 @@ int main(int argc, const char * argv[]) {
...
@@ -163,8 +188,8 @@ int main(int argc, const char * argv[]) {
engine
.
push
(
0
,
basic_renderer
);
engine
.
push
(
0
,
basic_renderer
);
engine
.
push
(
0
,
1
,
group
);
engine
.
push
(
0
,
0
,
group
);
engine
.
push
(
0
,
0
,
group_2
);
//
engine.push(0, 0, group_2);
//? Render Loop
//? Render Loop
std
::
cout
<<
"Render Loop Begin !"
<<
std
::
endl
;
std
::
cout
<<
"Render Loop Begin !"
<<
std
::
endl
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment