[-]
[+]
|
Changed |
_service:tar_git:glesplash.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:glesplash.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -6,7 +6,7 @@
<service name="tar_git">
<param name="url">https://github.com/nemomobile-ux/glesplash.git</param>
<param name="branch">master</param>
- <param name="revision">1266b7b46db05469e4a5c51c809af0f07b13a0e3</param>
+ <param name="revision">87b8fd98ddab444e8865ac9145488bbeb904ce85</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Deleted |
_service:tar_git:glesplash-0.0.11.tar.gz/x11/x11.cpp
^
|
@@ -1,61 +0,0 @@
-#include <string.h>
-
-#include "glesplash.h"
-
-Display *x_display;
-Window win;
-
-int create_x11_window(int x, int y, int width, int height, const char* title)
-{
- x_display = XOpenDisplay(NULL);
-
- if(!x_display)
- {
- cerr << "cannot connect to X server" << endl;
- return EXIT_FAILURE;
- }
-
- Window root = DefaultRootWindow(x_display);
-
- XSetWindowAttributes wa;
- wa.event_mask = ExposureMask; // | PointerMotionMask | KeyPressMask;
-
- win = XCreateWindow(x_display, root, x, y, width, height, 0,
- CopyFromParent, InputOutput,
- CopyFromParent, CWEventMask,
- &wa);
-
- wa.event_mask = 0;
- wa.override_redirect = false;
- XChangeWindowAttributes(x_display, win, CWOverrideRedirect, &wa);
-
- Atom atom;
- atom = XInternAtom(x_display, "_NET_WM_STATE_FULLSCREEN", True);
- XChangeProperty(x_display, win,
- XInternAtom(x_display, "_NET_WM_STATE", True),
- XA_ATOM, 32, PropModeReplace, (unsigned char*) &atom, 1);
-
- XWMHints hints;
- hints.input = True;
- hints.flags = InputHint;
- XSetWMHints(x_display, win, &hints);
-
- XMapWindow(x_display, win);
- XStoreName(x_display, win, title);
-
- Atom wm_state = XInternAtom(x_display, "_NET_WM_STATE", False);
- Atom fs_state = XInternAtom(x_display, "_NET_WM_STATE_FULLSCREEN", False);
-
- XEvent xev;
- memset(&xev, 0, sizeof(xev));
-
- xev.type = ClientMessage;
- xev.xclient.window = win;
- xev.xclient.message_type = wm_state;
- xev.xclient.format = 32;
- xev.xclient.data.l[0] = 1;
- xev.xclient.data.l[1] = fs_state;
- XSendEvent(x_display, root, False, SubstructureNotifyMask, &xev);
-
- return EXIT_SUCCESS;
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:glesplash-0.0.11.tar.gz/x11/x11.pro
^
|
@@ -1,21 +0,0 @@
-TARGET = glesplash
-TEMPLATE = app
-CONFIG += link_pkgconfig
-CONFIG -= qt
-
-PKGCONFIG += libpng egl glesv2 x11
-
-SOURCES = x11.cpp \
- ../common/main.cpp \
- ../common/png.cpp \
- ../common/shaders.cpp \
- ../common/gl.cpp
-
-HEADERS = ../common/glesplash.h \
- ../common/shaders.h
-INCLUDEPATH += ../common
-
-DEFINES += X11
-
-target.path = /usr/bin
-INSTALLS += target
|
[-]
[+]
|
Changed |
_service:tar_git:glesplash-0.0.12.tar.gz/.gitignore
^
|
@@ -1,4 +1,6 @@
*.list
+*.o
+RPMS
Makefile
glesplash
glesplash-fb
|
[-]
[+]
|
Changed |
_service:tar_git:glesplash-0.0.12.tar.gz/common/gl.cpp
^
|
@@ -33,13 +33,7 @@
static int init = 0;
if(!init) {
-#ifdef X11
- XWindowAttributes gwa;
- XGetWindowAttributes(x_display, win, &gwa);
- glViewport(0, 0, gwa.width, gwa.height);
-#else
glViewport(0, 288, 854, 480);
-#endif
glClearColor(1.0, 0.0, 1.0, 1.0);
init = 1;
}
@@ -70,11 +64,8 @@
EGL_NONE
};
-#ifdef X11
- egl_display = eglGetDisplay((EGLNativeDisplayType)x_display);
-#else
egl_display = eglGetDisplay(NULL);
-#endif
+
if(egl_display == EGL_NO_DISPLAY)
{
cerr << "Could not get EGL display" << endl;
@@ -99,11 +90,8 @@
return EXIT_FAILURE;
}
-#ifdef X11
- egl_surface = eglCreateWindowSurface(egl_display, egl_config, (EGLNativeWindowType)win, NULL);
-#else
egl_surface = eglCreateWindowSurface(egl_display, egl_config, (EGLNativeWindowType)NULL, NULL);
-#endif
+
if(egl_surface == EGL_NO_SURFACE)
{
cerr << "Unable to create EGL surface: " << eglGetError() << endl;
|
[-]
[+]
|
Changed |
_service:tar_git:glesplash-0.0.12.tar.gz/common/glesplash.h
^
|
@@ -9,16 +9,6 @@
#include <GLES2/gl2.h>
#include <EGL/egl.h>
-#ifdef X11
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-
-extern Display *x_display;
-extern Window win;
-#endif
-
-
extern EGLDisplay egl_display;
extern EGLContext egl_context;
extern EGLSurface egl_surface;
|
[-]
[+]
|
Changed |
_service:tar_git:glesplash-0.0.12.tar.gz/common/main.cpp
^
|
@@ -4,11 +4,9 @@
#include <signal.h>
#include <sys/time.h>
-#ifdef FB
#include <linux/omapfb.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#endif
#include "glesplash.h"
@@ -22,9 +20,9 @@
bool update_pos = false;
-#ifdef X11
-int create_x11_window(int x, int y, int width, int height, const char* title);
-#endif
+#define WIDTH 854
+#define HEIGHT 480
+
void signal_callback_handler(int sig)
{
@@ -32,10 +30,7 @@
eglDestroyContext(egl_display, egl_context);
eglDestroySurface(egl_display, egl_surface);
eglTerminate(egl_display);
-#ifdef X11
- XDestroyWindow(x_display, win);
- XCloseDisplay(x_display);
-#endif
+
exit(sig);
}
@@ -46,21 +41,9 @@
return EXIT_FAILURE;
}
-#ifdef X11
- cerr << "Creating X11 window" << endl;
- if(create_x11_window(0, 0, 854, 480, "X11 EGL Splash") == EXIT_FAILURE)
- {
- return EXIT_FAILURE;
- }
-#endif
-
cerr << "Creating EGL context" << endl;
if(create_egl_context() == EXIT_FAILURE)
{
-#ifdef X11
- XDestroyWindow(x_display, win);
- XCloseDisplay(x_display);
-#endif
return EXIT_FAILURE;
}
@@ -70,10 +53,6 @@
eglDestroyContext(egl_display, egl_context);
eglDestroySurface(egl_display, egl_surface);
eglTerminate(egl_display);
-#ifdef X11
- XDestroyWindow(x_display, win);
- XCloseDisplay(x_display);
-#endif
return EXIT_FAILURE;
}
@@ -98,28 +77,25 @@
// Main Loop
-#ifdef FB
int fd = open("/dev/fb0", O_RDWR);
struct omapfb_update_window update;
-#endif
while (true) { // the main loop
render();
-#ifdef FB
update.x = 0;
update.y = 0;
- update.width = 854;
- update.height = 480;
+ update.width = WIDTH;
+ update.height = HEIGHT;
update.format = OMAPFB_COLOR_RGB565;
update.out_x = 0;
update.out_y = 0;
- update.out_width = 854;
- update.out_height = 480;
+ update.out_width = WIDTH;
+ update.out_height = HEIGHT;
if (ioctl(fd, OMAPFB_UPDATE_WINDOW, &update) < 0) {
perror("Could not ioctl(OMAPFB_UPDATE_WINDOW)");
}
break;
-#endif
+
if(++frames % 60 == 0) {
gettimeofday(&iterT, &tz);
float dt = iterT.tv_sec - startT.tv_sec + (iterT.tv_usec - startT.tv_usec) * 1e-6;
@@ -133,9 +109,5 @@
eglDestroyContext(egl_display, egl_context);
eglDestroySurface(egl_display, egl_surface);
eglTerminate(egl_display);
-#ifdef X11
- XDestroyWindow(x_display, win);
- XCloseDisplay(x_display);
-#endif
return EXIT_SUCCESS;
}
|