Skip to content

Commit 085baae

Browse files
committed
UPBGE: Fixes after merge
1 parent a663cb4 commit 085baae

File tree

3 files changed

+49
-49
lines changed

3 files changed

+49
-49
lines changed

source/blender/editors/space_logic/logic_buttons.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ void LOGIC_OT_links_cut(wmOperatorType *ot)
162162
/* properties */
163163
PropertyRNA *prop;
164164
prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
165-
RNA_def_property_flag(prop, PropertyFlag(PROP_HIDDEN | PROP_SKIP_SAVE));
165+
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
166166
/* internal */
167167
RNA_def_int(ot->srna, "cursor", WM_CURSOR_KNIFE, 0, INT_MAX, "Cursor", "", 0, INT_MAX);
168168
}

source/blender/editors/space_logic/logic_ops.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ static void LOGIC_OT_custom_object_register(wmOperatorType *ot)
931931
64,
932932
"MyObject",
933933
"The class name with module (module.ClassName)");
934-
RNA_def_parameter_flags(parm, (PropertyFlag)0, PARM_REQUIRED);
934+
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
935935
}
936936

937937
static void LOGIC_OT_custom_object_create(wmOperatorType *ot)
@@ -955,7 +955,7 @@ static void LOGIC_OT_custom_object_create(wmOperatorType *ot)
955955
64,
956956
"MyObject",
957957
"The class name with module (module.ClassName)");
958-
RNA_def_parameter_flags(parm, (PropertyFlag)0, PARM_REQUIRED);
958+
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
959959
}
960960

961961
static wmOperatorStatus custom_object_remove_exec(bContext *C, wmOperator */*op*/)
@@ -1109,7 +1109,7 @@ static void LOGIC_OT_python_component_register(wmOperatorType *ot)
11091109
64,
11101110
"Component",
11111111
"The component class name with module (module.ComponentName)");
1112-
RNA_def_parameter_flags(parm, (PropertyFlag)0, PARM_REQUIRED);
1112+
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
11131113
}
11141114

11151115
static void LOGIC_OT_python_component_create(wmOperatorType *ot)
@@ -1133,7 +1133,7 @@ static void LOGIC_OT_python_component_create(wmOperatorType *ot)
11331133
64,
11341134
"Component",
11351135
"The component class name with module (module.ComponentName)");
1136-
RNA_def_parameter_flags(parm, (PropertyFlag)0, PARM_REQUIRED);
1136+
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
11371137
}
11381138

11391139
static wmOperatorStatus component_remove_exec(bContext *C, wmOperator *op)

