Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
47 user(s) are online (29 user(s) are browsing Forums)

Members: 0
Guests: 47

more...

Support us!

Headlines

Report message:*
 

Re: Porting to AmigaOS4 thread

Subject: Re: Porting to AmigaOS4 thread
by Raziel on 2019/9/23 20:56:15

@salass00

I stole some code from the android part, but it gives me an error
Quote:

C++ backends/graphics/openglsdl/openglsdl-graphics.o
backends/graphics/openglsdl/openglsdl-graphics.cpp: In member function 'virtual void OpenGLSdlGraphicsManager::updateScreen()':
backends/graphics/openglsdl/openglsdl-graphics.cpp:546:46: error: a function-definition is not allowed here before '{' token
static const char *getGlErrStr(GLenum error) {
^
backends/graphics/openglsdl/openglsdl-graphics.cpp:568:65: error: a function-definition is not allowed here before '{' token
void checkGlError(const char *expr, const char *file, int line) {
^
gmake: *** [backends/graphics/openglsdl/openglsdl-graphics.o] Error 1


#ifdef __amigaos4__
static const char *getGlErrStr(GLenum error) {
    switch (
error) {
    case 
GL_INVALID_ENUM:
        return 
"GL_INVALID_ENUM";
    case 
GL_INVALID_VALUE:
        return 
"GL_INVALID_VALUE";
    case 
GL_INVALID_OPERATION:
        return 
"GL_INVALID_OPERATION";
    case 
GL_STACK_OVERFLOW:
        return 
"GL_STACK_OVERFLOW";
    case 
GL_STACK_UNDERFLOW:
        return 
"GL_STACK_UNDERFLOW";
    case 
GL_OUT_OF_MEMORY:
        return 
"GL_OUT_OF_MEMORY";
    }

    static 
char buf[40];
    
snprintf(bufsizeof(buf), "(Unknown GL error code 0x%x)"error);

    return 
buf;
}

void checkGlError(const char *expr, const char *fileint line) {
    
GLenum error glGetError();

    if (
error != GL_NO_ERROR)
        
warning("GL ERROR: %s on %s (%s:%d)"getGlErrStr(error), exprfileline);
}
#endif


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project