forked from bartvdbraak/blender
code cleanup: warnings
This commit is contained in:
parent
2349370a51
commit
0ddc77f913
@ -54,7 +54,7 @@ struct wmOperatorType;
|
||||
/* extra padding for lengths (to go under scrollers) */
|
||||
#define EXTRA_SCROLL_PAD 100.0f
|
||||
|
||||
#define STRIP_HEIGHT_HALF (0.25 * UI_UNIT_Y)
|
||||
#define STRIP_HEIGHT_HALF (0.25f * UI_UNIT_Y)
|
||||
|
||||
/* internal exports only */
|
||||
|
||||
|
@ -2448,8 +2448,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
|
||||
{RAS_STORE_AUTO, "AUTO", 0, "Auto Select", "Chooses the best supported mode"},
|
||||
{RAS_STORE_IMMEDIATE, "IMMEDIATE", 0, "Immediate Mode", "Slowest performance, requires OpenGL (any version)"},
|
||||
{RAS_STORE_VA, "VERTEX_ARRAY", 0, "Vertex Arrays", "Better performance, requires at least OpenGL 1.1"},
|
||||
/* VBOS are currently disabled since they cannot beat vertex array with display lists in performance. 8?
|
||||
/*{RAS_STORE_VBO, "VERTEX_BUFFER_OBJECT", 0, "Vertex Buffer Objects", "Best performance, requires at least OpenGL 1.4"},*/
|
||||
/* VBOS are currently disabled since they cannot beat vertex array with display lists in performance. 8? */
|
||||
// {RAS_STORE_VBO, "VERTEX_BUFFER_OBJECT", 0, "Vertex Buffer Objects", "Best performance, requires at least OpenGL 1.4"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
srna = RNA_def_struct(brna, "SceneGameData", NULL);
|
||||
|
@ -1042,13 +1042,13 @@ static void apply_ao_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm, cons
|
||||
const float JitPh = (get_ao_random2(I + perm_offs) & (MAX_NUMBER_OF_AO_RAYS-1))/((float) MAX_NUMBER_OF_AO_RAYS);
|
||||
const float JitTh = (get_ao_random1(J + perm_offs) & (MAX_NUMBER_OF_AO_RAYS-1))/((float) MAX_NUMBER_OF_AO_RAYS);
|
||||
const float SiSqPhi = (I + JitPh) / ao_data->number_of_rays;
|
||||
const float Theta = 2 * M_PI * ((J + JitTh) / ao_data->number_of_rays);
|
||||
const float Theta = (float)(2 * M_PI) * ((J + JitTh) / ao_data->number_of_rays);
|
||||
|
||||
/* this gives results identical to the so-called cosine
|
||||
* weighted distribution relative to the north pole.
|
||||
*/
|
||||
float SiPhi = sqrt(SiSqPhi);
|
||||
float CoPhi = SiSqPhi < 1.0f ? sqrt(1.0f - SiSqPhi) : 1.0f - SiSqPhi;
|
||||
float CoPhi = SiSqPhi < 1.0f ? sqrtf(1.0f - SiSqPhi) : 1.0f - SiSqPhi;
|
||||
float CoThe = cos(Theta);
|
||||
float SiThe = sin(Theta);
|
||||
|
||||
|
@ -269,7 +269,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
|
||||
#ifdef WITH_PYTHON
|
||||
bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0);
|
||||
#endif
|
||||
bool novertexarrays = (SYS_GetCommandLineInt(syshandle, "novertexarrays", 0) != 0);
|
||||
// bool novertexarrays = (SYS_GetCommandLineInt(syshandle, "novertexarrays", 0) != 0);
|
||||
bool mouse_state = startscene->gm.flag & GAME_SHOW_MOUSE;
|
||||
bool restrictAnimFPS = startscene->gm.flag & GAME_RESTRICT_ANIM_UPDATES;
|
||||
|
||||
|
@ -532,8 +532,6 @@ static void GetUVs(BL_Material *material, MTF_localLayer *layers, MFace *mface,
|
||||
|
||||
if (map.uvCoName.IsEmpty() || strcmp(map.uvCoName.ReadPtr(), layer.name)==0)
|
||||
{
|
||||
MT_Point2 uvSet[4];
|
||||
|
||||
uvs[0][unit].setValue(layer.face->uv[0]);
|
||||
uvs[1][unit].setValue(layer.face->uv[1]);
|
||||
uvs[2][unit].setValue(layer.face->uv[2]);
|
||||
@ -881,7 +879,7 @@ static bool ConvertMaterial(
|
||||
return true;
|
||||
}
|
||||
|
||||
RAS_MaterialBucket* material_from_mesh(Material *ma, MFace *mface, MTFace *tface, MCol *mcol, MTF_localLayer *layers, int lightlayer, unsigned int *rgb, MT_Point2 uvs[4][RAS_TexVert::MAX_UNIT], const char *tfaceName, KX_Scene* scene, KX_BlenderSceneConverter *converter)
|
||||
static RAS_MaterialBucket *material_from_mesh(Material *ma, MFace *mface, MTFace *tface, MCol *mcol, MTF_localLayer *layers, int lightlayer, unsigned int *rgb, MT_Point2 uvs[4][RAS_TexVert::MAX_UNIT], const char *tfaceName, KX_Scene* scene, KX_BlenderSceneConverter *converter)
|
||||
{
|
||||
RAS_IPolyMaterial* polymat = converter->FindCachedPolyMaterial(ma);
|
||||
BL_Material* bl_mat = converter->FindCachedBlenderMaterial(ma);
|
||||
|
@ -237,13 +237,13 @@ void RAS_BucketManager::Renderbuckets(
|
||||
BucketList::iterator bit;
|
||||
list<RAS_MeshSlot>::iterator mit;
|
||||
for (bit = m_SolidBuckets.begin(); bit != m_SolidBuckets.end(); ++bit) {
|
||||
RAS_MaterialBucket* bucket = *bit;
|
||||
// RAS_MaterialBucket *bucket = *bit; /* UNUSED */
|
||||
for (mit = (*bit)->msBegin(); mit != (*bit)->msEnd(); ++mit) {
|
||||
mit->m_mesh->SetMeshModified(false);
|
||||
}
|
||||
}
|
||||
for (bit = m_AlphaBuckets.begin(); bit != m_AlphaBuckets.end(); ++bit) {
|
||||
RAS_MaterialBucket* bucket = *bit;
|
||||
// RAS_MaterialBucket* bucket = *bit; /* UNUSED */
|
||||
for (mit = (*bit)->msBegin(); mit != (*bit)->msEnd(); ++mit) {
|
||||
mit->m_mesh->SetMeshModified(false);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ RAS_OpenGLRasterizer::RAS_OpenGLRasterizer(RAS_ICanvas* canvas, int storage)
|
||||
m_failsafe_storage = new RAS_StorageIM(&m_texco_num, m_texco, &m_attrib_num, m_attrib);
|
||||
m_storage_type = RAS_VBO;
|
||||
}
|
||||
else if (m_storage_type == RAS_VA || m_storage_type == RAS_AUTO_STORAGE && GLEW_VERSION_1_1)
|
||||
else if ((m_storage_type == RAS_VA) || (m_storage_type == RAS_AUTO_STORAGE && GLEW_VERSION_1_1))
|
||||
{
|
||||
m_storage = new RAS_StorageVA(&m_texco_num, m_texco, &m_attrib_num, m_attrib);
|
||||
m_failsafe_storage = new RAS_StorageIM(&m_texco_num, m_texco, &m_attrib_num, m_attrib);
|
||||
|
@ -41,8 +41,8 @@ extern "C"{
|
||||
|
||||
RAS_StorageIM::RAS_StorageIM(int *texco_num, RAS_IRasterizer::TexCoGen *texco, int *attrib_num, RAS_IRasterizer::TexCoGen *attrib) :
|
||||
m_texco_num(texco_num),
|
||||
m_texco(texco),
|
||||
m_attrib_num(attrib_num),
|
||||
m_texco(texco),
|
||||
m_attrib(attrib)
|
||||
{
|
||||
}
|
||||
|
@ -31,11 +31,11 @@
|
||||
|
||||
RAS_StorageVA::RAS_StorageVA(int *texco_num, RAS_IRasterizer::TexCoGen *texco, int *attrib_num, RAS_IRasterizer::TexCoGen *attrib) :
|
||||
m_texco_num(texco_num),
|
||||
m_texco(texco),
|
||||
m_attrib_num(attrib_num),
|
||||
m_attrib(attrib),
|
||||
m_last_texco_num(0),
|
||||
m_last_attrib_num(0)
|
||||
m_last_attrib_num(0),
|
||||
m_texco(texco),
|
||||
m_attrib(attrib)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -206,8 +206,8 @@ void VBO::Draw(int texco_num, RAS_IRasterizer::TexCoGen* texco, int attrib_num,
|
||||
|
||||
RAS_StorageVBO::RAS_StorageVBO(int *texco_num, RAS_IRasterizer::TexCoGen *texco, int *attrib_num, RAS_IRasterizer::TexCoGen *attrib):
|
||||
m_texco_num(texco_num),
|
||||
m_texco(texco),
|
||||
m_attrib_num(attrib_num),
|
||||
m_texco(texco),
|
||||
m_attrib(attrib)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user