laumaya / glc_lib Goto Github PK
View Code? Open in Web Editor NEWGLC_lib is a C++ library for high performance 3D application based on OpenGL and Qt4 GUI
Home Page: http://www.glc-lib.net
License: Other
GLC_lib is a C++ library for high performance 3D application based on OpenGL and Qt4 GUI
Home Page: http://www.glc-lib.net
License: Other
I am also parsing the 3dxml file, but when the .3drep file is binary, how should it be parsed? Ask for advice! ! !
On linux systems embedded zlib and quazip libraries cause a segfault when a binary is linked against the GLC library.
With embedded libraries :
$ ./glc_player
libpng warning: iCCP: known incorrect sRGB profile
libpng error: unexpected zlib return code
libpng warning: iCCP: known incorrect sRGB profile
libpng error: unexpected zlib return code
...
libpng error: unexpected zlib return code
libpng warning: iCCP: known incorrect sRGB profile
libpng error: unexpected zlib return code
QOpenGLTexture::setData() tried to set a null image
Erreur de segmentation (core dumped)
With the system ones :
$ ./glc_player
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
...
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
QOpenGLTexturePrivate::destroy() called without a current context.
...
On Unix systems, the GLC lib should be build using system libraries instead of the build-in ones.
hai, when i load a 3D fight, if i want it do Circular motion, or S-shaped trajectory,which function shoul be call, whether can give me some advices,thanks.
Tried to compile GLC_Player using the .pro file provided.
It appears files aren't provided.
/home/jay/glc_player/OpenFileThread.h:28: error: 'GLC_Factory' file not found
I am a big fan of GLC. All of the QGLWidget-based examples are working fine. I am trying to set up an example based on QOpenGLWidget, instead QGLWidget. After much fiddling, I have gotten it to spawn a Qt window, but OpenGL is producing errors left and right, e.g., in GLC_Light::glExecute(), in Geometry::render(), etc. I get the feeling the problem resides in an improperly configured/shared GLC_Context on my part.
Do you have any private examples using QOpenGLWidget? Or any suggestions?
The system requirements of GLC_lib are listed as "Qt4.8 or Qt5.0" but building GLC_lib 3.0.1 fails with Qt 4.8.7:
fatal error: 'QOpenGLTexture' file not found
According to the Qt documentation, QOpenGLTexture
was added in Qt 5.2. So you should either increase the minimum Qt version shown in the requirements, or adjust the code to be compatible with older Qt.
It's possible that a 3DRep contains rep with only polygon data.
From the Fixe #8 these rep are ignored. It will be better to support this kind of rep.
Hi Laurent,
Function within glc_geomtools
//! Triangulate a polygon
/*! If the polygon is convex the returned index is a fan*/
GLC_LIB_EXPORT void triangulatePolygon(QList<GLuint>*, const QList<float>&);
is very slow. On dual core i7 it takes roughly 2 minutes to go through 5000 faces which works out to be over an hour for 160k poly model. Any suggestion how to speed this up?
Many thanks!
Jozef
Can you change the tag from _ style to . style?
I mean you can tag them as v2.5.2, so we can track it easily.
And I don't think _ is a good naming way.
Thanks.
This feature is mandatory to OpenGL ES 2.0 support
Hello,
Importing a 3DXML (from 3DVIA) failed.
This is due to two things.
(I can send an example if needed)
Best Regards,
Anthony
Use an implementation which work with both VBO and Vertex Array.
Check if the mesh is finished
Check the size of new value
Perhaps, just use an accessor to the pointer of data to modify.
Source code is
m_LoadStatus== "GLC_ObjToMesh2::extractString : Error occur when trying to decode map option";
GLC_FileFormatException fileFormatException(m_LoadStatus, m_FileName, GLC_FileFormatException::WrongFileFormat);
throw(fileFormatException);
Maybe
m_LoadStatus = "GLC_ObjToMesh2::extractString : Error occur when trying to decode map option";
GLC_FileFormatException fileFormatException(m_LoadStatus, m_FileName, GLC_FileFormatException::WrongFileFormat);
throw(fileFormatException);
was intended.
The LICENSE.LGPL file in this repository is the one for LGPL version 2.1. GitHub notices this file, and displays prominently on your project's page that the license is LGPL-2.1. But the project's license was changed to LGPL 3 in 4578f01. Please update the LICENSE.LGPL file to reflect that.
It looks like 4578f01 updated the COPYING file from GPL-2 to LGPL-3. Then 2½ years later, the LGPL-3 COPYING file was deleted in b979364 and the LGPL-2.1 LICENSE.LGPL file was added in cf6e34a. I'm not clear why that occurred.
hello! I want the model to Straight motion, but the model can ran out of the border,how can I let the model also stay the border?
GLC_Matrix4x4 matrix = GLC_Matrix4x4();
matrix.setMatTranslate(0, 0, -5);
m_GlView.cameraHandle()->move(matrix);
Some software export OBJ with relative indices...
I want to load two models,where this lib can load two models?Thanks
Support for these would be nice, and looks reasonably simple. The Collada spec even tells you which OpenGL state maps to the respective setting.
Add the possibility to fill a color buffer in order to use mouse over pre selection.
It seems that there's some problem when using multiple QGLContext's. What seems to happen is that GLC_ContextSharedData
is deleted after GLC_Context
is removed from list of contexts in GLC_ContextManager
.
The destructor for QGLShader attempts to switch back to original context for removing the shader - but the context is already out of the GLC_ContextManager
list, causing this assert to fire:
void GLC_ContextManager::setCurrent(GLC_Context* pContext)
{
Q_ASSERT((NULL == pContext) || m_SetOfContext.contains(pContext)); //Fails: m_SetOfContext already doesn't contain pContext, even though it did a moment ago...
m_pCurrentContext= pContext;
}
This obviously happens only with multiple GLC_Context, Qt doesn't try to switch anything when there's just one context.
Full call trace (from destroying the window, to going through GLC_Context
destructor and finally deleting the shader in GLC_ContextSharedData
.
> foxworks_editord32.exe!fw_editor_message(QtMsgType type=QtFatalMsg, const char * msg=0x074e6740) Line 68 C++
QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x074e6740) Line 2269 + 0xe bytes C++
QtCored4.dll!qt_message(QtMsgType msgType=QtFatalMsg, const char * msg=0x629c5e7c, char * ap=0x00b4b4a8) Line 2369 + 0x12 bytes C++
QtCored4.dll!qFatal(const char * msg=0x629c5e7c, ...) Line 2552 + 0xf bytes C++
QtCored4.dll!qt_assert(const char * assertion=0x0076ab68, const char * file=0x0076aaf4, int line=84) Line 2018 + 0x16 bytes C++
foxworks_editord32.exe!GLC_ContextManager::setCurrent(GLC_Context * pContext=0x030a8cb0) Line 84 + 0x38 bytes C++
foxworks_editord32.exe!GLC_Context::makeCurrent() Line 260 C++
QtOpenGLd4.dll!QGLShareContextScope::QGLShareContextScope(const QGLContext * ctx=0x030a8cb0) Line 494 C++
QtOpenGLd4.dll!QGLShaderProgramPrivate::~QGLShaderProgramPrivate() Line 575 + 0x14 bytes C++
QtOpenGLd4.dll!QGLShaderProgramPrivate::`scalar deleting destructor'() + 0xf bytes C++
QtCored4.dll!QScopedPointerDeleter<QObjectData>::cleanup(QObjectData * pointer=0x03058eb8) Line 62 + 0x20 bytes C++
QtCored4.dll!QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::~QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >() Line 100 + 0x9 bytes C++
QtCored4.dll!QObject::~QObject() Line 939 + 0x12 bytes C++
QtOpenGLd4.dll!QGLShaderProgram::~QGLShaderProgram() Line 623 + 0x9 bytes C++
foxworks_editord32.exe!GLC_Shader::~GLC_Shader() Line 144 + 0xb2 bytes C++
foxworks_editord32.exe!GLC_Shader::`scalar deleting destructor'() + 0x2b bytes C++
foxworks_editord32.exe!GLC_ContextSharedData::~GLC_ContextSharedData() Line 69 + 0x2e bytes C++
foxworks_editord32.exe!GLC_ContextSharedData::`scalar deleting destructor'() + 0x2b bytes C++
foxworks_editord32.exe!QtSharedPointer::ExternalRefCount<GLC_ContextSharedData>::deref(QtSharedPointer::ExternalRefCountData * d=0x030ac580, GLC_ContextSharedData * value=0x030abda8) Line 342 + 0x34 bytes C++
foxworks_editord32.exe!QtSharedPointer::ExternalRefCount<GLC_ContextSharedData>::deref() Line 336 + 0x35 bytes C++
foxworks_editord32.exe!QtSharedPointer::ExternalRefCount<GLC_ContextSharedData>::~ExternalRefCount<GLC_ContextSharedData>() Line 401 + 0x2b bytes C++
foxworks_editord32.exe!QSharedPointer<GLC_ContextSharedData>::~QSharedPointer<GLC_ContextSharedData>() + 0x2b bytes C++
foxworks_editord32.exe!GLC_Context::~GLC_Context() Line 44 + 0xf bytes C++
foxworks_editord32.exe!GLC_Context::`scalar deleting destructor'() + 0x2b bytes C++
QtOpenGLd4.dll!QGLWidget::~QGLWidget() Line 3923 + 0x26 bytes C++
foxworks_editord32.exe!QGLWidget::`scalar deleting destructor'() + 0x2e bytes C++
QtCored4.dll!QObjectPrivate::deleteChildren() Line 1907 + 0x24 bytes C++
QtGuid4.dll!QWidget::~QWidget() Line 1682 C++
QtGuid4.dll!QFrame::~QFrame() Line 242 + 0x8 bytes C++
QtGuid4.dll!QAbstractScrollArea::~QAbstractScrollArea() Line 526 + 0xf bytes C++
QtGuid4.dll!QGraphicsView::~QGraphicsView() Line 1164 + 0xf bytes C++
foxworks_editord32.exe!EVDS::GLView::~GLView() + 0x2e bytes C++
foxworks_editord32.exe!EVDS::GLView::`scalar deleting destructor'() + 0x2b bytes C++
QtCored4.dll!QObjectPrivate::deleteChildren() Line 1907 + 0x24 bytes C++
QtGuid4.dll!QWidget::~QWidget() Line 1682 C++
QtGuid4.dll!QMainWindow::~QMainWindow() Line 389 + 0x22 bytes C++
foxworks_editord32.exe!EVDS::Editor::~Editor() Line 156 + 0x58 bytes C++
foxworks_editord32.exe!EVDS::Editor::`scalar deleting destructor'() + 0x2b bytes C++
QtCored4.dll!QObjectPrivate::deleteChildren() Line 1907 + 0x24 bytes C++
QtGuid4.dll!QWidget::~QWidget() Line 1682 C++
foxworks_editord32.exe!QWidget::`scalar deleting destructor'() + 0x2e bytes C++
QtCored4.dll!QObjectPrivate::deleteChildren() Line 1907 + 0x24 bytes C++
QtGuid4.dll!QWidget::~QWidget() Line 1682 C++
QtGuid4.dll!QMainWindow::~QMainWindow() Line 389 + 0x22 bytes C++
foxworks_editord32.exe!ChildWindow::~ChildWindow() + 0x70 bytes C++
bool GLC_FlyMover::move(const GLC_UserInput& userInput)
returns always false which is inconsistent with the other movers. Is this desired behaviour?
Got some valid 3DXML files where the "root" id inside "ProductStructure" is not "1". 3DXML player opens them without problems, so 1 as the root id is not required.
Attached is a diff fixing it.
Greets,
Patrik
I'm trying to build GLC_lib 3.0.1 with Qt 5.10.0 on macOS 10.12.6 with Xcode 9.2 and it fails as follows:
shading/glc_material.cpp:468:29: error: non-constant-expression cannot be narrowed from type 'qreal' (aka 'double') to 'GLfloat' (aka 'float') in initializer list [-Wc++11-narrowing]
(and many other occurrences of the same error in that file) before finishing with:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [Build/glc_material.o] Error 1
I tried to create a QGLWidget using glc lib in QT 5.7, but it failed to work, although compiling was fine. The error information as following:
GLC_Context::chooseContext
createContext: wglCreateContextAttribsARB() failed (GL error code: 0x502) for format: QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 1, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 1, samples 4, swapBehavior 2, swapInterval -1, profile 0), shared context: 0x0 ()
createContext: wglCreateContext failed. ()
Unable to create a GL Context.
I can run the same example in QT 5.5 without any problem. Doesn't it support QT 5.7 yet?
Regards,
Leo Cheng
File glc_openglstatemanager.h not contains GLC_OpenglStateManager class declaration
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.