PainterEngine
2021-11-20 15:34:03 0 举报
PainterEngine是一个由C语言编写的完整开源的跨平台图形应用框架,可移植到Windows Linux Android iOS 支持WebAssembly的Web端及嵌入式MCU上
作者其他创作
大纲/内容
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA )
GLUT_LEFT_BUTTON ?
e.Event=PX_OBJECT_EVENT_CURSORRDOWN;
Yes
glutMotionFunc(PX_glutOnMouseDragEvent);
GLUT_RIGHT_BUTTON ?
e.Event=PX_OBJECT_EVENT_CURSORRUP;
PX_Object_Event e;px_char str[2]={0};e.Event=PX_OBJECT_EVENT_KEYDOWN;str[0]=key;e.Event=PX_OBJECT_EVENT_STRING;
glClear(GL_COLOR_BUFFER_BIT)
timenow=glutGet(GLUT_ELAPSED_TIME);
windowWidth=App.runtime.window_width;windowHeight=App.runtime.window_height;
glEnable(GL_TEXTURE_2D);
switch (button)
void PX_glutDisplayFunction(void)
PX_SystemLoop();
return 0
glutMouseFunc(PX_glutOnMouseEvent);
e.Event=PX_OBJECT_EVENT_CURSORDOWN;
No
glBegin(GL_QUADS);
glEnd();
glutPassiveMotionFunc(PX_glutOnMouseMoveEvent)
default
PX_Object_Event e;px_float cursorx_scale=App.runtime.surface_width*1.0f/App.runtime.window_width;px_float cursory_scale=App.runtime.surface_height*1.0f/App.runtime.window_height;e.Event=PX_OBJECT_EVENT_CURSORDRAG;
glutIdleFunc(PX_glutDisplayFunction);
e.Event=PX_OBJECT_EVENT_CURSORUP;
glutReshapeFunc(PX_glutDisplayResize);
glutDisplayFunc(PX_glutDisplayFunction);
glutSpecialFunc(PX_glutOnAnyKeyDown);
end
PX_Object_Event e;e.Event=PX_OBJECT_EVENT_WINDOWRESIZE;
lastupdatetime=glutGet(GLUT_ELAPSED_TIME);
PX_Object_Event e;e.Event=PX_OBJECT_EVENT_KEYDOWN;
PX_Object_Event e;px_float cursorx_scale=App.runtime.surface_width*1.0f/App.runtime.window_width;px_float cursory_scale=App.runtime.surface_height*1.0f/App.runtime.window_height;e.Event=PX_OBJECT_EVENT_CURSORMOVE;
PX_srand(314159)
PX_Object_Event e;px_float cursorx_scale=App.runtime.surface_width*1.0f/App.runtime.window_width;px_float cursory_scale=App.runtime.surface_height*1.0f/App.runtime.window_height;
glutKeyboardFunc(PX_glutOnAnsiKeyDown);
glutSwapBuffers();
state==GLUT_DOWN ?
收藏
0 条评论
下一页
为你推荐
查看更多
抱歉,暂无相关内容