Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphics/imgui #47

Merged
merged 107 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 97 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
f4bf32c
data, shaders
AlemSnyder Dec 29, 2022
7ca4afc
make render dir
AlemSnyder Jan 3, 2023
cb27b55
background works
AlemSnyder Jan 3, 2023
56c4b7c
stars work
AlemSnyder Jan 3, 2023
ce12859
ues radians
AlemSnyder Jan 3, 2023
9e5dd6d
round stars
AlemSnyder Jan 4, 2023
eaa4fdf
scaled correctly
AlemSnyder Jan 5, 2023
4f7b8bd
Moved data files to data folder
AlemSnyder Jan 5, 2023
88d8e1d
comments
AlemSnyder Jan 6, 2023
5d2c564
Merge branch next main into GUI/SkyBackground
AlemSnyder Jan 7, 2023
19d5968
why does this break?
AlemSnyder Jan 9, 2023
d72eb6c
fixed mismatched names to shader
AlemSnyder Feb 5, 2023
8c4ad24
more standard radial coordinates
AlemSnyder Feb 8, 2023
65aaf2e
star color
AlemSnyder Feb 12, 2023
a81ab06
add imgui
AlemSnyder Mar 23, 2023
8e375af
extant test
AlemSnyder Mar 26, 2023
fcd46ee
moved terrain mesh handlers to world
AlemSnyder Mar 27, 2023
a3554c2
update terrain while running
AlemSnyder Mar 28, 2023
455260d
meshes are pointers
AlemSnyder Mar 29, 2023
40aaf28
Merge branch 'refactoring/terrain' into mesh_edit
AlemSnyder Apr 2, 2023
0a0413e
add random number generator for stars
AlemSnyder Apr 6, 2023
fe3ca5b
removed init, copy operators from terrain mesh
AlemSnyder Apr 6, 2023
1c1678a
init to update
AlemSnyder Apr 7, 2023
b7fad75
Merge branch 'mesh_edit' of https://github.com/AlemSnyder/Fun-Game in…
AlemSnyder Apr 7, 2023
99c8b5e
Merge branch 'refactoring/terrain' into GUI/SkyBackground2
AlemSnyder Apr 9, 2023
946880b
This should have been in the last one
AlemSnyder Apr 9, 2023
fa512cd
renaming, and better file placement
AlemSnyder Apr 9, 2023
53d3263
Merge branch 'main' into mesh_edit
AlemSnyder Apr 9, 2023
9101a50
This should have been in the last commit
AlemSnyder Apr 9, 2023
94e4714
formatting
AlemSnyder Apr 10, 2023
9030c3c
ues mesh stars
AlemSnyder Apr 10, 2023
12aea07
stars work
AlemSnyder Apr 10, 2023
49fabf1
more float
AlemSnyder Apr 11, 2023
76603b4
Works
AlemSnyder Apr 11, 2023
5396780
less crashes
AlemSnyder Apr 11, 2023
6221074
fixed star position
AlemSnyder Apr 11, 2023
95978b0
formatting
AlemSnyder Apr 12, 2023
53e623f
include backends files
AlemSnyder Apr 14, 2023
98ba883
this doesn't work
AlemSnyder Apr 14, 2023
4f19b4d
don't know why it works now
AlemSnyder Apr 14, 2023
facb29a
render to texture
AlemSnyder Apr 14, 2023
67d0093
it works
AlemSnyder Apr 14, 2023
820ab77
removed unused code
AlemSnyder Apr 14, 2023
957e844
move sene to imgui
AlemSnyder Apr 14, 2023
162a420
changed image width, and height
AlemSnyder Apr 15, 2023
badbcec
merges that almost work
AlemSnyder Apr 18, 2023
ac8ee63
add stars and enable depth draws
AlemSnyder Apr 18, 2023
df80849
initialize glew in imgui
AlemSnyder Apr 19, 2023
e1145ee
This works, but need to gen buffers
AlemSnyder Apr 20, 2023
ae82d4a
render sene into imgui
AlemSnyder Apr 21, 2023
5687c61
add controls to imgui
AlemSnyder Apr 21, 2023
c50b009
add vertex buffer (works)
AlemSnyder Apr 21, 2023
b6132e1
delete some buffers
AlemSnyder Apr 21, 2023
b561865
move quad_renderer set frame to beneath
AlemSnyder Apr 22, 2023
97a7755
remove borders from scene frame
AlemSnyder Apr 26, 2023
e5a0803
controls only when on frame, flipped scene
AlemSnyder Apr 27, 2023
29fda36
add escape form frame
AlemSnyder Apr 27, 2023
04843de
moved files into scene folder
AlemSnyder Apr 27, 2023
cf8f556
code clear ups
AlemSnyder Apr 29, 2023
175cbf5
multisampeling almost done
AlemSnyder May 3, 2023
75cd1d6
change copying fbo
AlemSnyder May 4, 2023
1cea712
render to frame buffer (not texture)
AlemSnyder May 5, 2023
287311d
added scene object
AlemSnyder May 5, 2023
d18004f
created scene class to handel rendering
AlemSnyder May 6, 2023
1fb218c
Merge branch 'mesh_edit' into Graphics/imgui
AlemSnyder May 7, 2023
bff2334
spelling
AlemSnyder May 7, 2023
d57c1f5
removed unused code
AlemSnyder May 7, 2023
8eff392
add namespace
AlemSnyder May 7, 2023
bc39f0b
move namespaces
AlemSnyder May 7, 2023
861fabc
actually do logging right
AlemSnyder May 8, 2023
0db8e41
changed some log levels
AlemSnyder May 8, 2023
0e24dc3
comments
AlemSnyder May 10, 2023
81dfddf
create fbo handler
AlemSnyder May 10, 2023
996c401
show position
AlemSnyder May 10, 2023
b1820ea
fix comments
AlemSnyder May 11, 2023
0c82291
fix function declaration
AlemSnyder May 11, 2023
63b524a
less code duplication.
AlemSnyder May 12, 2023
c0f99af
apply requested changes
AlemSnyder May 21, 2023
afd07a6
made requested changes
AlemSnyder May 27, 2023
39f53c5
formatting python scripts
AlemSnyder May 28, 2023
655cdb3
spelling
AlemSnyder May 28, 2023
9c1a5ad
formatting lol
AlemSnyder May 28, 2023
5618f08
formatting lol
AlemSnyder May 28, 2023
5e949dd
formatting lol
AlemSnyder May 28, 2023
0310bf4
formatting lol
AlemSnyder May 28, 2023
a858df4
changed | to + for linux using strings not flags
Jun 13, 2023
38c08f3
spelling
Jun 19, 2023
acc499b
Doing sudgestions
Jun 27, 2023
05fdf0d
I forgot this file
Jun 27, 2023
09d6366
more overloading
Jun 27, 2023
ca2f459
operators and rm depreciated
Jul 2, 2023
8327fd4
TYPES
Jul 4, 2023
e69f544
Merge branch 'linux-colors' into Graphics/imgui
Jul 5, 2023
e2fde38
Merge branch 'mesh_edit' into Graphics/imgui
Jul 5, 2023
1bdb0af
Merge remote-tracking branch 'origin/GUI/SkyBackground2' into Graphic…
Jul 6, 2023
7191732
style: format
egelja Jul 23, 2023
b46b283
style: reformat python
egelja Jul 23, 2023
2b3baea
chore: delete copied file
egelja Jul 23, 2023
a3ab927
some comments
Jul 23, 2023
3fa18cd
inline get_logger
Jul 23, 2023
863bf4d
namespaces, and singleton
Jul 23, 2023
506596f
type defs comments, and namespaces
Jul 23, 2023
8adef49
while loops and types
Jul 23, 2023
e60fa4c
fix load terrain
Jul 24, 2023
58e5682
type names, framebufferHandler
Jul 25, 2023
b0e8fe2
This should be everything
Jul 26, 2023
6f1c159
rename gui entrypoint functions
Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: false
LineEnding: LF
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
Expand Down
144 changes: 144 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Sources
*.c text diff=c
*.cc text diff=cpp
*.cxx text diff=cpp
*.cpp text diff=cpp
*.c++ text diff=cpp
*.hpp text diff=cpp
*.h text diff=c
*.h++ text diff=cpp
*.hh text diff=cpp

