本文整理汇总了C++中vogl_context_info::get_max_texture_coords方法的典型用法代码示例。如果您正苦于以下问题:C++ vogl_context_info::get_max_texture_coords方法的具体用法?C++ vogl_context_info::get_max_texture_coords怎么用?C++ vogl_context_info::get_max_texture_coords使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vogl_context_info
的用法示例。
在下文中一共展示了vogl_context_info::get_max_texture_coords方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: snapshot
bool vogl_matrix_state::snapshot(const vogl_context_info &context_info)
{
VOGL_FUNC_TRACER
clear();
bool any_errors = false;
VOGL_CHECK_GL_ERROR;
vogl_scoped_state_saver state_saver(cGSTActiveTexture, cGSTMatrixMode);
if (vogl_check_gl_error())
any_errors = true;
if (!save_matrix_stack(context_info, GL_PROJECTION, 0, GL_PROJECTION_STACK_DEPTH, GL_PROJECTION_MATRIX))
any_errors = true;
if (!save_matrix_stack(context_info, GL_MODELVIEW, 0, GL_MODELVIEW_STACK_DEPTH, GL_MODELVIEW_MATRIX))
any_errors = true;
if (!save_matrix_stack(context_info, GL_COLOR, 0, GL_COLOR_MATRIX_STACK_DEPTH, GL_COLOR_MATRIX))
any_errors = true;
for (uint32_t texcoord_index = 0; texcoord_index < context_info.get_max_texture_coords(); texcoord_index++)
{
GL_ENTRYPOINT(glActiveTexture)(GL_TEXTURE0 + texcoord_index);
if (vogl_check_gl_error())
any_errors = true;
if (!save_matrix_stack(context_info, GL_TEXTURE, texcoord_index, GL_TEXTURE_STACK_DEPTH, GL_TEXTURE_MATRIX))
any_errors = true;
}
for (uint32_t i = 0; i < context_info.get_max_arb_program_matrices(); i++)
{
if (!save_matrix_stack(context_info, GL_MATRIX0_ARB + i, 0, GL_CURRENT_MATRIX_STACK_DEPTH_ARB, GL_CURRENT_MATRIX_ARB))
any_errors = true;
}
if (any_errors)
clear();
else
m_valid = true;
return !any_errors;
}
示例2:
vogleditor_stateTreeTexEnvItem::vogleditor_stateTreeTexEnvItem(QString name, vogleditor_stateTreeItem *parent, vogl_texenv_state &state, const vogl_context_info &info)
: vogleditor_stateTreeItem(name, "", parent),
m_pState(&state),
m_pDiffBaseState(NULL),
m_pDiffBaseInfo(NULL)
{
QString tmp;
for (uint texcoord_index = 0; texcoord_index < info.get_max_texture_coords(); texcoord_index++)
{
vogleditor_stateTreeItem *pTexNode = new vogleditor_stateTreeItem(tmp.sprintf("GL_TEXTURE%u", texcoord_index), "", this);
this->appendChild(pTexNode);
int iVals[4] = { 0, 0, 0, 0 };
float fVals[4] = { 0, 0, 0, 0 };
#define GET_ENUM(target, idx, name, num) \
if (m_pState->get_state(target).get<int>(name, idx, iVals, num)) \
{ \
vogleditor_stateTreeTexEnvStateVecEnumItem *pItem = new vogleditor_stateTreeTexEnvStateVecEnumItem(target, #name, name, idx, iVals, num, pTexNode, *m_pState); \
m_diffableItems.push_back(pItem); \
pTexNode->appendChild(pItem); \
}
#define GET_FLOAT(target, idx, name, num) \
if (m_pState->get_state(target).get<float>(name, idx, fVals, num)) \
{ \
vogleditor_stateTreeTexEnvStateVecFloatItem *pItem = new vogleditor_stateTreeTexEnvStateVecFloatItem(target, #name, name, idx, fVals, num, pTexNode, *m_pState); \
m_diffableItems.push_back(pItem); \
pTexNode->appendChild(pItem); \
}
GET_FLOAT(GL_TEXTURE_FILTER_CONTROL, texcoord_index, GL_TEXTURE_LOD_BIAS, 1);
GET_ENUM(GL_POINT_SPRITE, texcoord_index, GL_COORD_REPLACE, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_TEXTURE_ENV_MODE, 1);
GET_FLOAT(GL_TEXTURE_ENV, texcoord_index, GL_TEXTURE_ENV_COLOR, 4);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_COMBINE_RGB, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_COMBINE_ALPHA, 1);
GET_FLOAT(GL_TEXTURE_ENV, texcoord_index, GL_RGB_SCALE, 1);
GET_FLOAT(GL_TEXTURE_ENV, texcoord_index, GL_ALPHA_SCALE, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_SRC0_RGB, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_SRC1_RGB, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_SRC2_RGB, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_SRC0_ALPHA, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_SRC1_ALPHA, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_SRC2_ALPHA, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_OPERAND0_RGB, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_OPERAND1_RGB, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_OPERAND2_RGB, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_OPERAND0_ALPHA, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_OPERAND1_ALPHA, 1);
GET_ENUM(GL_TEXTURE_ENV, texcoord_index, GL_OPERAND2_ALPHA, 1);
// TODO:
//{ "glGetTexEnv", 'E', 1, "GL_SOURCE3_RGB_NV", 0x8583},
//{ "glGetTexEnv", 'E', 1, "GL_SOURCE3_ALPHA_NV", 0x858B},
//{ "glGetTexEnv", 'E', 1, "GL_OPERAND3_RGB_NV", 0x8593},
//{ "glGetTexEnv", 'E', 1, "GL_OPERAND3_ALPHA_NV", 0x859B},
//{ "glGetTexEnv", 'E', 1, "GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV", 0x86D9},
//{ "glGetTexEnv", 'E', 1, "GL_SHADER_OPERATION_NV", 0x86DF},
//{ "glGetTexEnv", 'E', 4, "GL_CULL_MODES_NV", 0x86E0},
//{ "glGetTexEnv", 'F', 4, "GL_OFFSET_TEXTURE_MATRIX_NV", 0x86E1},
//{ "glGetTexEnv", 'F', 1, "GL_OFFSET_TEXTURE_SCALE_NV", 0x86E2},
//{ "glGetTexEnv", 'F', 1, "GL_OFFSET_TEXTURE_BIAS_NV", 0x86E3},
//{ "glGetTexEnv", 'E', 1, "GL_PREVIOUS_TEXTURE_INPUT_NV", 0x86E4},
//{ "glGetTexEnv", 'F', 3, "GL_CONST_EYE_NV", 0x86E5},
//{ "glGetTexEnv", 'E', 1, "GL_BUMP_TARGET_ATI", 0x877C},
#undef GET_FLOAT
#undef GET_ENUM
#define GET_ENUM(target, idx, name, num) \
if (m_pState->get_state(target).get<int>(name, idx, iVals, num)) \
{ \
vogleditor_stateTreeTexEnvStateVecEnumItem *pItem = new vogleditor_stateTreeTexEnvStateVecEnumItem(target, #target " " #name, name, idx, iVals, num, pTexNode, *m_pState); \
m_diffableItems.push_back(pItem); \
pTexNode->appendChild(pItem); \
}
#define GET_FLOAT(target, idx, name, num) \
if (m_pState->get_state(target).get<float>(name, idx, fVals, num)) \
{ \
vogleditor_stateTreeTexEnvStateVecFloatItem *pItem = new vogleditor_stateTreeTexEnvStateVecFloatItem(target, #target " " #name, name, idx, fVals, num, pTexNode, *m_pState); \
m_diffableItems.push_back(pItem); \
pTexNode->appendChild(pItem); \
}
GET_ENUM(GL_S, texcoord_index, GL_TEXTURE_GEN_MODE, 1);
GET_FLOAT(GL_S, texcoord_index, GL_OBJECT_PLANE, 4);
GET_FLOAT(GL_S, texcoord_index, GL_EYE_PLANE, 4);
GET_ENUM(GL_T, texcoord_index, GL_TEXTURE_GEN_MODE, 1);
GET_FLOAT(GL_T, texcoord_index, GL_OBJECT_PLANE, 4);
GET_FLOAT(GL_T, texcoord_index, GL_EYE_PLANE, 4);
GET_ENUM(GL_R, texcoord_index, GL_TEXTURE_GEN_MODE, 1);
GET_FLOAT(GL_R, texcoord_index, GL_OBJECT_PLANE, 4);
GET_FLOAT(GL_R, texcoord_index, GL_EYE_PLANE, 4);
GET_ENUM(GL_Q, texcoord_index, GL_TEXTURE_GEN_MODE, 1);
GET_FLOAT(GL_Q, texcoord_index, GL_OBJECT_PLANE, 4);
GET_FLOAT(GL_Q, texcoord_index, GL_EYE_PLANE, 4);
#undef GET_FLOAT
#undef GET_ENUM
}
//.........这里部分代码省略.........