heyyy
This commit is contained in:
parent
d9a9c487f5
commit
34bbcc31e8
|
|
@ -12,6 +12,7 @@ option(COMPILE_SERVER "Compile the RBXNU Server" ON)
|
|||
option(COMPILE_STUDIO "Compile the RBXNU Studio" ON)
|
||||
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(cglm REQUIRED CONFIG)
|
||||
|
||||
add_library(engine STATIC
|
||||
src/engine/app/gui/Adorn.cpp
|
||||
|
|
@ -26,10 +27,11 @@ add_library(engine STATIC
|
|||
src/include/engine/app/Name.hpp
|
||||
src/engine/network/Guid.cpp
|
||||
src/include/engine/network/Guid.hpp
|
||||
src/include/engine/rendering/TextureProxyBase.hpp
|
||||
)
|
||||
|
||||
target_include_directories(engine PUBLIC src/include ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(engine PUBLIC ${BOOST_LIBRARIES})
|
||||
target_link_libraries(engine PUBLIC ${BOOST_LIBRARIES} cglm)
|
||||
|
||||
if(COMPILE_PLAYER OR COMPILE_STUDIO)
|
||||
project(glad)
|
||||
|
|
@ -41,13 +43,14 @@ if(COMPILE_PLAYER OR COMPILE_STUDIO)
|
|||
target_include_directories(glad PUBLIC glad/include)
|
||||
project(qt_common)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets OpenGLWidgets)
|
||||
find_package(cglm REQUIRED CONFIG)
|
||||
set(QT6_LIBRARIES_INCL Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets cglm glad)
|
||||
set(QT6_LIBRARIES_INCL Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets glad)
|
||||
qt_standard_project_setup()
|
||||
|
||||
qt_add_library(qt_common STATIC
|
||||
src/client/common/RBXNUGraphicsWidget.cpp
|
||||
src/include/client/common/RBXNUGraphicsWidget.hpp
|
||||
src/client/common/Adorn.cpp
|
||||
src/include/client/common/Adorn.hpp
|
||||
)
|
||||
target_link_libraries(qt_common PUBLIC ${QT6_LIBRARIES_INCL} engine)
|
||||
endif()
|
||||
|
|
@ -82,4 +85,4 @@ if(COMPILE_STUDIO)
|
|||
${CMAKE_BINARY_DIR}/studio_rsc.h
|
||||
)
|
||||
target_link_libraries(studio PRIVATE qt_common engine)
|
||||
endif()
|
||||
endif()
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#include <client/common/Adorn.hpp>
|
||||
|
||||
GL::Adorn::Adorn()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
RBXNUGraphicsWidget::RBXNUGraphicsWidget(QWidget* parent) : QOpenGLWidget(parent)
|
||||
{
|
||||
gl_adorn = new GL::Adorn();
|
||||
}
|
||||
|
||||
void RBXNUGraphicsWidget::initializeGL()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
#include <engine/app/gui/Adorn.hpp>
|
||||
#pragma once
|
||||
|
||||
// TODO: add G3D
|
||||
|
||||
namespace GL
|
||||
{
|
||||
// 2d rendering api
|
||||
class Adorn : public RBX::Adorn
|
||||
{
|
||||
public:
|
||||
Adorn();
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
#include <glad/glad.h>
|
||||
#include <QOpenGLWidget>
|
||||
#include <QElapsedTimer>
|
||||
#include <client/common/Adorn.hpp>
|
||||
|
||||
class RBXNUGraphicsWidget : public QOpenGLWidget
|
||||
{
|
||||
|
|
@ -12,6 +13,8 @@ public:
|
|||
RBXNUGraphicsWidget(QWidget* parent = nullptr);
|
||||
|
||||
double delta_time;
|
||||
|
||||
GL::Adorn* gl_adorn;
|
||||
protected:
|
||||
virtual void paintGL();
|
||||
virtual void initializeGL();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
#include <cglm/cglm.h>
|
||||
|
||||
namespace GL
|
||||
{
|
||||
struct RenderContext
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <engine/rendering/TextureProxyBase.hpp>
|
||||
#include <cglm/cglm.h>
|
||||
#include <string>
|
||||
|
||||
// TODO: add G3D
|
||||
|
||||
namespace RBX
|
||||
|
|
@ -7,46 +11,7 @@ namespace RBX
|
|||
// 2d rendering api
|
||||
class Adorn
|
||||
{
|
||||
// weird mystery classes
|
||||
class XAlign
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
class YAlign
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
class Spacing
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
virtual void prepareRenderPass() {}; // NOT IN AdornG3D
|
||||
virtual void finishRenderPass() {}; // NOT IN AdornG3D
|
||||
virtual void sparkles() {}; // NOT IN AdornG3D
|
||||
|
||||
virtual void createTextureProxy(G3D::ReferenceCountedPointer<G3D::GFont> *result, std::string *filename) {};
|
||||
virtual void getViewport(G3D::Rect2d *result) {]};
|
||||
virtual int getWidth() {};
|
||||
virtual int getHeight() {};
|
||||
virtual void setTexture(int id, G3D::ReferenceCountedPointer<RBX::TextureProxyBase> texture) {};
|
||||
virtual void getTextureSize(G3D::Rect2d *result, G3D::ReferenceCountedPointer<RBX::TextureProxyBase> texture) {};
|
||||
virtual void line2d(G3D::Vector2 *p0, G3D::Vector2 *p1, G3D::Color4 *color) {};
|
||||
virtual void outlineRect2d(G3D::Rect2d *rect, float thick, G3D::Color4 *color) {};
|
||||
virtual void rect2d(G3D::Rect2d *rect, G3D::Color4 *color) {};
|
||||
virtual void get2DStringBounds(G3D::Vector2 *result, std::string *s, long double size, RBX::Adorn::Spacing spacing) {};
|
||||
virtual void drawFont2D(G3D::Vector2 *result, std::string *s, G3D::Vector2 *po2d, long double size, G3D::Color4 *color, G3D::color4 *outline, RBX::Adorn::XAlign xalign, RBX::Adorn::YAlign yalign, RBX::Adorn::Spacing spacing) {};
|
||||
virtual void setObjectToWorldMatrix(G3D::CoordinateFrame *c) {};
|
||||
virtual void setColor(G3D::Color4 *color) {};
|
||||
virtual void box(G3D::AABox *box, G3D::Color4 *solidColor, G3D::Color4 *wireColor) {};
|
||||
virtual void sphere(G3D::sphere* sphere, G3D::Color4 *solidColor, G3D::Color4 *wireColor) {};
|
||||
virtual void explosion(G3D::Sphere* sphere, G3D::Color4 *solidColor, G3D::Color4 *wireColor) {};
|
||||
virtual void cylinderAlongX(float radius, float length, G3D::Color4 *solidColor, G3D::Color4 *wireColor) {};
|
||||
virtual void ray(G3D::Ray* ray, G3D::Color4 *color, float scale) {};
|
||||
virtual void lineSegment(G3D::LineSegment *lineSegment, G3D::Color4 *color, float scale) {};
|
||||
virtual void axes(G3D::Color4 *xColor, G3D::Color4 *yColor, G3D::Color4 *zColor, float scale) {};
|
||||
virtual void quad(G3D::Vector3 *v0, G3D::Vector3 *v1, G3D::Vector3 *v2, G3D::Vector3 *v3, G3D::Color4 *color) {};
|
||||
public:
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
namespace RBX
|
||||
{
|
||||
class TextureProxyBase
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue