GLUT|ES - Frequently Asked QuestionsI am trying to compile GLUT|ES on Symbian but the compiler gives me a lot of errors! GLUT|ES has not yet been ported on Symbian. If you want to port it, do not hesitate, we will be pleased to add your updates to the official GLUT|ES release. I have a linkage error when I compile my project in emulator mode. Which OpenGL|ES library do you use? You must be aware that the non-commercial release package of Hybrid Gerbera does not
currently include a library for the x86 emulator. How to use the function glutSelectFile()?
glutSelectFile() opens a dialog box and let the user choose a file of specified type (extension).
As the function is based on the GetOpenFileName() function of the Windows API, the second parameter
is a filter compatible with the one used by GetOpenFileName(). So it's a pointer to a buffer containing
pairs of null-terminated filter strings. The last string in the buffer must be terminated by two NULL characters.
The first string in each pair is a display string that describes the filter (for example, "JPEG Files"),
and the second string specifies the filter pattern (for example, "*.JPG").
To specify multiple filter patterns for a single display string, use a semicolon to
separate the patterns (for example, "*.3DS;*.OBJ;*.X"). A pattern string can be a combination
of valid filename characters and the asterisk (*) wildcard character. Do not include spaces in the pattern string.
if(glutSelectFile(filename, "3DS Files\0*.3ds\0All files (*.*)\0*.*\0", "Select a 3DS file"))
{
FILE *f = fopen(filename, "r");
...
}
How to use the function glutTrueTypeString()?
glutTrueTypeString() draws an UNICODE string using a specified True Type font (which must
be installed in the Windows\Font directory) at a specified screen position. You can also indicate
characters' size and set different flags corresponding to italic(1), bold(2) and underlined(4). These
flags can be combined using a bit to bit OR operation. glutTrueTypeString(L"Arial", 12, 1|4, 100, 100, L"Hello world in UNICODE"); How to use the function glutInitDisplayString(const char *mode)?
Because of the specificites of EGL (EGL is an interface between OpenGL ES and the underlying native platform window system)
the function glutInitDisplayString() does not accept the same parameters that the classical Glut implementations. See this page.
glutInit(&argc, argv);
glutInitDisplayString("stencil=8 depth=8"); // Request 8 bits for both depth and stencil bufers.
glutInitWindowSize(240, 320);
glutCreateWindow("Hello GLUT|ES");
...
|