first step for abstraction of the hardware
This commit is contained in:
parent
257c7354d6
commit
57d1d2ec74
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,7 +4,7 @@
|
|||||||
###################################
|
###################################
|
||||||
CVS
|
CVS
|
||||||
.svn
|
.svn
|
||||||
Object/
|
Object_*
|
||||||
doxygen/API/
|
doxygen/API/
|
||||||
doxygen/ALL/
|
doxygen/ALL/
|
||||||
|
|
||||||
|
38
Makefile
38
Makefile
@ -40,6 +40,29 @@ VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
|
|||||||
VERSION_BUILD_TIME=$(shell date)
|
VERSION_BUILD_TIME=$(shell date)
|
||||||
#$(info $(VERSION_BUILD_TIME))
|
#$(info $(VERSION_BUILD_TIME))
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
### Platform specificity : ###
|
||||||
|
###############################################################################
|
||||||
|
SUPPORTED_PLATFORM=X11 DoubleBuffer IPhone Android
|
||||||
|
DEFAULT_PLATFORM=X11
|
||||||
|
|
||||||
|
# default platform can be overridden
|
||||||
|
PLATFORM?=$(DEFAULT_PLATFORM)
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM), X11)
|
||||||
|
CXXFILES += base/guiX11.cpp
|
||||||
|
else ifeq ($(PLATFORM), DoubleBuffer)
|
||||||
|
CXXFILES += base/guiDoubleBuffer.cpp
|
||||||
|
else ifeq ($(PLATFORM), IPhone)
|
||||||
|
CXXFILES += base/guiIPhone.cpp
|
||||||
|
else ifeq ($(PLATFORM), Android)
|
||||||
|
CXXFILES += base/guiAndroid.cpp
|
||||||
|
else
|
||||||
|
$(error you must specify a corect platform : make PLATFORM=$(SUPPORTED_PLATFORM))
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(info Build for $(PLATFORM))
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
### Compilateur base system ###
|
### Compilateur base system ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -53,9 +76,14 @@ DEBUG:=1
|
|||||||
### Compilation Define ###
|
### Compilation Define ###
|
||||||
###############################################################################
|
###############################################################################
|
||||||
ifeq ("$(DEBUG)", "0")
|
ifeq ("$(DEBUG)", "0")
|
||||||
DEFINE= -DETK_DEBUG_LEVEL=1 -DNDEBUG -DETK_VERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
|
DEFINE = -DETK_DEBUG_LEVEL=1
|
||||||
|
DEFINE+= -DEWOL_DEBUG_LEVEL=1
|
||||||
|
DEFINE+= -DNDEBUG
|
||||||
|
DEFINE+= -DEWOL_VERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
|
||||||
else
|
else
|
||||||
DEFINE= -DETK_DEBUG_LEVEL=3 -DETK_VERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
DEFINE = -DETK_DEBUG_LEVEL=3
|
||||||
|
DEFINE+= -DEWOL_DEBUG_LEVEL=3
|
||||||
|
DEFINE+= -DEWOL_VERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
||||||
endif
|
endif
|
||||||
DEFINE+= -DVERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
DEFINE+= -DVERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||||
|
|
||||||
@ -66,7 +94,7 @@ X11FLAGS= -lX11 -lGL -lGLU -lXrandr
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# basic X11 librairy ==> show if we can une under lib ...
|
# basic X11 librairy ==> show if we can une under lib ...
|
||||||
CXXFLAGS= $(X11FLAGS)
|
CXXFLAGS= $(X11FLAGS) -D__PLATFORM__=$(PLATFORM)
|
||||||
|
|
||||||
ifeq ("$(DEBUG)", "0")
|
ifeq ("$(DEBUG)", "0")
|
||||||
# Enable debug (cgdb ***)
|
# Enable debug (cgdb ***)
|
||||||
@ -100,7 +128,7 @@ PROG_NAME=ewol
|
|||||||
FILE_DIRECTORY=Sources
|
FILE_DIRECTORY=Sources
|
||||||
OUTPUT_NAME_RELEASE=$(PROG_NAME)_release
|
OUTPUT_NAME_RELEASE=$(PROG_NAME)_release
|
||||||
OUTPUT_NAME_DEBUG=$(PROG_NAME)_debug
|
OUTPUT_NAME_DEBUG=$(PROG_NAME)_debug
|
||||||
OBJECT_DIR=Object
|
OBJECT_DIR=Object_$(PLATFORM)
|
||||||
|
|
||||||
ifeq ("$(DEBUG)", "0")
|
ifeq ("$(DEBUG)", "0")
|
||||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/release
|
OBJECT_DIRECTORY=$(OBJECT_DIR)/release
|
||||||
@ -122,7 +150,7 @@ MAKE_DEPENDENCE=Makefile
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# Ewol Tool Kit :
|
# Ewol Tool Kit :
|
||||||
CXXFILES = etk/etkDebug.cpp \
|
CXXFILES += etk/etkDebug.cpp \
|
||||||
etk/etkDebugInternal.cpp \
|
etk/etkDebugInternal.cpp \
|
||||||
etk/etkMemory.cpp \
|
etk/etkMemory.cpp \
|
||||||
etk/etkString.cpp \
|
etk/etkString.cpp \
|
||||||
|
48
Sources/base/guiAndroid.cpp
Normal file
48
Sources/base/guiAndroid.cpp
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************
|
||||||
|
* @file guiAndroid.cpp
|
||||||
|
* @brief Gui abstraction layer (Sources)
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @date 20/10/2011
|
||||||
|
* @par Project
|
||||||
|
* ewol
|
||||||
|
*
|
||||||
|
* @par Copyright
|
||||||
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY.
|
||||||
|
*
|
||||||
|
* Licence summary :
|
||||||
|
* You can modify and redistribute the sources code and binaries.
|
||||||
|
* You can send me the bug-fix
|
||||||
|
*
|
||||||
|
* Term of the licence in in the file licence.txt.
|
||||||
|
*
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <ewolDebug.h>
|
||||||
|
#include <guiAndroid.h>
|
||||||
|
|
||||||
|
#undef __class__
|
||||||
|
#define __class__ "guiAbstraction"
|
||||||
|
|
||||||
|
void guiAbstraction::Init(int32_t argc, char *argv[])
|
||||||
|
{
|
||||||
|
EWOL_INFO("INIT for Android environement");
|
||||||
|
}
|
||||||
|
|
||||||
|
void guiAbstraction::Run(void)
|
||||||
|
{
|
||||||
|
EWOL_INFO("Start Running");
|
||||||
|
EWOL_INFO("Stop Running");
|
||||||
|
}
|
||||||
|
|
||||||
|
void guiAbstraction::UnInit(void)
|
||||||
|
{
|
||||||
|
EWOL_INFO("UN-INIT for Android environement");
|
||||||
|
}
|
40
Sources/base/guiAndroid.h
Normal file
40
Sources/base/guiAndroid.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************
|
||||||
|
* @file guiAndroid.h
|
||||||
|
* @brief Gui abstraction layer (header)
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @date 20/10/2011
|
||||||
|
* @par Project
|
||||||
|
* ewol
|
||||||
|
*
|
||||||
|
* @par Copyright
|
||||||
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY.
|
||||||
|
*
|
||||||
|
* Licence summary :
|
||||||
|
* You can modify and redistribute the sources code and binaries.
|
||||||
|
* You can send me the bug-fix
|
||||||
|
*
|
||||||
|
* Term of the licence in in the file licence.txt.
|
||||||
|
*
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __GUI_ABSTRACTION_H__
|
||||||
|
#define __GUI_ABSTRACTION_H__
|
||||||
|
|
||||||
|
#include <etkTypes.h>
|
||||||
|
|
||||||
|
namespace guiAbstraction
|
||||||
|
{
|
||||||
|
void Init(int32_t argc, char *argv[]);
|
||||||
|
void Run(void);
|
||||||
|
void UnInit(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
46
Sources/base/guiDoubleBuffer.cpp
Normal file
46
Sources/base/guiDoubleBuffer.cpp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************
|
||||||
|
* @file guiDoubleBuffer.cpp
|
||||||
|
* @brief Gui abstraction layer (Sources)
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @date 20/10/2011
|
||||||
|
* @par Project
|
||||||
|
* ewol
|
||||||
|
*
|
||||||
|
* @par Copyright
|
||||||
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY.
|
||||||
|
*
|
||||||
|
* Licence summary :
|
||||||
|
* You can modify and redistribute the sources code and binaries.
|
||||||
|
* You can send me the bug-fix
|
||||||
|
*
|
||||||
|
* Term of the licence in in the file licence.txt.
|
||||||
|
*
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <ewolDebug.h>
|
||||||
|
#include <guiDoubleBuffer.h>
|
||||||
|
|
||||||
|
#undef __class__
|
||||||
|
#define __class__ "guiAbstraction"
|
||||||
|
|
||||||
|
void guiAbstraction::Init(int32_t argc, char *argv[])
|
||||||
|
{
|
||||||
|
EWOL_INFO("INIT for DoubleBuffer environement");
|
||||||
|
}
|
||||||
|
|
||||||
|
void guiAbstraction::Run(void)
|
||||||
|
{
|
||||||
|
EWOL_INFO("Start Running");
|
||||||
|
EWOL_INFO("Stop Running");
|
||||||
|
}
|
||||||
|
|
||||||
|
void guiAbstraction::UnInit(void)
|
||||||
|
{
|
||||||
|
EWOL_INFO("UN-INIT for DoubleBuffer environement");
|
||||||
|
}
|
40
Sources/base/guiDoubleBuffer.h
Normal file
40
Sources/base/guiDoubleBuffer.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************
|
||||||
|
* @file guiDoubleBuffer.h
|
||||||
|
* @brief Gui abstraction layer (header)
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @date 20/10/2011
|
||||||
|
* @par Project
|
||||||
|
* ewol
|
||||||
|
*
|
||||||
|
* @par Copyright
|
||||||
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY.
|
||||||
|
*
|
||||||
|
* Licence summary :
|
||||||
|
* You can modify and redistribute the sources code and binaries.
|
||||||
|
* You can send me the bug-fix
|
||||||
|
*
|
||||||
|
* Term of the licence in in the file licence.txt.
|
||||||
|
*
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __GUI_ABSTRACTION_H__
|
||||||
|
#define __GUI_ABSTRACTION_H__
|
||||||
|
|
||||||
|
#include <etkTypes.h>
|
||||||
|
|
||||||
|
namespace guiAbstraction
|
||||||
|
{
|
||||||
|
void Init(int32_t argc, char *argv[]);
|
||||||
|
void Run(void);
|
||||||
|
void UnInit(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
46
Sources/base/guiIPhone.cpp
Normal file
46
Sources/base/guiIPhone.cpp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************
|
||||||
|
* @file guiIPhone.cpp
|
||||||
|
* @brief Gui abstraction layer (Sources)
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @date 20/10/2011
|
||||||
|
* @par Project
|
||||||
|
* ewol
|
||||||
|
*
|
||||||
|
* @par Copyright
|
||||||
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY.
|
||||||
|
*
|
||||||
|
* Licence summary :
|
||||||
|
* You can modify and redistribute the sources code and binaries.
|
||||||
|
* You can send me the bug-fix
|
||||||
|
*
|
||||||
|
* Term of the licence in in the file licence.txt.
|
||||||
|
*
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <ewolDebug.h>
|
||||||
|
#include <guiIPhone.h>
|
||||||
|
|
||||||
|
#undef __class__
|
||||||
|
#define __class__ "guiAbstraction"
|
||||||
|
|
||||||
|
void guiAbstraction::Init(int32_t argc, char *argv[])
|
||||||
|
{
|
||||||
|
EWOL_INFO("INIT for IPhone environement");
|
||||||
|
}
|
||||||
|
|
||||||
|
void guiAbstraction::Run(void)
|
||||||
|
{
|
||||||
|
EWOL_INFO("Start Running");
|
||||||
|
EWOL_INFO("Stop Running");
|
||||||
|
}
|
||||||
|
|
||||||
|
void guiAbstraction::UnInit(void)
|
||||||
|
{
|
||||||
|
EWOL_INFO("UN-INIT for IPhone environement");
|
||||||
|
}
|
39
Sources/base/guiIPhone.h
Normal file
39
Sources/base/guiIPhone.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************
|
||||||
|
* @file guiIPhone.h
|
||||||
|
* @brief Gui abstraction layer (header)
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @date 20/10/2011
|
||||||
|
* @par Project
|
||||||
|
* ewol
|
||||||
|
*
|
||||||
|
* @par Copyright
|
||||||
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY.
|
||||||
|
*
|
||||||
|
* Licence summary :
|
||||||
|
* You can modify and redistribute the sources code and binaries.
|
||||||
|
* You can send me the bug-fix
|
||||||
|
*
|
||||||
|
* Term of the licence in in the file licence.txt.
|
||||||
|
*
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __GUI_ABSTRACTION_H__
|
||||||
|
#define __GUI_ABSTRACTION_H__
|
||||||
|
|
||||||
|
#include <etkTypes.h>
|
||||||
|
|
||||||
|
namespace guiAbstraction
|
||||||
|
{
|
||||||
|
void Init(int32_t argc, char *argv[]);
|
||||||
|
void Run(void);
|
||||||
|
void UnInit(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
48
Sources/base/guiX11.cpp
Normal file
48
Sources/base/guiX11.cpp
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************
|
||||||
|
* @file guiX11.cpp
|
||||||
|
* @brief Gui abstraction layer (Sources)
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @date 20/10/2011
|
||||||
|
* @par Project
|
||||||
|
* ewol
|
||||||
|
*
|
||||||
|
* @par Copyright
|
||||||
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY.
|
||||||
|
*
|
||||||
|
* Licence summary :
|
||||||
|
* You can modify and redistribute the sources code and binaries.
|
||||||
|
* You can send me the bug-fix
|
||||||
|
*
|
||||||
|
* Term of the licence in in the file licence.txt.
|
||||||
|
*
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <ewolDebug.h>
|
||||||
|
#include <guiX11.h>
|
||||||
|
|
||||||
|
#undef __class__
|
||||||
|
#define __class__ "guiAbstraction"
|
||||||
|
|
||||||
|
void guiAbstraction::Init(int32_t argc, char *argv[])
|
||||||
|
{
|
||||||
|
EWOL_INFO("INIT for X11 environement");
|
||||||
|
}
|
||||||
|
|
||||||
|
void guiAbstraction::Run(void)
|
||||||
|
{
|
||||||
|
EWOL_INFO("Start Running");
|
||||||
|
EWOL_INFO("Stop Running");
|
||||||
|
}
|
||||||
|
|
||||||
|
void guiAbstraction::UnInit(void)
|
||||||
|
{
|
||||||
|
EWOL_INFO("UN-INIT for X11 environement");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
40
Sources/base/guiX11.h
Normal file
40
Sources/base/guiX11.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
*******************************************************************************
|
||||||
|
* @file guiX11.h
|
||||||
|
* @brief Gui abstraction layer (header)
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @date 20/10/2011
|
||||||
|
* @par Project
|
||||||
|
* ewol
|
||||||
|
*
|
||||||
|
* @par Copyright
|
||||||
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY.
|
||||||
|
*
|
||||||
|
* Licence summary :
|
||||||
|
* You can modify and redistribute the sources code and binaries.
|
||||||
|
* You can send me the bug-fix
|
||||||
|
*
|
||||||
|
* Term of the licence in in the file licence.txt.
|
||||||
|
*
|
||||||
|
*******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __GUI_ABSTRACTION_H__
|
||||||
|
#define __GUI_ABSTRACTION_H__
|
||||||
|
|
||||||
|
#include <etkTypes.h>
|
||||||
|
|
||||||
|
namespace guiAbstraction
|
||||||
|
{
|
||||||
|
void Init(int32_t argc, char *argv[]);
|
||||||
|
void Run(void);
|
||||||
|
void UnInit(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -33,6 +33,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
#ifndef __int8_t_defined
|
#ifndef __int8_t_defined
|
||||||
# define __int8_t_defined
|
# define __int8_t_defined
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
@ -41,11 +42,13 @@
|
|||||||
typedef signed long long int int64_t;
|
typedef signed long long int int64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned char uint8_t;
|
#ifndef __uint8_t_defined
|
||||||
typedef unsigned short int uint16_t;
|
# define __uint8_t_defined
|
||||||
typedef unsigned long int uint32_t;
|
typedef unsigned char uint8_t;
|
||||||
typedef unsigned long long int uint64_t;
|
typedef unsigned short int uint16_t;
|
||||||
|
typedef unsigned long int uint32_t;
|
||||||
|
typedef unsigned long long int uint64_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define etk_min(elemA, elemB) ((elemA)<(elemB)) ? (elemA) : (elemB)
|
#define etk_min(elemA, elemB) ((elemA)<(elemB)) ? (elemA) : (elemB)
|
||||||
#define etk_max(elemA, elemB) ((elemA)<(elemB)) ? (elemB) : (elemA)
|
#define etk_max(elemA, elemB) ((elemA)<(elemB)) ? (elemB) : (elemA)
|
||||||
|
@ -22,23 +22,21 @@
|
|||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/extensions/Xrender.h>
|
#include <X11/extensions/Xrender.h>
|
||||||
|
*/
|
||||||
#include "ewol.h"
|
#include "ewol.h"
|
||||||
|
|
||||||
// need to run xcompmgr to have transparency
|
// need to run xcompmgr to have transparency
|
||||||
|
#if 0
|
||||||
static Atom del_atom;
|
static Atom del_atom;
|
||||||
static Display *Xdisplay;
|
static Display *Xdisplay;
|
||||||
static GLXFBConfig fbconfig;
|
static GLXFBConfig fbconfig;
|
||||||
@ -243,16 +241,33 @@ static void Draw(void)
|
|||||||
/* Swapbuffers */
|
/* Swapbuffers */
|
||||||
glXSwapBuffers(Xdisplay, GLXWindowHandle);
|
glXSwapBuffers(Xdisplay, GLXWindowHandle);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if __PLATFORM__ == X11
|
||||||
|
#include "guiX11.h"
|
||||||
|
#elif __PLATFORM__ == DoubleBuffer
|
||||||
|
#include "guiDoubleBuffer.h"
|
||||||
|
#elif __PLATFORM__ == Android
|
||||||
|
#include "guiAndroid.h"
|
||||||
|
#elif __PLATFORM__ == IPhone
|
||||||
|
#include "guiIPhone.h"
|
||||||
|
#else
|
||||||
|
#error you need to specify a platform ...
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void ewol::Init(int argc, char *argv[])
|
void ewol::Init(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
createX11Window();
|
guiAbstraction::Init(argc, argv);
|
||||||
|
//createX11Window();
|
||||||
createTheRenderContext();
|
//createTheRenderContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Run(void)
|
void ewol::Run(void)
|
||||||
{
|
{
|
||||||
|
guiAbstraction::Run();
|
||||||
|
/*
|
||||||
// main cycle
|
// main cycle
|
||||||
while(1) {
|
while(1) {
|
||||||
XEvent event;
|
XEvent event;
|
||||||
@ -279,11 +294,12 @@ void ewol::Run(void)
|
|||||||
Draw();
|
Draw();
|
||||||
usleep( 100000 );
|
usleep( 100000 );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::UnInit(void)
|
void ewol::UnInit(void)
|
||||||
{
|
{
|
||||||
|
guiAbstraction::UnInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,8 +26,10 @@
|
|||||||
#ifndef __EWOL_H__
|
#ifndef __EWOL_H__
|
||||||
#define __EWOL_H__
|
#define __EWOL_H__
|
||||||
|
|
||||||
|
#include <etkTypes.h>
|
||||||
|
|
||||||
namespace ewol {
|
namespace ewol {
|
||||||
void Init(int argc, char *argv[]);
|
void Init(int32_t argc, char *argv[]);
|
||||||
void Run(void);
|
void Run(void);
|
||||||
void UnInit(void);
|
void UnInit(void);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user