This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuINLINE
}; //namespace zumachen
// Funktion definieren
extern "C"{
void __stdcall glLightf(int, int, float);
void __stdcall glEnable( int );
void __stdcall glDisable( int );
}
// Globale Konstanten
#define GL_LIGHTING 0xB50
#define GL_LIGHT0 0x4000
#define GL_CONSTANT_ATTENUATION 0x1207
#define GL_LINEAR_ATTENUATION 0x1208
#define GL_QUADRATIC_ATTENUATION 0x1209
// Namespace aufmachen
namespace __GLBASIC__ {
ENDINLINE
FUNCTION glLightAttenuation: iLight%, konstant# , linear#, quadratic#
INLINE
glLightf(GL_LIGHT0+iLight , GL_CONSTANT_ATTENUATION, konstant );
glLightf(GL_LIGHT0+iLight , GL_LINEAR_ATTENUATION, linear);
glLightf(GL_LIGHT0+iLight , GL_QUADRATIC_ATTENUATION, quadratic);
ENDINLINE
ENDFUNCTION
FUNCTION switchAllLights: on%
INLINE
if( on == true ) glEnable(GL_LIGHTING) ;
else glDisable(GL_LIGHTING);
ENDINLINE
ENDFUNCTION
INLINE
}; // close GLBasic namespace
extern "C"{
void __stdcall glEnable( int );
void __stdcall glDisable( int );
}
#define GL_LIGHTING 0xB50 // <- this took me long to find (-;
namespace __GLBASIC__ { // open GLBasic namespace
ENDINLINE
FUNCTION switchAllLights: on%
INLINE
if( on == true ) glEnable(GL_LIGHTING) ;
else glDisable(GL_LIGHTING);
ENDINLINE
ENDFUNCTION