Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/cmake-build-debug
/.idea
/cmake-build-debug-visual-studio
/cmake-build-debug-visual-studio
/cmake-build-debug-visual-studio
22 changes: 15 additions & 7 deletions Bonder-Graphics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
add_library(Bonder-Graphics src/Graphics.cpp)
# TODO: change SRC/graphics to file_recourse,
set(GLFW_DIR "${CMAKE_SOURCE_DIR}/vendor/GLFW")
target_include_directories(Bonder-Graphics PUBLIC "${GLFW_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/include")
cmake_minimum_required(VERSION 3.30)
project("TestingGraphics")

file(GLOB_RECURSE MY_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")

#file(GLOB_RECURSE MY_HEADERS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/headers/*.h")

# add_executable (bonderGraphicsTest SRC/testGraphics.cpp - link to mysources)
#TODO: fix this code above to make it actively do something. Also, add Bonder-GraphicsTest in link libs FIRST
add_library(Bonder-Graphics ${MY_SOURCES})
target_include_directories(Bonder-Graphics PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/headers/" PRIVATE vendor/glfw-3.3.2/include)

target_link_libraries(Bonder-Graphics "${GLFW_DIR}/lib/glfw3.lib" opengl32.lib winmm.lib gdi32.lib)
#add_subdirectory("${CMAKE_SOURCE_DIR}/vendor/glfw-3.3.2")

add_executable (${PROJECT_NAME} ${MY_SOURCES})
# Make sure to call ModuleCommon after adding the executable.
include(../ModuleCommon.cmake)
target_link_libraries(${PROJECT_NAME}
glfw
opengl32.lib
winmm.lib
gdi32.lib)
18 changes: 18 additions & 0 deletions Bonder-Graphics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<h1>BGraphics</h1>
<h1>Version 0.01:</h1>
<h2>Contributers</h2>

<u1>

<li> <a href="https://www.example.com"> SilverShark </a> - Rufus4 </li>
</u1>
<h2>Description</h2>
<ul>
<p> Handles all the graphics, and drawing so we don't have to for example, draw triangles by hand.</p>

</ul>

<h1>Changes:</h1>
<ul>

</ul>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "glfw3.h"
#include <GLFW/glfw3.h>
#ifndef GRAPHICS_H
#define GRAPHICS_H

Expand Down
5 changes: 3 additions & 2 deletions Bonder-Graphics/src/Graphics.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "BonderGraphics/Graphics.h"
#include <iostream>
#include <iostream>
#include "GLFW/glfw3.h"
#include <Graphics.h>
#define LOG(x) std::cout << x << std::endl;


Expand Down
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
project(bonderEngine)

set(CMAKE_CXX_STANDARD 20)
set(GLFW_DIR "${CMAKE_SOURCE_DIR}/vendor/GLFW")

file(GLOB_RECURSE MY_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")

include_directories("${GLFW_DIR}/include")

# Add subdirectories for modules
add_subdirectory(Bonder-Graphics)
add_subdirectory(Bonder-Core)

# Add subdir for graphics.
add_subdirectory("${CMAKE_SOURCE_DIR}/vendor/glfw-3.3.2")
target_include_directories(Bonder-Graphics PRIVATE vendor/glfw-3.3.2/include)

add_executable(${PROJECT_NAME} src/main.cpp)
target_link_libraries(${PROJECT_NAME}
"${GLFW_DIR}/lib/glfw3.lib"
glfw
opengl32.lib
winmm.lib
gdi32.lib
Expand Down
3 changes: 3 additions & 0 deletions ModuleCommon.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
file(GLOB_RECURSE MY_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")

target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/headers")
8 changes: 4 additions & 4 deletions bonder-Core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_library(Bonder-Core src/input.cpp)

file(GLOB_RECURSE MY_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
add_library(Bonder-Core ${MY_SOURCES})

target_include_directories(Bonder-Core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/headers")

target_link_libraries(Bonder-Core)
add_executable(bonderTestingCore ${MY_SOURCES})
target_link_libraries(bonderTestingCore Bonder-Core)
4 changes: 3 additions & 1 deletion bonder-Core/headers/input.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef INPUT_H
#include <stdio.h>
#ifndef INPUT_H
#define INPUT_H


class input {

};
Expand Down
5 changes: 3 additions & 2 deletions bonder-Core/src/input.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "input.h"

#include <stdio.h>
int main() {

printf("Hello World!\n");
return 0;
}
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <iostream>
#include "BonderGraphics/Graphics.h"
#include <Graphics.h>
#define LOG(x) std::cout << x << std::endl;

int main(void) {
Expand Down
Binary file removed vendor/GLFW/lib/glfw3.dll
Binary file not shown.
Binary file removed vendor/GLFW/lib/glfw3.lib
Binary file not shown.
Binary file removed vendor/GLFW/lib/glfw3_mt.lib
Binary file not shown.
Binary file removed vendor/GLFW/lib/glfw3dll.lib
Binary file not shown.
10 changes: 10 additions & 0 deletions vendor/glfw-3.3.2/.mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Camilla Löwy <elmindreda@glfw.org> <elmindreda@users.sourceforge.net>
Camilla Löwy <elmindreda@glfw.org> <elmindreda@elmindreda.org>
Camilla Löwy <elmindreda@glfw.org>

Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

Marcus Geelnard <m@bitsnbites.eu> <marcus256@users.sourceforge.net>
Marcus Geelnard <m@bitsnbites.eu> <marcus@geelnards-pc.(none)>
Marcus Geelnard <m@bitsnbites.eu>

33 changes: 33 additions & 0 deletions vendor/glfw-3.3.2/CMake/GenerateMappings.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Usage:
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>

set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
set(template_path "${CMAKE_ARGV3}")
set(target_path "${CMAKE_ARGV4}")

if (NOT EXISTS "${template_path}")
message(FATAL_ERROR "Failed to find template file ${template_path}")
endif()

file(DOWNLOAD "${source_url}" "${source_path}"
STATUS download_status
TLS_VERIFY on)

list(GET download_status 0 status_code)
list(GET download_status 1 status_message)

if (status_code)
message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}")
endif()

file(STRINGS "${source_path}" lines)
foreach(line ${lines})
if ("${line}" MATCHES "^[0-9a-fA-F].*$")
set(GLFW_GAMEPAD_MAPPINGS "${GLFW_GAMEPAD_MAPPINGS}\"${line}\",\n")
endif()
endforeach()

configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX)
file(REMOVE "${source_path}")

38 changes: 38 additions & 0 deletions vendor/glfw-3.3.2/CMake/MacOSXBundleInfo.plist.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
13 changes: 13 additions & 0 deletions vendor/glfw-3.3.2/CMake/i686-w64-mingw32-clang.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Define the environment for cross-compiling with 32-bit MinGW-w64 Clang
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "i686-w64-mingw32-clang")
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-clang++")
SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")

# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
13 changes: 13 additions & 0 deletions vendor/glfw-3.3.2/CMake/i686-w64-mingw32.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Define the environment for cross-compiling with 32-bit MinGW-w64 GCC
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc")
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++")
SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")

# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
17 changes: 17 additions & 0 deletions vendor/glfw-3.3.2/CMake/modules/FindEpollShim.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Find EpollShim
# Once done, this will define
#
# EPOLLSHIM_FOUND - System has EpollShim
# EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories
# EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim

find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)

if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
set(EPOLLSHIM_FOUND TRUE)
endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES)
18 changes: 18 additions & 0 deletions vendor/glfw-3.3.2/CMake/modules/FindOSMesa.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Try to find OSMesa on a Unix system
#
# This will define:
#
# OSMESA_LIBRARIES - Link these to use OSMesa
# OSMESA_INCLUDE_DIR - Include directory for OSMesa
#
# Copyright (c) 2014 Brandon Schaefer <brandon.schaefer@canonical.com>

if (NOT WIN32)

find_package (PkgConfig)
pkg_check_modules (PKG_OSMESA QUIET osmesa)

set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS})
set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES})

