renamed project
parent
4ac1ad4740
commit
9f2a6025e0
|
@ -1,10 +1,10 @@
|
|||
# kelgin-window
|
||||
# forstio-window
|
||||
|
||||
Window creation and OpenGL context creation library with a little more abstraction compared to other libraries.
|
||||
|
||||
# Dependencies
|
||||
|
||||
* kelgin
|
||||
* forstio
|
||||
* C++ compiler (g++/clang++) with std++17
|
||||
* scons
|
||||
|
||||
|
|
18
SConstruct
18
SConstruct
|
@ -29,11 +29,11 @@ def add_kel_source_files(self, sources, filetype, lib_env=None, shared=False, ta
|
|||
sources.append( self.StaticObject( target=target_name, source=path ) )
|
||||
pass
|
||||
|
||||
env=Environment(CPPPATH=['#source','#','#driver'],
|
||||
env=Environment(ENV=os.environ,CPPPATH=['#source','#','#driver'],
|
||||
CXX='clang++',
|
||||
CPPDEFINES=['GIN_UNIX_XCB'],
|
||||
CXXFLAGS=['-std=c++17','-g','-Wall','-Wextra'],
|
||||
LIBS=['kelgin','xcb','X11','X11-xcb'])
|
||||
CPPDEFINES=['SAW_UNIX_XCB'],
|
||||
CXXFLAGS=['-std=c++20','-g','-Wall','-Wextra'],
|
||||
LIBS=['forstio','xcb','X11','X11-xcb'])
|
||||
env.__class__.add_source_files = add_kel_source_files
|
||||
|
||||
env.sources = []
|
||||
|
@ -43,7 +43,7 @@ env.gl_sources = []
|
|||
env.gl_headers = []
|
||||
|
||||
Export('env')
|
||||
SConscript('source/SConscript')
|
||||
SConscript('source/forstio/window/SConscript')
|
||||
SConscript('driver/SConscript')
|
||||
|
||||
# Library build
|
||||
|
@ -53,12 +53,12 @@ env_library = env.Clone()
|
|||
env.objects_shared = []
|
||||
env_library.add_source_files(env.objects_shared, env.sources, shared=True)
|
||||
env_library.add_source_files(env.objects_shared, env.gl_sources, shared=True)
|
||||
env.library_shared = env_library.SharedLibrary('#bin/kelgin-window', [env.objects_shared])
|
||||
env.library_shared = env_library.SharedLibrary('#bin/forstio-window', [env.objects_shared])
|
||||
|
||||
env.objects_static = []
|
||||
env_library.add_source_files(env.objects_static, env.sources)
|
||||
env_library.add_source_files(env.objects_static, env.gl_sources)
|
||||
env.library_static = env_library.StaticLibrary('#bin/kelgin-window', [env.objects_static])
|
||||
env.library_static = env_library.StaticLibrary('#bin/forstio-window', [env.objects_static])
|
||||
|
||||
env.Alias('library', [env.library_shared, env.library_static])
|
||||
env.Alias('library_shared', env.library_shared)
|
||||
|
@ -86,6 +86,6 @@ env.Alias('format', env.format_actions)
|
|||
env.Alias('all', ['format', 'library_shared', 'library_static'])
|
||||
|
||||
env.Install('/usr/local/lib/', [env.library_shared, env.library_static])
|
||||
env.Install('/usr/local/include/kelgin/window/', [env.headers])
|
||||
env.Install('/usr/local/include/kelgin/window/gl/', [env.gl_headers])
|
||||
env.Install('/usr/local/include/forstio/window/', [env.headers])
|
||||
env.Install('/usr/local/include/forstio/window/gl/', [env.gl_headers])
|
||||
env.Alias('install', '/usr/local/')
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "window_xcb.h"
|
||||
|
||||
namespace gin {
|
||||
namespace saw {
|
||||
XcbDevice::XcbDevice(::Display *display, int screen,
|
||||
xcb_connection_t *xcb_connection, xcb_screen_t *xcb_screen,
|
||||
Own<InputStream> &&an)
|
||||
|
@ -217,4 +217,4 @@ Own<XcbDevice> createXcbDevice(IoProvider &provider) {
|
|||
Own<Device> createDevice(IoProvider &provider) {
|
||||
return createXcbDevice(provider);
|
||||
}
|
||||
} // namespace gin
|
||||
} // namespace saw
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <X11/Xlib-xcb.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <kelgin/io.h>
|
||||
#include <forstio/io.h>
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
#include <map>
|
||||
|
@ -11,7 +11,7 @@
|
|||
#include "device.h"
|
||||
#include "window_xcb.h"
|
||||
|
||||
namespace gin {
|
||||
namespace saw {
|
||||
class XcbDevice final : public Device {
|
||||
public:
|
||||
::Display *display;
|
||||
|
@ -44,4 +44,4 @@ public:
|
|||
};
|
||||
|
||||
Own<XcbDevice> createXcbDevice(IoProvider &provider);
|
||||
} // namespace gin
|
||||
} // namespace saw
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "../device_xcb.h"
|
||||
#include "gl_window_xcb.h"
|
||||
|
||||
namespace gin {
|
||||
namespace saw {
|
||||
namespace {
|
||||
GlxLibraryExtensions glxLibraryExtensions(const char *extension_string) {
|
||||
std::string_view extensions_view{extension_string};
|
||||
|
@ -198,4 +198,4 @@ Own<GlContext> createGlContext(IoProvider &provider,
|
|||
|
||||
return nullptr;
|
||||
}
|
||||
} // namespace gin
|
||||
} // namespace saw
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "gl/gl_context.h"
|
||||
|
||||
namespace gin {
|
||||
namespace saw {
|
||||
struct GlxLibraryExtensions {
|
||||
public:
|
||||
std::string_view raw_extension_string;
|
||||
|
@ -34,4 +34,4 @@ public:
|
|||
|
||||
void flush() override;
|
||||
};
|
||||
} // namespace gin
|
||||
} // namespace saw
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <cassert>
|
||||
|
||||
namespace gin {
|
||||
namespace saw {
|
||||
XcbGlWindow::XcbGlWindow(Own<XcbWindow> &&win, XcbGlContext &ctx,
|
||||
::GLXWindow glx_win)
|
||||
: window{std::move(win)}, context{ctx}, glx_window{glx_win} {}
|
||||
|
@ -75,4 +75,4 @@ Conveyor<Window::VariantEvent> XcbGlWindow::onEvent() {
|
|||
assert(window);
|
||||
return window->onEvent();
|
||||
}
|
||||
} // namespace gin
|
||||
} // namespace saw
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <GL/glx.h>
|
||||
#include <kelgin/common.h>
|
||||
#include <forstio/common.h>
|
||||
|
||||
#include "gl/gl_window.h"
|
||||
|
||||
namespace gin {
|
||||
namespace saw {
|
||||
class XcbWindow;
|
||||
class XcbGlContext;
|
||||
class XcbGlWindow final : public GlWindow {
|
||||
|
@ -31,4 +31,4 @@ public:
|
|||
|
||||
Conveyor<Window::VariantEvent> onEvent() override;
|
||||
};
|
||||
} // namespace gin
|
||||
} // namespace saw
|
|
@ -1,14 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <kelgin/async.h>
|
||||
#include <kelgin/common.h>
|
||||
#include <forstio/async.h>
|
||||
#include <forstio/common.h>
|
||||
|
||||
#include <string_view>
|
||||
#include <variant>
|
||||
|
||||
#include "window.h"
|
||||
|
||||
namespace gin {
|
||||
namespace saw {
|
||||
class Device {
|
||||
public:
|
||||
virtual ~Device() = default;
|
||||
|
@ -20,4 +20,4 @@ public:
|
|||
|
||||
class IoProvider;
|
||||
Own<Device> createDevice(IoProvider &provider);
|
||||
} // namespace gin
|
||||
} // namespace saw
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <kelgin/common.h>
|
||||
#include <forstio/common.h>
|
||||
|
||||
#include <string_view>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
#include "../video_mode.h"
|
||||
#include "../window.h"
|
||||
|
||||
#include <kelgin/async.h>
|
||||
#include <forstio/async.h>
|
||||
|
||||
#include <string_view>
|
||||
|
Loading…
Reference in New Issue