「(」の前に、私はこの質問を検索するが、これを解決する方法を見つけ出すことができません:予期しない主要表現トークン
class DtEffect;
template <typename VertexFormat>
class DtEffectRenderer : public DtFormatRenderer<VertexFormat>
{
public:
template <typename MemberType>
static DtEffect::VertexAttribPtrInfo VertexAttrib(const MemberType VertexFormat::* member)
{
return DtEffect::VertexAttribPtrInfo(
reinterpret_cast<const GLvoid*>(offsetof(VertexFormat, *member))
, DtAttributeType<MemberType>::value
, DtAttributeType<MemberType>::size);
}
protected:
DtEffect* myEffect;
};
エラーメッセージ:
../../include/vrvGraphics/DtEffectRenderer.h: In static member function ‘static makVrv::DtEffect::VertexAttribPtrInfo makVrv::DtEffectRenderer<VertexFormat>::VertexAttrib(const MemberType VertexFormat::*)’:
../../include/vrvGraphics/DtEffectRenderer.h:115: error: expected primary-expression before ‘(’ token
../../include/vrvGraphics/DtEffectRenderer.h:116: error: expected unqualified-id before ‘*’ token
../../include/vrvGraphics/DtEffectRenderer.h:116: error: expected ‘)’ before ‘*’ token
任意のアイデア
?
VertexFormat :: * '? myEffect-> setVertexAttribPointers(のsizeof(DtLineVertex)、 VertexAttrib(&DtLineVertex ::位置)、 VertexAttrib(&DtLineVertex ::色)、 VertexAttrib(&DtLineVertex ::オフセット)、 VertexAttrib(&DtLineVertex: – erip
その使用はとても似ています:: directionAndLength)); – psquare
[mcve]を入力してください。 – Barry