Merge pull request #68 from 1ace/man/intro
eglIntro: include path fix and empty lines
diff --git a/sdk/docs/man/docbook4/eglIntro.xml b/sdk/docs/man/docbook4/eglIntro.xml
index 7117842..d972451 100755
--- a/sdk/docs/man/docbook4/eglIntro.xml
+++ b/sdk/docs/man/docbook4/eglIntro.xml
@@ -144,7 +144,7 @@
<programlisting>
#include <stdlib.h>
#include <unistd.h>
-#include <GLES/egl.h>
+#include <EGL/egl.h>
#include <GLES/gl.h>
typedef ... NativeWindowType;
extern NativeWindowType createNativeWindow(void);
@@ -162,25 +162,35 @@
EGLSurface surface;
NativeWindowType native_window;
EGLint num_config;
+
/* get an EGL display connection */
display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+
/* initialize the EGL display connection */
eglInitialize(display, NULL, NULL);
+
/* get an appropriate EGL frame buffer configuration */
eglChooseConfig(display, attribute_list, &config, 1, &num_config);
+
/* create an EGL rendering context */
context = eglCreateContext(display, config, EGL_NO_CONTEXT, NULL);
+
/* create a native window */
native_window = createNativeWindow();
+
/* create an EGL window surface */
surface = eglCreateWindowSurface(display, config, native_window, NULL);
+
/* connect the context to the surface */
eglMakeCurrent(display, surface, surface, context);
+
/* clear the color buffer */
glClearColor(1.0, 1.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
+
eglSwapBuffers(display, surface);
+
sleep(10);
return EXIT_SUCCESS;
}
diff --git a/sdk/docs/man/eglIntro.xml b/sdk/docs/man/eglIntro.xml
index 731e440..0cdd0a1 100755
--- a/sdk/docs/man/eglIntro.xml
+++ b/sdk/docs/man/eglIntro.xml
@@ -152,7 +152,7 @@
<programlisting>
#include <stdlib.h>
#include <unistd.h>
-#include <GLES/egl.h>
+#include <EGL/egl.h>
#include <GLES/gl.h>
typedef ... NativeWindowType;
extern NativeWindowType createNativeWindow(void);
@@ -170,25 +170,35 @@
EGLSurface surface;
NativeWindowType native_window;
EGLint num_config;
+
/* get an EGL display connection */
display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+
/* initialize the EGL display connection */
eglInitialize(display, NULL, NULL);
+
/* get an appropriate EGL frame buffer configuration */
eglChooseConfig(display, attribute_list, &config, 1, &num_config);
+
/* create an EGL rendering context */
context = eglCreateContext(display, config, EGL_NO_CONTEXT, NULL);
+
/* create a native window */
native_window = createNativeWindow();
+
/* create an EGL window surface */
surface = eglCreateWindowSurface(display, config, native_window, NULL);
+
/* connect the context to the surface */
eglMakeCurrent(display, surface, surface, context);
+
/* clear the color buffer */
glClearColor(1.0, 1.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
+
eglSwapBuffers(display, surface);
+
sleep(10);
return EXIT_SUCCESS;
}
diff --git a/sdk/docs/man/html/eglIntro.xhtml b/sdk/docs/man/html/eglIntro.xhtml
index a7b8937..b82eade 100644
--- a/sdk/docs/man/html/eglIntro.xhtml
+++ b/sdk/docs/man/html/eglIntro.xhtml
@@ -154,7 +154,7 @@
<pre class="programlisting">
#include <stdlib.h>
#include <unistd.h>
-#include <GLES/egl.h>
+#include <EGL/egl.h>
#include <GLES/gl.h>
typedef ... NativeWindowType;
extern NativeWindowType createNativeWindow(void);
@@ -172,25 +172,35 @@
EGLSurface surface;
NativeWindowType native_window;
EGLint num_config;
+
/* get an EGL display connection */
display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+
/* initialize the EGL display connection */
eglInitialize(display, NULL, NULL);
+
/* get an appropriate EGL frame buffer configuration */
eglChooseConfig(display, attribute_list, &config, 1, &num_config);
+
/* create an EGL rendering context */
context = eglCreateContext(display, config, EGL_NO_CONTEXT, NULL);
+
/* create a native window */
native_window = createNativeWindow();
+
/* create an EGL window surface */
surface = eglCreateWindowSurface(display, config, native_window, NULL);
+
/* connect the context to the surface */
eglMakeCurrent(display, surface, surface, context);
+
/* clear the color buffer */
glClearColor(1.0, 1.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
+
eglSwapBuffers(display, surface);
+
sleep(10);
return EXIT_SUCCESS;
}
diff --git a/sdk/docs/man/xhtml/eglIntro.html b/sdk/docs/man/xhtml/eglIntro.html
index 3537171..4ef078e 100644
--- a/sdk/docs/man/xhtml/eglIntro.html
+++ b/sdk/docs/man/xhtml/eglIntro.html
@@ -356,7 +356,7 @@
<pre class="programlisting">
#include <stdlib.h>
#include <unistd.h>
-#include <GLES/egl.h>
+#include <EGL/egl.h>
#include <GLES/gl.h>
typedef ... NativeWindowType;
extern NativeWindowType createNativeWindow(void);
@@ -374,25 +374,35 @@
EGLSurface surface;
NativeWindowType native_window;
EGLint num_config;
+
/* get an EGL display connection */
display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+
/* initialize the EGL display connection */
eglInitialize(display, NULL, NULL);
+
/* get an appropriate EGL frame buffer configuration */
eglChooseConfig(display, attribute_list, &config, 1, &num_config);
+
/* create an EGL rendering context */
context = eglCreateContext(display, config, EGL_NO_CONTEXT, NULL);
+
/* create a native window */
native_window = createNativeWindow();
+
/* create an EGL window surface */
surface = eglCreateWindowSurface(display, config, native_window, NULL);
+
/* connect the context to the surface */
eglMakeCurrent(display, surface, surface, context);
+
/* clear the color buffer */
glClearColor(1.0, 1.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
+
eglSwapBuffers(display, surface);
+
sleep(10);
return EXIT_SUCCESS;
}