Cegui rendererexception in file ошибка

first : its true that i write in wrong forum but , are you angel , do not make mistakes , and never wrong .

Secondly, who do you think you are to come here and basically demand we reply to you? Damn you. You will get a reply if someone sees fit to reply, if nobody replies to you, that’s hard luck. People do not come here solely for the benefit of the likes of you

thanks for u impolite word ( Shane on you ) , its public forum , and i am member of the this forum i have duties and rights and i post a question and your duty is to reply , if u dont just enplane my probleme and i will
to try to find my solution .

Thirdly, as it states in the forum guidelines: there will be times when people do not know the answer. This forum is not the ‘fountain of knowledge’ for all to come and drink from. For example, I have no real clue about DX11, and I have no DX11 level hardware to test on — I imagine there are a lot of people in the same situation.

thats true this is forum guidelines and not a fountain of knowledge but this forum is for CEGUI Library and i use it so any think about CEGUI problem i will post it her to find the solution , and i don’t ask you to help me on directx11 but i ask to help me in the CEGUI Error That i take form CEGUI::direct3d11render .

and I have no DX11 level hardware to test on and I imagine there are a lot of people in the same situation.

is this my problem!! , if u have not is this mean all people have not and mustn’t develop dx11 with CEGUI !!!!!!!!! .

Fourthly, if you can’t fathom out how to rebuild the Effect11 library, then chances are you do not have the experience level to begin to use CEGUI — because as I’ve said a million times, it’s not targeted at inexperienced programmers. Yes, you learn and gain experience by doing, so sometimes it’s good to ‘jump in the deep end’. But if you’re going to do that…

i have 8 years experience and i know whats mean rebuild the library , but the problem is witch lib , the dx11 lib or what !!!!!!!

As it states in the forum guidelines: we are not your mother! This means, we are not here to wipe your arse for you. And that means that sometimes you have to work things out for yourself. Yeah, maybe that’s tough, but such is life. You have to suck it up and get on with it.

just to know i have try all solution that i know and i lost 120 hours to find solution then i post the topic .

finally .

we are not your mother! This means, we are not here to wipe your arse for you

who do you think you are to come here and basically demand we reply to you? Damn you

that’s hard luck. People do not come here solely for the benefit of the likes of you.

This forum is not the ‘fountain of knowledge’ for all to come and drink from

I think this is impolite to write in a public forum because you will not win nothing without the Shane follow you and its your responsibility .

Not:
if u want to speak just speak a good thing and impolite or shut your mouth

thanks for your time :?: :?: :?: :?: :?: :?: :?: :?: :?: :?:

Hi, I’m trying to integrate Ogre in a Qt application with this french tutorial http://irmatden.developpez.com/tutor…ation-ogre-qt/

I only made the first part (a simple window with a menu allowing to change the background color) I already have to cope with a few difficulties

actually after several modifications, I get still the same result : the whole screen becomes black with just the Qt window of which I can’t change the background color

this is my code :

.pro :

Code: Select all

TEMPLATE = app
TARGET = Qt_Ogre
QT += core gui
INCLUDEPATH = /usr/include/OGRE;
HEADERS += ogrewidget.h
SOURCES += ogrewidget.cpp \
    main.cpp
FORMS +=
RESOURCES +=
unix:LIBS += -lOgreMain

main.cpp :

Code: Select all

#include <QtGui>

#include "ogrewidget.h"

class MainWindow : public QMainWindow
{
Q_OBJECT

public:
    MainWindow()
    :ogreWidget(0)
    {
        ogreWidget = new OgreWidget;
        setCentralWidget(ogreWidget);

        QAction *closeAct = new QAction("Quitter", this);
        connect(closeAct, SIGNAL(triggered()), this, SLOT(close()));

        QAction *changeColorAct = new QAction("Changer la couleur de fond", this);
        connect(changeColorAct, SIGNAL(triggered()), this, SLOT(chooseBgColor()));

        QMenu *menu = menuBar()->addMenu("Divers");
        menu->addAction(changeColorAct);
        menu->addAction(closeAct);
    }

private slots:
    void chooseBgColor()
    {
        QColor c = QColorDialog::getColor();
        ogreWidget->setBackgroundColor(c);
    }

private:
    OgreWidget *ogreWidget;
};

#include "main.moc"

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    MainWindow window;
    window.show();
    return app.exec();
}

ogrewidget.h : (I put apple and MS sections in comments since I don’t use them)

Code: Select all

#ifndef OGREWIDGET_H
#define OGREWIDGET_H

#include <Ogre.h>
#include <QtGui>

#ifdef Q_WS_X11
  #include <QtGui/QX11Info>
#endif



