mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-04 20:46:29 +03:00
Various fixes
This commit is contained in:
@@ -9,7 +9,7 @@ namespace EE { namespace Audio {
|
||||
class EE_API cMusic : public cSoundStream {
|
||||
public :
|
||||
/** Construct the music with a buffer size */
|
||||
cMusic( std::size_t BufferSize = 44100 );
|
||||
cMusic( std::size_t BufferSize = 48000 );
|
||||
|
||||
~cMusic();
|
||||
|
||||
|
||||
@@ -75,10 +75,32 @@
|
||||
#define EE_ARM
|
||||
#endif
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
#define EE_NO_WIDECHAR
|
||||
/// Activate at least one backend for the compilation
|
||||
#if !defined( EE_BACKEND_SDL_ACTIVE ) && !defined( EE_BACKEND_ALLEGRO_ACTIVE )
|
||||
#define EE_BACKEND_SDL_ACTIVE
|
||||
#endif
|
||||
|
||||
#define main SDL_main
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID || EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
#define EE_NO_WIDECHAR
|
||||
#endif
|
||||
|
||||
#ifdef EE_BACKEND_SDL_ACTIVE
|
||||
#define main SDL_main
|
||||
#endif
|
||||
|
||||
#ifdef EE_BACKEND_ALLEGRO_ACTIVE
|
||||
#if EE_PLATFORM == EE_PLATFORM_IOS
|
||||
#define ALLEGRO_MAGIC_MAIN
|
||||
#define main _al_mangled_main
|
||||
#elif EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
#ifdef __cplusplus
|
||||
extern "C" int main(int argc, char ** argv);
|
||||
#else
|
||||
extern int main(int argc, char ** argv);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EE_MAIN_FUNC
|
||||
#ifdef __cplusplus
|
||||
@@ -169,11 +191,6 @@
|
||||
#define EE_GLES
|
||||
#endif
|
||||
|
||||
/// Activate at least one backend for the compilation
|
||||
#if !defined( EE_BACKEND_SDL_ACTIVE ) && !defined( EE_BACKEND_ALLEGRO_ACTIVE )
|
||||
#define EE_BACKEND_SDL_ACTIVE
|
||||
#endif
|
||||
|
||||
#define eeCOMMA ,
|
||||
#define eeARRAY_SIZE(__array) ( sizeof(__array) / sizeof(__array[0]) )
|
||||
#define eeSAFE_DELETE(p) { if(p) { eeDelete (p); (p)=NULL; } }
|
||||
|
||||
@@ -183,7 +183,12 @@
|
||||
#define GL_DYNAMIC_READ 0x88E9
|
||||
#define GL_DYNAMIC_COPY 0x88EA
|
||||
|
||||
#ifdef GL_DEPTH_COMPONENT32_OES
|
||||
#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT32_OES
|
||||
#else
|
||||
#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_OES
|
||||
#endif
|
||||
|
||||
#define GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES
|
||||
#define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES
|
||||
|
||||
|
||||
@@ -175,22 +175,18 @@ bool cShader::Compile() {
|
||||
mValid = 0 != Compiled;
|
||||
|
||||
if ( !mValid ) {
|
||||
GLsizei logsize, logarraysize;
|
||||
GLsizei logsize = 0, logarraysize = 0;
|
||||
glGetShaderiv( GetId(), GL_INFO_LOG_LENGTH, &logarraysize );
|
||||
|
||||
mCompileLog.resize( logarraysize - 1 );
|
||||
if ( logarraysize > 0 ) {
|
||||
mCompileLog.resize( logarraysize - 1 );
|
||||
|
||||
glGetShaderInfoLog( GetId(), logarraysize, &logsize, reinterpret_cast<GLchar*>( &mCompileLog[0] ) );
|
||||
glGetShaderInfoLog( GetId(), logarraysize, &logsize, reinterpret_cast<GLchar*>( &mCompileLog[0] ) );
|
||||
}
|
||||
|
||||
cLog::instance()->Write( "Couldn't compile shader. Log follows:" );
|
||||
cLog::instance()->Write( mCompileLog );
|
||||
cLog::instance()->Write( mSource );
|
||||
|
||||
#ifdef EE_DEBUG
|
||||
std::cout << "Couldn't compile shader. Log follows:" << std::endl;
|
||||
std::cout << mCompileLog << std::endl;
|
||||
std::cout << mSource << std::endl;
|
||||
#endif
|
||||
} else {
|
||||
cLog::instance()->Write( "Shader Loaded Succesfully" );
|
||||
}
|
||||
|
||||
@@ -200,12 +200,14 @@ bool cShaderProgram::Link() {
|
||||
glGetProgramiv( Handler(), GL_LINK_STATUS, &linked );
|
||||
mValid = 0 != linked;
|
||||
|
||||
GLsizei logsize, logarraysize;
|
||||
GLsizei logsize = 0, logarraysize = 0;
|
||||
glGetProgramiv( Handler(), GL_INFO_LOG_LENGTH, &logarraysize );
|
||||
mLinkLog.resize(logarraysize);
|
||||
|
||||
glGetProgramInfoLog( Handler(), logarraysize, &logsize, reinterpret_cast<GLchar*>( &mLinkLog[0] ) );
|
||||
if ( logarraysize > 0 ) {
|
||||
mLinkLog.resize( logarraysize );
|
||||
|
||||
glGetProgramInfoLog( Handler(), logarraysize, &logsize, reinterpret_cast<GLchar*>( &mLinkLog[0] ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !mValid ) {
|
||||
|
||||
@@ -14,11 +14,11 @@ class cCursorManager;
|
||||
namespace WindowStyle {
|
||||
enum
|
||||
{
|
||||
NoBorder = ( 0 << 0 ),
|
||||
Titlebar = ( 1 << 0 ),
|
||||
Resize = ( 1 << 1 ),
|
||||
Fullscreen = ( 1 << 2 ),
|
||||
UseDesktopResolution = ( 1 << 3 ),
|
||||
NoBorder = ( 1 << 0 ),
|
||||
Titlebar = ( 1 << 1 ),
|
||||
Resize = ( 1 << 2 ),
|
||||
Fullscreen = ( 1 << 3 ),
|
||||
UseDesktopResolution = ( 1 << 4 ),
|
||||
Default = Titlebar | Resize
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user