source/gameengine/Rasterizer/RAS_Shader.cpp

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -257,25 +257,25 @@ void RAS_Shader::DeleteShader()
257257
void RAS_Shader::AppendUniformInfos(std::string type, std::string name)
258258
{
259259
if (type == "float") {
260-
m_constantUniforms.push_back(UniformConstant({Type::FLOAT, name}));
260+
m_constantUniforms.push_back(UniformConstant({Type::float_t, name}));
261261
}
262262
else if (type == "int") {
263-
m_constantUniforms.push_back(UniformConstant({Type::INT, name}));
263+
m_constantUniforms.push_back(UniformConstant({Type::int_t, name}));
264264
}
265265
else if (type == "vec2") {
266-
m_constantUniforms.push_back(UniformConstant({Type::VEC2, name}));
266+
m_constantUniforms.push_back(UniformConstant({Type::float2_t, name}));
267267
}
268268
else if (type == "vec3") {
269-
m_constantUniforms.push_back(UniformConstant({Type::VEC3, name}));
269+
m_constantUniforms.push_back(UniformConstant({Type::float3_t, name}));
270270
}
271271
else if (type == "vec4") {
272-
m_constantUniforms.push_back(UniformConstant({Type::VEC4, name}));
272+
m_constantUniforms.push_back(UniformConstant({Type::float4_t, name}));
273273
}
274274
else if (type == "mat3") {
275-
m_constantUniforms.push_back(UniformConstant({Type::MAT3, name}));
275+
m_constantUniforms.push_back(UniformConstant({Type::float3x3_t, name}));
276276
}
277277
else if (type == "mat4") {
278-
m_constantUniforms.push_back(UniformConstant({Type::MAT4, name}));
278+
m_constantUniforms.push_back(UniformConstant({Type::float4x4_t, name}));
279279
}
280280
else if (type == "sampler2D") {
281281
if (m_samplerUniforms.size() > 7) {
@@ -336,55 +336,55 @@ static std::optional<blender::StringRefNull> c_str_to_stringref_opt(const char *
336336
static int constant_type_size(Type type)
337337
{
338338
switch (type) {
339-
case Type::BOOL:
340-
case Type::FLOAT:
341-
case Type::INT:
342-
case Type::UINT:
343-
case Type::UCHAR4:
344-
case Type::CHAR4:
345-
case Type::VEC3_101010I2:
346-
case Type::USHORT2:
347-
case Type::SHORT2:
339+
case Type::bool_t:
340+
case Type::float_t:
341+
case Type::int_t:
342+
case Type::uint_t:
343+
case Type::uchar4_t:
344+
case Type::char4_t:
345+
case Type::float3_10_10_10_2_t:
346+
case Type::ushort2_t:
347+
case Type::short2_t:
348348
return 4;
349349
break;
350-
case Type::USHORT3:
351-
case Type::SHORT3:
350+
case Type::ushort3_t:
351+
case Type::short3_t:
352352
return 6;
353353
break;
354-
case Type::VEC2:
355-
case Type::UVEC2:
356-
case Type::IVEC2:
357-
case Type::USHORT4:
358-
case Type::SHORT4:
354+
case Type::float2_t:
355+
case Type::uint2_t:
356+
case Type::int2_t:
357+
case Type::ushort4_t:
358+
case Type::short4_t:
359359
return 8;
360360
break;
361-
case Type::VEC3:
362-
case Type::UVEC3:
363-
case Type::IVEC3:
361+
case Type::float3_t:
362+
case Type::uint3_t:
363+
case Type::int3_t:
364364
return 12;
365365
break;
366-
case Type::VEC4:
367-
case Type::UVEC4:
368-
case Type::IVEC4:
366+
case Type::float4_t:
367+
case Type::uint4_t:
368+
case Type::int4_t:
369369
return 16;
370370
break;
371-
case Type::MAT3:
371+
case Type::float3x3_t:
372372
return 36 + 3 * 4;
373-
case Type::MAT4:
373+
case Type::float4x4_t:
374374
return 64;
375375
break;
376-
case Type::UCHAR:
377-
case Type::CHAR:
376+
case Type::uchar_t:
377+
case Type::char_t:
378378
return 1;
379379
break;
380-
case Type::UCHAR2:
381-
case Type::CHAR2:
382-
case Type::USHORT:
383-
case Type::SHORT:
380+
case Type::uchar2_t:
381+
case Type::char2_t:
382+
case Type::ushort_t:
383+
case Type::short_t:
384384
return 2;
385385
break;
386-
case Type::UCHAR3:
387-
case Type::CHAR3:
386+
case Type::uchar3_t:
387+
case Type::char3_t:
388388
return 3;
389389
break;
390390
}
@@ -431,13 +431,13 @@ bool RAS_Shader::LinkProgram()
431431
geom = GetParsedProgram(GEOMETRY_PROGRAM);
432432

433433
StageInterfaceInfo iface("s_Interface", "");
434-
iface.smooth(Type::VEC4, "bgl_TexCoord");
434+
iface.smooth(Type::float4_t, "bgl_TexCoord");
435435

436436
ShaderCreateInfo info("s_Display");
437-
info.push_constant(Type::FLOAT, "bgl_RenderedTextureWidth");
438-
info.push_constant(Type::FLOAT, "bgl_RenderedTextureHeight");
437+
info.push_constant(Type::float_t, "bgl_RenderedTextureWidth");
438+
info.push_constant(Type::float_t, "bgl_RenderedTextureHeight");
439439
if (GPU_backend_get_type() == GPU_BACKEND_OPENGL) {
440-
info.push_constant(Type::VEC2, "bgl_TextureCoordinateOffset", 9);
440+
info.push_constant(Type::float2_t, "bgl_TextureCoordinateOffset", 9);
441441
}
442442
for (std::pair<int, std::string> &sampler : m_samplerUniforms) {
443443
info.sampler(sampler.first, ImageType::FLOAT_2D, sampler.second);
@@ -448,7 +448,7 @@ bool RAS_Shader::LinkProgram()
448448
info.push_constant(constant.type, constant.name);
449449
}
450450
info.vertex_out(iface);
451-
info.fragment_out(0, Type::VEC4, "fragColor");
451+
info.fragment_out(0, Type::float4_t, "fragColor");
452452
info.vertex_source("common_colormanagement_lib.glsl");
453453
info.fragment_source("common_colormanagement_lib.glsl");
454454
info.vertex_source_generated = vert;

0 commit comments

Comments
 (0)