class OgreWidget : public QWidget
{
    Q_OBJECT

public:
    OgreWidget(QWidget *parent = 0);
    ~OgreWidget();

public slots:
    void setBackgroundColor(QColor c);

protected:
    virtual void moveEvent(QMoveEvent *e);
    virtual QPaintEngine* paintEngine() const;
    virtual void paintEvent(QPaintEvent *e);
    virtual void resizeEvent(QResizeEvent *e);
    virtual void showEvent(QShowEvent *e);

private:
    void initOgreSystem();

private:
    Ogre::Root         *ogreRoot;
    Ogre::SceneManager *ogreSceneManager;
    Ogre::RenderWindow *ogreRenderWindow;
    Ogre::Viewport     *ogreViewport;
    Ogre::Camera       *ogreCamera;

};

#endif // OGREWIDGET_H

ogrewidget.cpp

Code: Select all

[/u]#include "ogrewidget.h"

/*OgreWidget::OgreWidget(QWidget *parent)
: QWidget(parent)
{
//ui.setupUi(this);
}*/

OgreWidget::OgreWidget(QWidget *parent)
:QWidget(parent),
ogreRoot(0), ogreSceneManager(0), ogreRenderWindow(0), ogreViewport(0),
ogreCamera(0)
{
    //setAttribute(Qt::WA_OpaquePaintEvent);
    setAttribute(Qt::WA_NoSystemBackground);
    setAttribute(Qt::WA_PaintOnScreen);
    setMinimumSize(240,240);
}

OgreWidget::~OgreWidget()
{
    if(ogreRenderWindow)
    {
        ogreRenderWindow->removeAllViewports();
    }

    if(ogreRoot)
    {
        ogreRoot->detachRenderTarget(ogreRenderWindow);

        if(ogreSceneManager)
        {
            ogreRoot->destroySceneManager(ogreSceneManager);
        }
    }

    delete ogreRoot;
}

void OgreWidget::setBackgroundColor(QColor c)
{
    if(ogreViewport)
    {
        Ogre::ColourValue ogreColour;
        ogreColour.setAsARGB(c.rgba());
        ogreViewport->setBackgroundColour(ogreColour);
    }
}

void OgreWidget::moveEvent(QMoveEvent *e)
{
    QWidget::moveEvent(e);

    if(e->isAccepted() && ogreRenderWindow)
    {
        ogreRenderWindow->windowMovedOrResized();
        update();
    }
}

QPaintEngine *OgreWidget:: paintEngine() const
{
    return 0;
}

void OgreWidget::paintEvent(QPaintEvent *e)
{
//    ogreRoot->_fireFrameStarted();
//    ogreRenderWindow->update();
//    ogreRoot->_fireFrameEnded();

//    ogreRoot->renderOneFrame();
//    ogreRenderWindow->update();

//    e->accept();

    ogreRoot->_fireFrameStarted();
    ogreRenderWindow->update();
    ogreRoot->_fireFrameRenderingQueued();
    ogreRoot->_fireFrameEnded();
}

void OgreWidget::resizeEvent(QResizeEvent *e)
{
    QWidget::resizeEvent(e);

    if(e->isAccepted())
    {
        const QSize &newSize = e->size();
        if(ogreRenderWindow)
        {
            ogreRenderWindow->resize(newSize.width(), newSize.height());
            ogreRenderWindow->windowMovedOrResized();
        }
        if(ogreCamera)
        {
            Ogre::Real aspectRatio = Ogre::Real(newSize.width()) / Ogre::Real(newSize.height());
            ogreCamera->setAspectRatio(aspectRatio);
        }
    }
}

void OgreWidget::showEvent(QShowEvent *e)
{
    if(!ogreRoot)
    {
        initOgreSystem();
    }

    QWidget::showEvent(e);
}

