On my system, your program writes:
ppp.bas(259) error 42: Variable not declared, EXIT_FAILURE in 'return (EXIT_FAILURE)'
so replaced
return(EXIT_FAILURE)
on the
return(0)
respectively fprintf replaced with print
Of course, there will be no error messages in the output, but I didn’t come up with anything else
Accordingly, there is no need for
'#include once "crt/stdio.bi"
'#include once "crt/stdlib.bi"
removed 'extern "C"
and end extern
With these changes, your program starts and runs stably without any flickering.
GLFW+ Freebasic
Re: GLFW+ Freebasic
EXIT_FAILURE is defined in inc\crt\win32\stdlib.bi on a Windows system and probably in stdlib.bi wherever it may be located in your OS
Code: Select all
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
Re: GLFW+ Freebasic
in the example examples\graphics\OpenGL\glfw_splitview.bas replace the do-loop in main with
and it runs smooth, no flickering
Code: Select all
do
if doredraw then
drawAllViews()
glfwSwapBuffers()
doredraw = 0
end if
glfwWaitEvents()
loop while (glfwGetKey(GLFW_KEY_ESC) <> GLFW_PRESS) andalso glfwGetWindowParam(GLFW_OPENED)
Re: GLFW+ Freebasic
Thanks