endif ()
26 changes: 26 additions & 0 deletions vendor/glfw-3.3.2/CMake/modules/FindWaylandProtocols.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
find_package(PkgConfig)

pkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION})

execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR
RESULT_VARIABLE _pkgconfig_failed)
if (_pkgconfig_failed)
message(FATAL_ERROR "Missing wayland-protocols pkgdatadir")
endif()

string(REGEX REPLACE "[\r\n]" "" WaylandProtocols_PKGDATADIR "${WaylandProtocols_PKGDATADIR}")

find_package_handle_standard_args(WaylandProtocols
FOUND_VAR
WaylandProtocols_FOUND
REQUIRED_VARS
WaylandProtocols_PKGDATADIR
VERSION_VAR
WaylandProtocols_VERSION
HANDLE_COMPONENTS
)

set(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND})
set(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR})
set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION})
34 changes: 34 additions & 0 deletions vendor/glfw-3.3.2/CMake/modules/FindXKBCommon.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# - Try to find XKBCommon
# Once done, this will define
#
# XKBCOMMON_FOUND - System has XKBCommon
# XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories
# XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon
# XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon

find_package(PkgConfig)
pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)
set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})

find_path(XKBCOMMON_INCLUDE_DIR
NAMES xkbcommon/xkbcommon.h
HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
)

find_library(XKBCOMMON_LIBRARY
NAMES xkbcommon
HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS}
)

set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})
set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS})
set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(XKBCommon DEFAULT_MSG
XKBCOMMON_LIBRARY
XKBCOMMON_INCLUDE_DIR
)

mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)

13 changes: 13 additions & 0 deletions vendor/glfw-3.3.2/CMake/x86_64-w64-mingw32-clang.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Define the environment for cross-compiling with 64-bit MinGW-w64 Clang
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-clang")
SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-clang++")
SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib")

# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
13 changes: 13 additions & 0 deletions vendor/glfw-3.3.2/CMake/x86_64-w64-mingw32.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Define the environment for cross-compiling with 64-bit MinGW-w64 GCC
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc")
SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++")
SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib")

# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Loading
Loading