void OgreWidget::initOgreSystem()
{
    ogreRoot = new Ogre::Root();

    Ogre::RenderSystem *renderSystem = ogreRoot->getRenderSystemByName("OpenGL Rendering Subsystem");
    ogreRoot->setRenderSystem(renderSystem);
    ogreRoot->initialise(true);

    ogreSceneManager = ogreRoot->createSceneManager(Ogre::ST_GENERIC);

    Ogre::NameValuePairList viewConfig;
    Ogre::String widgethandle;

//#ifdef Q_WS_WIN
//    widgetHandle = Ogre::StringConverter::toString((size_t)((HWND)winId()));
//#else
//    QWidget *q_parent = dynamic_cast <QWidget *> (parent());
//    QX11Info xInfo = x11Info();
//
//    widgetHandle = Ogre::StringConverter::toString ((unsigned long)xInfo.display()) +
//        ":" + Ogre::StringConverter::toString ((unsigned int)xInfo.screen()) +
//        ":" + Ogre::StringConverter::toString ((unsigned long)q_parent->winId());
//#endif
//    viewConfig["externalWindowHandle"] = widgetHandle;

//#if defined(Q_WS_WIN)
//    //positive integer for W32 (HWND handle) - According to Ogre Docs
//    widgethandle = Ogre::StringConverter::toString((unsigned int)(winId()));
//    viewConfig["externalWindowHandle"] = widgethandle;
//
//#endif

#if defined(Q_WS_X11)
        //poslong:posint:poslong:poslong (display*:screen:windowHandle:XVisualInfo*) for GLX - According to Ogre Docs

    QWidget *q_parent = dynamic_cast <QWidget *> (parent());
    QX11Info info = x11Info();
        widgethandle  = Ogre::StringConverter::toString((unsigned long)info.display());
        widgethandle += ":";
        widgethandle += Ogre::StringConverter::toString((unsigned int)info.screen());
        widgethandle += ":";
        widgethandle += Ogre::StringConverter::toString((unsigned long)q_parent->winId());
        //widgethandle += ":";
        //widgethandle += Ogre::StringConverter::toString((unsigned long)(info.visual()));

        viewConfig["parentWindowHandle"] = widgethandle;
#endif


//#if defined(Q_WS_MAC)
//
//    widgethandle = Ogre::StringConverter::toString((unsigned int)(winId()));
//    viewConfig["macAPI"] = "cocoa";
//    viewConfig["macAPICocoaUseNSView"] = "true";
//
//#endif

    ogreRenderWindow = ogreRoot->createRenderWindow("Ogre rendering window",
        width(), height(), false, &viewConfig);

    ogreCamera = ogreSceneManager->createCamera("myCamera");

    ogreViewport = ogreRenderWindow->addViewport(ogreCamera);
    ogreViewport->setBackgroundColour(Ogre::ColourValue(0,0,0));
    ogreCamera->setAspectRatio(Ogre::Real(width()) / Ogre::Real(height()));
}

thanks for your answers :)

EDIT : my IDE had hidden a part of main.cpp, making the code ununderstandable; fixed it above

I don’t usually log bugs and glitches in this game because I find a way around most of the minor ones, or I will wait until they are fixed in upgrades, but this one totally crashes my PC so Id like to know if others have had a similar issue.
Im working my way through Career driving in a right hand drive manual and Ive just patched 1.3.3 update today onto my 1.3.2 version. Ive just driven out of the yard etc in novice, so next career task is «poor driving visibility with traffic lights out».

I select this task, it loads over 20 seconds, filling the loading bar completely, beeps once and then shuts down my entire PC !

Within 15 seconds the main Windows home page reopens, CCD has now closed and there is no mouse control at all on the screen. I have to control/ alt /delete and use task manager to shut down my PC. Before the patch it was fine and free driving is still ok, but as soon as I select this task, all hell lets loose. It has done it on cue 5 times now.

There is a message reading on the frozen screen.
It reads in part;

«Exception
CEGUI::RendererException in file
D:\Transporter|Tools|CEGUISrc||RendererModules|Direct3D1 ……
Geometry Buffer.cpp(294)……. failed to allocate vertex buffer»

Your help is appreciated.

Environment:

  • OS: Fedora Release 26
  • Compiler: g++ (GCC) 7.2.1
  • CEGUI: 0.8.7
    • Configured with: cmake .. -DCEGUI_BUILD_RENDERER_OPENGL=OFF -DCEGUI_BUILD_RENDERER_OPENGL3=ON -DCEGUI_USE_EPOXY=ON -DCEGUI_USE_GLEW=OFF
  • Epoxy: Latest version from https://github.com/yaronct/libepoxy
  • PowerVR Graphics SDK and Tools: v2017_R2 from
    https://community.imgtec.com/developers/powervr/graphics-sdk/

Code:

CEGUI::OpenGL3Renderer& myRenderer = CEGUI::OpenGL3Renderer::bootstrapSystem();

Error:

CEGUI::RendererException in function ‘void
CEGUI::OpenGLInfo::initTypeAndVer()’
(/home/jay/tmp/cegui/cegui-0.8.7/cegui/src/RendererModules/OpenGL/GL.cpp:88)
: Failed to obtain desktop OpenGL version. terminate called after
throwing an instance of ‘CEGUI::RendererException’ what():
CEGUI::RendererException in function ‘void
CEGUI::OpenGLInfo::initTypeAndVer()’
(/home/jay/tmp/cegui/cegui-0.8.7/cegui/src/RendererModules/OpenGL/GL.cpp:88)
: Failed to obtain desktop OpenGL version.

Include from header file:

#include <epoxy/gl.h>

Just in case this is helpful. Here is the output of the cmake to show what it was able to find and what it was not:

