Use ALsizei/GLsizei to fix compile errors on mac / gcc 4.x.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 29 Jan 2006 21:29:14 +0000 (21:29 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 29 Jan 2006 21:29:14 +0000 (21:29 +0000)
intern/SoundSystem/openal/SND_OpenALDevice.cpp
source/gameengine/Ketsji/BL_Shader.cpp

index 98eed6bb1040839ba978618e610b12618c9942b3..399008b3b2874e5fdc4b07bed92a478c613b658b 100644 (file)
@@ -404,7 +404,7 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
                                ALenum al_error = alGetError();
                                
 #ifdef OUDE_OPENAL
-                               unsigned int samplerate, numberofsamples;               // openal_2.12
+                               ALsizei samplerate, numberofsamples;            // openal_2.12
 #else
                                int samplerate, numberofsamples;  // openal_2.14+
 #endif
index 4c41101b462a3d7ca520cfd9c4b64c1ab8a08e28..f6aa8f625d6de3b25bafe25be947645633f338da 100644 (file)
@@ -92,8 +92,8 @@ bool BL_Shader::LinkProgram()
 {
 #ifdef GL_ARB_shader_objects
 
-       int vertlen = 0, fraglen=0, proglen=0;
-       int vertstatus=0, fragstatus=0, progstatus=0;
+       GLint vertlen = 0, fraglen=0, proglen=0;
+       GLint vertstatus=0, fragstatus=0, progstatus=0;
        unsigned int tmpVert=0, tmpFrag=0, tmpProg=0;
        int char_len=0;
 
@@ -200,9 +200,11 @@ programError:
 void BL_Shader::PrintInfo(int len, unsigned int handle, int* num)
 {
 #ifdef GL_ARB_shader_objects
+       GLsizei number;
        mLog = (char*)MEM_mallocN(sizeof(char)*len, "print_log");
        //MT_assert(mLog, "Failed to create memory");
-       bgl::blGetInfoLogARB(handle, len, num, mLog);
+       bgl::blGetInfoLogARB(handle, len, &number, mLog);
+       *num = number;
 #endif//GL_ARB_shader_objects
 }
 
@@ -400,7 +402,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, validate, "validate()")
                PyErr_Format(PyExc_TypeError, "invalid shader object");
                return NULL;
        }
-       int stat = 0;
+       GLint stat = 0;
        bgl::blValidateProgramARB(mShader);
        bgl::blGetObjectParameterivARB(mShader, GL_OBJECT_VALIDATE_STATUS_ARB, &stat);
        return PyInt_FromLong(0);