All Projects → felselva → Swfw

felselva / Swfw

Licence: zlib
Pure C Simple Window Framework (to be rebased soon).

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Swfw

Shadergen
Proof-of-concept library for generating HLSL, GLSL, and Metal shader code from C#,
Stars: ✭ 395 (+1617.39%)
Mutual labels:  opengl, vulkan
Rust Skia
Safe Skia Bindings for Rust
Stars: ✭ 450 (+1856.52%)
Mutual labels:  opengl, vulkan
Fiber2d
Cross-platform 2D Game Engine in pure Swift
Stars: ✭ 415 (+1704.35%)
Mutual labels:  opengl, vulkan
Mango
mango fun framework
Stars: ✭ 343 (+1391.3%)
Mutual labels:  opengl, vulkan
Silk.net
The high-speed OpenAL, OpenGL, Vulkan, and GLFW bindings library your mother warned you about.
Stars: ✭ 534 (+2221.74%)
Mutual labels:  opengl, vulkan
Lumos
Cross-Platform C++ 2D/3D game engine
Stars: ✭ 343 (+1391.3%)
Mutual labels:  opengl, vulkan
Graphicsfuzz
A testing framework for automatically finding and simplifying bugs in graphics shader compilers.
Stars: ✭ 448 (+1847.83%)
Mutual labels:  opengl, vulkan
Lwjgl3
LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan), audio (OpenAL), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR) applications.
Stars: ✭ 3,540 (+15291.3%)
Mutual labels:  opengl, vulkan
Bulllord Engine
lightspeed lightweight elegant game engine in pure c
Stars: ✭ 539 (+2243.48%)
Mutual labels:  opengl, vulkan
Gfx
[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
Stars: ✭ 5,045 (+21834.78%)
Mutual labels:  opengl, vulkan
Magnum
Lightweight and modular C++11 graphics middleware for games and data visualization
Stars: ✭ 3,728 (+16108.7%)
Mutual labels:  opengl, vulkan
Renderdoc
RenderDoc is a stand-alone graphics debugging tool.
Stars: ✭ 5,969 (+25852.17%)
Mutual labels:  opengl, vulkan
Rspirv
Rust implementation of SPIR-V module processing functionalities
Stars: ✭ 332 (+1343.48%)
Mutual labels:  opengl, vulkan
Kiero
Universal graphical hook for a D3D9-D3D12, OpenGL and Vulkan based games.
Stars: ✭ 374 (+1526.09%)
Mutual labels:  opengl, vulkan
Vk Gl Cts
Khronos Vulkan, OpenGL, and OpenGL ES Conformance Tests
Stars: ✭ 324 (+1308.7%)
Mutual labels:  opengl, vulkan
Oreon Engine
OpenGL/Vulkan Java 3D Engine
Stars: ✭ 431 (+1773.91%)
Mutual labels:  opengl, vulkan
Nazaraengine
Nazara Engine is a fast, complete, cross-platform, object-oriented API which can help you in your daily developper life.
Stars: ✭ 279 (+1113.04%)
Mutual labels:  opengl, vulkan
Bansheeengine
Modern C++14 game engine with Vulkan support, fully featured editor and C# scripting
Stars: ✭ 2,906 (+12534.78%)
Mutual labels:  opengl, vulkan
Pmtech
Lightweight, multi-platform, data-oriented game engine.
Stars: ✭ 478 (+1978.26%)
Mutual labels:  opengl, vulkan
Vkquake2
id Software's Quake 2 v3.21 with mission packs and Vulkan support (Windows, Linux, MacOS, FreeBSD, Raspberry Pi 4)
Stars: ✭ 543 (+2260.87%)
Mutual labels:  vulkan, freebsd

SWFW - Simple Window Framework

This library is a cross-platform simple window framework containing only two files, swfw.c and swfw.h.

Version

This library still hasn't reached its first major release, which means that the API might change and break backward compatility.

Planned Support

  • Platforms:

    • Linux and BSD in-progress
      • X11 in-progress
      • Wayland in-progress
    • Windows not-started
    • Mac OS not-started
    • Web (using Emscripten) not-started
    • Mobile (Android and iOS) not-started
  • Graphic APIs:

    • No hardware acceleration
    • GL
    • Vulkan

The graphic APIs will be supported depending on the platform.

  • Input:
    • Keyboard in-progress
    • Mouse in-progress
    • Tablet not-started
    • Controller not-started

As controller and tablet input are not used by everyone, especially by small developers, it will be possible to disable their implementation in compilation time using macros. By default, their implementation will be enabled.

Building

This project doesn't include a build system because it's intended that you add the files swfw.c and swfw.h in the build system of your project.

Linux and BSD

On Linux and BSD, the library can be compiled to support only X11, only Wayland, or both.

The macro SWFW_X11 is used for supporting X11, and the macro SWFW_WAYLAND is used for supporting Wayland. With GCC, the macros can be defined using the -D option:

# When no macro is provided, `SWFW_X11` is automatically defined internally.
gcc -c ./swfw.c
gcc -DSWFW_X11 -c ./swfw.c
gcc -DSWFW_WAYLAND -c ./swfw.c
gcc -DSWFW_X11 -DSWFW_WAYLAND -c ./swfw.c

The last option above is for building with support for both X11 and Wayland backends.

On Linux and BSD, when including swfw.h in your file, the same macros for the supported backends should be defined before the inclusion of the header:

#if defined(__bsdi__) || defined(__linux__)
	#define SWFW_X11
#endif
#include "swfw.h"
#if defined(__bsdi__) || defined(__linux__)
	#define SWFW_WAYLAND
#endif
#include "swfw.h"
#if defined(__bsdi__) || defined(__linux__)
	#define SWFW_X11
	#define SWFW_WAYLAND
#endif
#include "swfw.h"

Windows, Mac OS and Web

On Windows, Mac OS and Web, there are only one backend for each of these platforms, then there's no need to define any backend macro, only include the files swfw.c and swfw.h in the build system.

Contributing

Contributions are very welcome. The coding style is similar to Linux Kernel coding style, but some flexibiliy is allowed.

Contact

You can use the e-mail in my profile to contact me.

License

The source code of this project is licensed under the terms of the ZLIB license:

Copyright (C) 2017 Felipe Ferreira da Silva

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].