# Compiled Object files
*.slo binary
*.lo binary
*.o binary
*.obj binary

# Precompiled Headers
*.gch binary
*.pch binary

# Compiled Dynamic libraries
*.so binary
*.dylib binary
*.dll binary

# Compiled Static libraries
*.lai binary
*.la binary
*.a binary
*.lib binary

# Executables
*.exe binary
*.out binary
*.app binary
# Common settings that generally should always be used with your language specific settings

# Auto detect text files and perform LF normalization
# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
* text=auto

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# Text files where line endings should be preserved
*.patch -text

#
# Exclude files from exporting
#

.gitattributes export-ignore
.gitignore export-ignore
# Basic .gitattributes for a python repo.

# Source files
# ============
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.pyz text diff=python

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pickle binary
*.pyc binary
*.pyd binary
*.pyo binary

# Jupyter notebook
*.ipynb text

# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,27 @@
!.vscode/*.code-snippets
!.vscode/c_cpp_properties.json

!vendor/imgui/**.cpp
!vendor/imgui/**.h
!vendor/imgui/**.hpp

vendor/imgui/backends/*

!vendor/imgui/backends/imgui_impl_glfw.h
!vendor/imgui/backends/imgui_impl_opengl3.h
!vendor/imgui/backends/imgui_impl_opengl3_loader.h
!vendor/imgui/backends/imgui_impl_glfw.cpp
!vendor/imgui/backends/imgui_impl_opengl3.cpp

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# imgui file
*.ini

#
# Cmake
#
Expand Down
21 changes: 20 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,28 @@
],
"compilerPath": "C:/msys64/mingw64/bin/g++.exe",
"cStandard": "gnu17",
"cppStandard": "gnu++17",
"cppStandard": "gnu++20",
"intelliSenseMode": "windows-gcc-x64",
"configurationProvider": "ms-vscode.cmake-tools"
},
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/build",
"${workspaceFolder}/**",
"${workspaceFolder}/vendor/quill/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"__VSC_PARSER__"
],
"compilerPath": "/usr/bin/g++",
"cStandard": "gnu17",
"cppStandard": "gnu++20",
"intelliSenseMode": "linux-gcc-x64",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
Expand Down
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"request": "launch",
// Resolved by CMake Tools:
"program": "${command:cmake.launchTargetPath}",
"args": ["StressTest"],
//"args": ["StressTest"],
"args": ["imguiTest"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)

# specify the C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# set the project name
project(FunGame VERSION 0.1.0)
Expand All @@ -14,10 +14,12 @@ file(GLOB SOURCES3 "src/**/**/*.cpp")

file(GLOB SOURCES4 "vendor/*.c*")
file(GLOB SOURCES5 "vendor/json/*.c*")
file(GLOB SOURCES6 "vendor/imgui/*.c*")
file(GLOB SOURCES7 "vendor/imgui/backends/imgui_impl_opengl3.cpp")
file(GLOB SOURCES8 "vendor/imgui/backends/imgui_impl_glfw.cpp")
# don't want to complie quill this way
# file(GLOB SOURCES6 "vendor/**/**/*.c*")

add_executable(FunGame ${SOURCES1} ${SOURCES2} ${SOURCES3} ${SOURCES4} ${SOURCES5} ${SOURCES6})
add_executable(FunGame ${SOURCES1} ${SOURCES2} ${SOURCES3} ${SOURCES4} ${SOURCES5} ${SOURCES6} ${SOURCES7} ${SOURCES8})

add_subdirectory("vendor/quill")

Expand Down Expand Up @@ -63,6 +65,8 @@ else()
set(DEBUG 0)
message(" Debug build, data will be loaded from subdirs ")

target_compile_definitions(FunGame PUBLIC TILE_SET_TEST)

add_custom_target(resources
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/resources ${CMAKE_BINARY_DIR}/resources
Expand Down
5 changes: 5 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ Terrain generation

GUI
deal with rotation
add fourth int to position
add for loop into vertex shader that rotates the
fix texture map
there seems to be a bug somewhere between getting the color id
and putting the texture on the gpu.
Loading