world_dualquaternion_array_2x4 in GpuNamedConstants

Minor issues with the Ogre API that can be trivial to fix
Post Reply
cloud
Gremlin
Posts: 196
Joined: Tue Aug 08, 2006 6:45 pm

world_dualquaternion_array_2x4 in GpuNamedConstants

Post by cloud » Tue Jun 03, 2014 11:32 am

If you try a program that has world_dualquaternion_array_2x4 in it for example I have

Code: Select all

#version 150

// Shadow caster : Directional light needs VTF_DEPTH, splotlight needs VTF_VIEWPOS

#define NUM_BONES 120

uniform mat4x4 g_worldviewproj_matrix;
uniform mat4x4 g_viewproj_matrix;
uniform mat4x4 g_view_matrix;
uniform vec4 g_world_dualquaternion_array_2x4[ NUM_BONES ];
uniform vec4 g_texel_offsets;

...
and do

Code: Select all

const Ogre::GpuNamedConstants& gpuNamedConstants = params->getConstantDefinitions();
		
for(Ogre::GpuConstantDefinitionMap::const_iterator it = gpuNamedConstants.map.begin();
it != gpuNamedConstants.map.end(); ++it)
{
          // log the param name, it->first
}
You'll get output

Code: Select all

param name 120
param name 120[0]
param name ]
param name ][0]
param name g_texel_offsets
param name g_texel_offsets[0]
param name g_view_matrix
param name g_view_matrix[0]
param name g_viewproj_matrix
param name g_viewproj_matrix[0]
param name g_world_dualquaternion_array_2x4
param name g_worldviewproj_matrix
param name g_worldviewproj_matrix[0]
The arraySize is right in the GpuConstantDefinition so nothing is lost, but the other matrix array types produce the sort of output you'd expect.
0 x

cloud
Gremlin
Posts: 196
Joined: Tue Aug 08, 2006 6:45 pm

Re: world_dualquaternion_array_2x4 in GpuNamedConstants

Post by cloud » Fri Nov 21, 2014 10:40 am

turned out ogre needed
uniform vec4 g_world_dualquaternion_array_2x4[NUM_BONES]
and not
uniform vec4 g_world_dualquaternion_array_2x4[ NUM_BONES ];
0 x

Post Reply