sudo cmake .. -DCEGUI_BUILD_RENDERER_OPENGL=OFF -DCEGUI_BUILD_RENDERER_OPENGL3=ON -DCEGUI_USE_EPOXY=ON -DCEGUI_USE_GLEW=OFF
CMake Deprecation Warning at CMakeLists.txt:6 (cmake_policy):
The OLD behavior for policy CMP0017 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


-- The C compiler identification is GNU 7.2.1
-- The CXX compiler identification is GNU 7.2.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PCRE: /usr/lib64/libpcre.so
-- Found FREETYPE: /usr/lib64/libfreetype.so
-- Found MINIZIP: /usr/lib64/libminizip.so
-- Found PkgConfig: /bin/pkg-config (found version "1.3.12")
-- Checking for module 'fribidi'
-- Found fribidi, version 0.19.7
-- Found FRIBIDI: TRUE
-- Looking for iconv
-- Looking for iconv - found
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- Found GLEW: /usr/lib64/libGLEW.so
-- Found GLM: /usr/include
-- Could NOT find GLFW (missing: GLFW_H_PATH)
-- Found GLFW3: /usr/lib64/libglfw.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found SDL2: /usr/lib64/libSDL2.so;-lpthread
-- Found SDL2IMAGE: /usr/lib64/libSDL2_image.so
-- Could NOT find DIRECTXSDK (missing: DIRECTXSDK_LIB_PATH DIRECTXSDK_H_PATH DIRECTXSDK_MAX_D3D)
-- Could NOT find D3DX11EFFECTS (missing: D3DX11EFFECTS_LIB D3DX11EFFECTS_H_PATH)
-- Found IRRLICHT: /usr/lib64/libIrrlicht.so
-- Could NOT find OGRE (missing: OGRE_LIB OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH)
-- Found OIS: /usr/lib64/libOIS.so
-- Could NOT find DIRECTFB (missing: DIRECTFB_LIB DIRECTFB_H_PATH)
-- Could NOT find OPENGLES (missing: OPENGLES_LIB OPENGLES_H_PATH)
-- Found EPOXY: /usr/local/lib64/libepoxy.so
-- Found EXPAT: /usr/lib64/libexpat.so
-- Could NOT find XERCESC (missing: XERCESC_LIB XERCESC_H_PATH)
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.4")
-- Found TINYXML: /usr/lib64/libtinyxml.so
-- Performing Test TINYXML_API_TEST
-- Performing Test TINYXML_API_TEST - Success
-- Could NOT find RAPIDXML (missing: RAPIDXML_H_PATH)
-- Could NOT find IL (missing: IL_LIB IL_H_PATH)
-- Could NOT find ILU (missing: ILU_LIB)
-- Found FREEIMAGE: /usr/lib64/libfreeimage.so
-- Found SILLY: /usr/lib64/libSILLY.so
-- Could NOT find CORONA (missing: CORONA_LIB CORONA_H_PATH)
-- Could NOT find PVRTOOLS (missing: PVRTOOLS_LIB PVRTOOLS_H_PATH)
-- Found LUA51: /usr/lib64/liblua.so
-- Found TOLUAPP: /usr/lib64/libtolua++.so
-- Found PythonInterp: /bin/python (found version "2.7.14")
-- Found PythonLibs: //lib64/libpython2.7.so (found suitable exact version "2.7.14")
-- Boost version: 1.63.0
-- Found the following Boost libraries:
-- python
-- unit_test_framework
-- system
-- timer
-- Found Doxygen: /bin/doxygen (found version "1.8.13") found components: doxygen missing components: dot
-- Found GTK2_GTK: /usr/lib64/libgtk-x11-2.0.so
-- Configuring done
-- Generating done
-- Build files have been written to: xxx

genpfault's user avatar

genpfault

51.2k11 gold badges85 silver badges139 bronze badges

asked Jan 7, 2018 at 20:15

Jay's user avatar

2

I was able to resolve this issue and I wanted to share what worked for me.

The issue was that Epoxy was not finding the active context. OSG does not currently set the context that you have open ( which might be your only context ) as the current context. You have to manually set it as the current context as follows:

// You will need to have realized the viewer at least once
viewer.realize();
// You can get your camera's primary context by calling getGraphicsContext 
// on it. I then also called realize on it. I'm not 100% certain if this 
// is necessary, but it seemed to .
viewer.getCamera()->getGraphicsContext()->realize();
// Set the GraphicsContext as the current GraphicsContext.
viewer.getCamera()->getGraphicsContext()->makeCurrent();

Epoxy now sees the current context and this error goes away.

answered Jan 16, 2018 at 2:07

Jay's user avatar

Понравилась статья? Поделить с друзьями:
  • Cda904 ошибка bmw f30
  • Cegui exception ошибка city car driving
  • Cefprocess exe ошибка
  • Cda524 bmw ошибка
  • Cd9010 ошибка бмв f10