Giter Site home page Giter Site logo

laumaya / glc_lib Goto Github PK

View Code? Open in Web Editor NEW
62.0 62.0 32.0 26.67 MB

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

C++ 97.95% QMake 1.56% QML 0.09% GLSL 0.34% C 0.07%

glc_lib's People

Contributors

jozefdobos avatar laumaya avatar phoenixblack avatar soroush avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glc_lib's Issues

Segmentation fault when GLC lib is built with zlib and quazip built-in libraries.

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.

Movetrajectory

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.

GLC_Factory file not found

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

Example using QOpenGLWidget

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?

triangulatePolygon is very slow

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

Tag rename request

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.

3DXML import failed

Hello,

Importing a 3DXML (from 3DVIA) failed.
This is due to two things.

  • Some 3DRep have two PolygonalRep but the second with no MasterLOD (only edges)
  • Polyline endings are not detected correctly.

(I can send an example if needed)

Best Regards,

Anthony

io/glc_objmtlloader.cpp:375:16: warning: equality comparison result unused [-Wunused-comparison]

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.

Outdated LICENSE.LGPL file

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.

ran out border

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);

XYZ Manipulator in viewport

Hello Laumaya,
I want to know which classes are responsable for the xyz in viewport. I try to get inspiration from your engine code. I have been looking for a long time for a solution or a track, now I found it. these are the axes I am talking about in the image.
Capture

Compilation errors with QT 5.13

Hello,

I am trying to compile the GLCLib with Qt v5.13.2 (on windows, with VS2017) and I get the following errors:
Is it compatible with this Qt level ?

Thank you

image

Assert fires when deleting QGLWidget with 2+ GLC_context created

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++

GLC_FlyMover::move returns false

bool GLC_FlyMover::move(const GLC_UserInput& userInput)
returns always false which is inconsistent with the other movers. Is this desired behaviour?

non-constant-expression cannot be narrowed from type 'qreal' (aka 'double') to 'GLfloat' (aka 'float') in initializer list

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

not support qt 5.7 yet?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.