floriankirsch / opencsg Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
This breaks for me, as I'm using Wayland (and thus EGL).
OpenCSG has a bunch of code for supporting OpenGL 1.x (e.g. texture rectangle and non-power-of-two textures).
Is this still needed by anyone, or could we rip out the 1.x support and require OpenGL 2.x+ ?
FYI: OpenSCAD recently deprecated OpenGL 1.x support (openscad/openscad#4550)
While packaging 1.5.0 for Gentoo Linux, I encountered an error for a missing cstddef
header file in batch.h
, likely for using gcc-11:
In file included from batch.cpp:25:
batch.h:49:9: error: ‘size_t’ does not name a type
49 | size_t size() const;
| ^~~~~~
batch.h:1:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
+++ |+#include <cstddef>
1 | // OpenCSG - library for image-based CSG rendering for OpenGL
batch.cpp: In constructor ‘OpenCSG::Batcher::Batcher(const std::vector<OpenCSG::Primitive*>&)’:
batch.cpp:47:15: error: ‘size_t’ does not name a type
47 | const size_t numberOfPrimitives = primitives.size();
| ^~~~~~
batch.cpp:27:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
26 | #include "primitiveHelper.h"
+++ |+#include <cstddef>
27 |
batch.cpp:48:26: error: ‘numberOfPrimitives’ was not declared in this scope
48 | mBatches.reserve(numberOfPrimitives);
| ^~~~~~~~~~~~~~~~~~
batch.cpp: At global scope:
batch.cpp:121:5: error: ‘size_t’ does not name a type
121 | size_t Batcher::size() const {
| ^~~~~~
batch.cpp:121:5: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
and later directly from batch.h
:
In file included from renderGoldfeather.cpp:28:
batch.h:49:9: error: ‘size_t’ does not name a type
49 | size_t size() const;
| ^~~~~~
batch.h:1:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
+++ |+#include <cstddef>
1 | // OpenCSG - library for image-based CSG rendering for OpenGL
In file included from renderSCS.cpp:28:
batch.h:49:9: error: ‘size_t’ does not name a type
49 | size_t size() const;
| ^~~~~~
batch.h:1:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
+++ |+#include <cstddef>
1 | // OpenCSG - library for image-based CSG rendering for OpenGL
make[1]: *** [Makefile:931: renderGoldfeather.o] Error 1
Including the cstddef
header after vector
solves the issue.
For a full build log, please see the attached file.
opencsg-1.5.0:20220415-095958.log
GLEW is problematic on Linux, as it's built either against EGL or GLX, and Linux distros tend to ship only the GLX build. This makes it hard to ship EGL-based software using OpenCSG.
Feature request: Make GLEW optional, and allow using another GL wrangler instead, which isn't tied to GLX or EGL exclusively. GLAD is an option: https://github.com/Dav1dde/glad
This is related to #1 but calls out a feature request rather than a symptom.
OpenCSG transforms vertices (and hence produces depth values) using the legacy OpenGL fixed pipeline.
On common GPUs (Tested modern Intel iGPU and nVidia), the fixed function pipeline produces slightly different vertex positions than the programmable pipeline. Since OpenCSG relies on applications rendering final images using a GL_EQUAL depth test, this causes z buffer tearing for applications rendering using a programmable pipeline.
For more info, see openscad/openscad#4595
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.