#define NON_UNIFORM_SCALE 1 // 不等比缩放开关 宏定义
/*
修改create(int width,int height) / CCEGLView::setViewPortInPoints(float x,float y,float w,float h) / CCEGLView::setScissorInPoints(float x,float h)
方法中关于缩放的处理 */
)
{
)
{
;
}
;
;
// calculate the factor and the rect of viewport
;
#if NON_UNIFORM_SCALE
m_fScreenScaleFactorX
// 分别得到X,Y的缩放参数
m_fScreenScaleFactorY
;
#else
// 等比例缩放
;
#endif
;
;
;
;
;
;
;
}
setViewPortInPoints
x
y
)
{
m_bNotHVGA
)
{
factorX
CC_CONTENT_SCALE_FACTOR
;
factorY
;
glViewport
GLint
factorX
+
Crayon-h" style="height:inherit; font-size:inherit!important; line-height:inherit!important; color:rgb(0,
factorY
Crayon-sy" style="height:inherit; font-size:inherit!important; line-height:inherit!important; color:rgb(51,
w
Crayon-h" style="height:inherit; font-size:inherit!important; line-height:inherit!important; color:rgb(0,
h
;
}
else
{
Crayon-line
Crayon-striped-line" id="
Crayon-54f2a4f4774dc854808313-42" style="border:0px; padding:0px 5px; margin:0px; height:inherit; background-color:rgb(245,
Crayon-h" style="height:inherit; font-size:inherit!important; line-height:inherit!important; color:rgb(0,
Crayon-line
Crayon-striped-line" id="
Crayon-54f2a4f4774dc854808313-44" style="border:0px; padding:0px 5px; margin:0px; height:inherit; background-color:rgb(245,
;
}
}
setScissorInPoints
)
{
)
{
;
;
glScissor
Crayon-sy" style="height:inherit; font-size:inherit!important; line-height:inherit!important; color:rgb(51,
Crayon-line
Crayon-striped-line" id="
Crayon-54f2a4f4774dc854808313-56" style="border:0px; padding:0px 5px; margin:0px; height:inherit; background-color:rgb(245,
Crayon-h" style="height:inherit; font-size:inherit!important; line-height:inherit!important; color:rgb(0,
;
}
else
{
Crayon-line
Crayon-striped-line" id="
Crayon-54f2a4f4774dc854808313-62" style="border:0px; padding:0px 5px; margin:0px; height:inherit; background-color:rgb(245,
Crayon-h" style="height:inherit; font-size:inherit!important; line-height:inherit!important; color:rgb(0,
Crayon-line
Crayon-striped-line" id="
Crayon-54f2a4f4774dc854808313-64" style="border:0px; padding:0px 5px; margin:0px; height:inherit; background-color:rgb(245,
;
}
/*
增加getScreenScaleFactorX/getScreenScaleFactorY的实现 */
)
{
return
;
}
@H_
301_894@