[DEV] change getting tag policy and remove choice of openGL-ES1
This commit is contained in:
parent
14f878bdd2
commit
9cf545c434
4
CreateTagEwol.sh
Executable file
4
CreateTagEwol.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo $* > Sources/libewol/tag
|
||||||
|
git tag $*
|
@ -1 +1 @@
|
|||||||
Subproject commit 9ca566ed85228973d9e442ee41d14d59e494a087
|
Subproject commit 197525dfc6cbe138767392466ad4f450aa7b2bd6
|
@ -214,6 +214,7 @@ namespace etk
|
|||||||
bool FileOpenWrite(void);
|
bool FileOpenWrite(void);
|
||||||
bool FileClose(void);
|
bool FileClose(void);
|
||||||
char* FileGets(char * elementLine, int32_t maxData);
|
char* FileGets(char * elementLine, int32_t maxData);
|
||||||
|
// TODO : Set the return and the size of block in 64 bits
|
||||||
int32_t FileRead(void * data, int32_t blockSize, int32_t nbBlock);
|
int32_t FileRead(void * data, int32_t blockSize, int32_t nbBlock);
|
||||||
int32_t FileWrite(void * data, int32_t blockSize, int32_t nbBlock);
|
int32_t FileWrite(void * data, int32_t blockSize, int32_t nbBlock);
|
||||||
bool FileSeek(long int offset, int origin);
|
bool FileSeek(long int offset, int origin);
|
||||||
|
@ -8,9 +8,8 @@ LOCAL_MODULE := ewol
|
|||||||
LOCAL_CONFIG_FILES := Config.in ConfigAndroid.in
|
LOCAL_CONFIG_FILES := Config.in ConfigAndroid.in
|
||||||
|
|
||||||
# get the tag of the current project :
|
# get the tag of the current project :
|
||||||
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
|
LOCAL_VERSION=$(shell cat $(LOCAL_PATH)/tag)
|
||||||
LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0)
|
$(info [TAG:$(LOCAL_MODULE)] $(LOCAL_VERSION))
|
||||||
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
|
|
||||||
|
|
||||||
# name of the dependency
|
# name of the dependency
|
||||||
LOCAL_LIBRARIES := etk freetype tinyxml libpng parsersvg lua libzip
|
LOCAL_LIBRARIES := etk freetype tinyxml libpng parsersvg lua libzip
|
||||||
@ -20,14 +19,10 @@ LOCAL_C_INCLUDES :=
|
|||||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||||
|
|
||||||
LOCAL_CFLAGS := -Wno-write-strings \
|
LOCAL_CFLAGS := -Wno-write-strings \
|
||||||
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\"" \
|
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG)-$(BUILD_DIRECTORY_MODE)\"" \
|
||||||
-DDATA_IN_APK
|
-DDATA_IN_APK
|
||||||
|
|
||||||
ifeq ("$(CONFIG___VIDEO__OPENGL_ES_2)","y")
|
|
||||||
LOCAL_EXPORT_LDLIBS := -lGLESv2
|
LOCAL_EXPORT_LDLIBS := -lGLESv2
|
||||||
else
|
|
||||||
LOCAL_EXPORT_LDLIBS := -lGLESv1_CM
|
|
||||||
endif
|
|
||||||
|
|
||||||
LOCAL_EXPORT_LDLIBS += -ldl -llog
|
LOCAL_EXPORT_LDLIBS += -ldl -llog
|
||||||
|
|
||||||
|
@ -1,17 +1,4 @@
|
|||||||
menu "General"
|
menu "General"
|
||||||
choice
|
|
||||||
prompt "OpenGl mode"
|
|
||||||
default __VIDEO__OPENGL_ES_1
|
|
||||||
help
|
|
||||||
OpenGL mode possible :
|
|
||||||
0 : openGL basic mode, vertex buffer.
|
|
||||||
1 : OpenGl 2 ==> no vertex bufffer but enable Shader system
|
|
||||||
config __VIDEO__OPENGL_ES_1
|
|
||||||
bool "0: openGl ES 1.0"
|
|
||||||
config __VIDEO__OPENGL_ES_2
|
|
||||||
bool "1: openGl ES 2.0"
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config __EWOL_APPL_BASIC_TITLE__
|
config __EWOL_APPL_BASIC_TITLE__
|
||||||
prompt "Application Title"
|
prompt "Application Title"
|
||||||
string
|
string
|
||||||
|
@ -8,9 +8,8 @@ LOCAL_MODULE := ewol
|
|||||||
LOCAL_CONFIG_FILES := Config.in
|
LOCAL_CONFIG_FILES := Config.in
|
||||||
|
|
||||||
# get the tag of the current project :
|
# get the tag of the current project :
|
||||||
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
|
LOCAL_VERSION=$(shell cat $(LOCAL_PATH)/tag)
|
||||||
LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0)
|
$(info [TAG:$(LOCAL_MODULE)] $(LOCAL_VERSION))
|
||||||
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
|
|
||||||
|
|
||||||
# name of the dependency
|
# name of the dependency
|
||||||
LOCAL_LIBRARIES := etk freetype tinyxml libzip libpng parsersvg lua portaudio
|
LOCAL_LIBRARIES := etk freetype tinyxml libzip libpng parsersvg lua portaudio
|
||||||
@ -25,14 +24,10 @@ LOCAL_EXPORT_LDLIBS := -lGL -lX11
|
|||||||
|
|
||||||
|
|
||||||
LOCAL_CFLAGS := -Wno-write-strings \
|
LOCAL_CFLAGS := -Wno-write-strings \
|
||||||
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\"" \
|
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG)-$(BUILD_DIRECTORY_MODE)\"" \
|
||||||
-Wall
|
-Wall
|
||||||
|
|
||||||
#ifneq ("$(CONFIG__VIDEO__OPENGL_ES_2)","")
|
LOCAL_EXPORT_CFLAGS :=
|
||||||
LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
|
|
||||||
LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
|
|
||||||
$(info Compilation For openGL-ES-v2 compatibility)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# load the common sources file of the platform
|
# load the common sources file of the platform
|
||||||
include $(LOCAL_PATH)/file.mk
|
include $(LOCAL_PATH)/file.mk
|
||||||
|
@ -8,9 +8,8 @@ LOCAL_MODULE := ewol
|
|||||||
LOCAL_CONFIG_FILES := Config.in
|
LOCAL_CONFIG_FILES := Config.in
|
||||||
|
|
||||||
# get the tag of the current project :
|
# get the tag of the current project :
|
||||||
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
|
LOCAL_VERSION=$(shell cat $(LOCAL_PATH)/tag)
|
||||||
LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0)
|
$(info [TAG:$(LOCAL_MODULE)] $(LOCAL_VERSION))
|
||||||
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
|
|
||||||
|
|
||||||
# name of the dependency
|
# name of the dependency
|
||||||
LOCAL_LIBRARIES := etk freetype tinyxml libzip libpng parsersvg lua zlib glew
|
LOCAL_LIBRARIES := etk freetype tinyxml libzip libpng parsersvg lua zlib glew
|
||||||
@ -21,7 +20,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|||||||
LOCAL_EXPORT_LDLIBS :=
|
LOCAL_EXPORT_LDLIBS :=
|
||||||
|
|
||||||
LOCAL_CFLAGS := -Wno-write-strings \
|
LOCAL_CFLAGS := -Wno-write-strings \
|
||||||
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\"" \
|
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG)-$(BUILD_DIRECTORY_MODE)\"" \
|
||||||
-Wall
|
-Wall
|
||||||
|
|
||||||
# load the common sources file of the platform
|
# load the common sources file of the platform
|
||||||
|
@ -32,7 +32,6 @@ ewol::Mesh::Mesh(etk::UString genName) :
|
|||||||
ewol::Resource(genName),
|
ewol::Resource(genName),
|
||||||
m_texture1(NULL)
|
m_texture1(NULL)
|
||||||
{
|
{
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::UString tmpString("textured3D.prog");
|
etk::UString tmpString("textured3D.prog");
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
@ -43,7 +42,6 @@ ewol::Mesh::Mesh(etk::UString genName) :
|
|||||||
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
||||||
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Mesh::~Mesh(void)
|
ewol::Mesh::~Mesh(void)
|
||||||
@ -52,9 +50,7 @@ ewol::Mesh::~Mesh(void)
|
|||||||
if(NULL!=m_texture1) {
|
if(NULL!=m_texture1) {
|
||||||
ewol::resource::Release(m_texture1);
|
ewol::resource::Release(m_texture1);
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::resource::Release(m_GLprogram);
|
ewol::resource::Release(m_GLprogram);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,7 +69,6 @@ void ewol::Mesh::Draw(void)
|
|||||||
EWOL_WARNING("Texture does not exist ...");
|
EWOL_WARNING("Texture does not exist ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
if (m_GLprogram==NULL) {
|
if (m_GLprogram==NULL) {
|
||||||
EWOL_ERROR("No shader ...");
|
EWOL_ERROR("No shader ...");
|
||||||
return;
|
return;
|
||||||
@ -100,24 +95,5 @@ void ewol::Mesh::Draw(void)
|
|||||||
// Request the draw od the elements :
|
// Request the draw od the elements :
|
||||||
glDrawArrays(GL_TRIANGLES, 0, m_vertices.Size());
|
glDrawArrays(GL_TRIANGLES, 0, m_vertices.Size());
|
||||||
m_GLprogram->UnUse();
|
m_GLprogram->UnUse();
|
||||||
#else
|
|
||||||
/*
|
|
||||||
glColor4f(1.0, 1.0, 1.0, 1.0);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
|
||||||
//EWOL_WARNING("Draw with texture : " << m_textureId << " ==> ogl=" << ewol::texture::GetGLID(m_textureId));
|
|
||||||
glBindTexture(GL_TEXTURE_2D, m_resource->GetId() );
|
|
||||||
glEnableClientState( GL_VERTEX_ARRAY ); // Enable Vertex Arrays
|
|
||||||
glEnableClientState( GL_TEXTURE_COORD_ARRAY ); // Enable Texture Coord Arrays
|
|
||||||
glEnableClientState( GL_COLOR_ARRAY ); // Enable Color Arrays
|
|
||||||
glVertexPointer( 3, GL_FLOAT, 0, &m_coord[0] );
|
|
||||||
glTexCoordPointer( 2, GL_FLOAT, 0, &m_coordTex[0] );
|
|
||||||
glColorPointer( 4, GL_UNSIGNED_BYTE, 0, &m_coordColor[0] );
|
|
||||||
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
|
|
||||||
//EWOL_DEBUG("request draw of " << m_coord.Size() << " elements");
|
|
||||||
glDisableClientState( GL_COLOR_ARRAY ); // Disable Color Arrays
|
|
||||||
glDisableClientState( GL_VERTEX_ARRAY ); // Disable Vertex Arrays
|
|
||||||
glDisableClientState( GL_TEXTURE_COORD_ARRAY ); // Disable Texture Coord Arrays
|
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
*/
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,24 +36,18 @@ namespace ewol
|
|||||||
class Mesh : public ewol::Resource
|
class Mesh : public ewol::Resource
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::Program* m_GLprogram;
|
ewol::Program* m_GLprogram;
|
||||||
int32_t m_GLPosition;
|
int32_t m_GLPosition;
|
||||||
int32_t m_GLMatrix;
|
int32_t m_GLMatrix;
|
||||||
int32_t m_GLColor;
|
int32_t m_GLColor;
|
||||||
int32_t m_GLtexture;
|
int32_t m_GLtexture;
|
||||||
int32_t m_GLtexID;
|
int32_t m_GLtexID;
|
||||||
#endif
|
|
||||||
etk::Vector<uint32_t> m_indices;
|
etk::Vector<uint32_t> m_indices;
|
||||||
etk::Vector< etk::Vector3D<float> > m_vertices;
|
etk::Vector< etk::Vector3D<float> > m_vertices;
|
||||||
etk::Vector< etk::Vector2D<float> > m_uvTextures;
|
etk::Vector< etk::Vector2D<float> > m_uvTextures;
|
||||||
etk::Vector< etk::Vector3D<float> > m_normals;
|
etk::Vector< etk::Vector3D<float> > m_normals;
|
||||||
ewol::TextureFile* m_texture1;
|
ewol::TextureFile* m_texture1;
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
||||||
#else
|
|
||||||
etk::Vector<draw::Color> m_coordColor; //!< internal color of the different point
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
Mesh(etk::UString genName);
|
Mesh(etk::UString genName);
|
||||||
virtual ~Mesh(void);
|
virtual ~Mesh(void);
|
||||||
|
@ -237,9 +237,8 @@ bool ewol::resource::Keep(etk::UString& filename, ewol::Font*& object)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
bool ewol::resource::Keep(etk::UString& filename, ewol::Program*& object)
|
||||||
bool ewol::resource::Keep(etk::UString& filename, ewol::Program*& object)
|
{
|
||||||
{
|
|
||||||
EWOL_VERBOSE("KEEP : Program : file : \"" << filename << "\"");
|
EWOL_VERBOSE("KEEP : Program : file : \"" << filename << "\"");
|
||||||
object = static_cast<ewol::Program*>(LocalKeep(filename));
|
object = static_cast<ewol::Program*>(LocalKeep(filename));
|
||||||
if (NULL != object) {
|
if (NULL != object) {
|
||||||
@ -253,12 +252,10 @@ bool ewol::resource::Keep(etk::UString& filename, ewol::Font*& object)
|
|||||||
}
|
}
|
||||||
LocalAdd(object);
|
LocalAdd(object);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
bool ewol::resource::Keep(etk::UString& filename, ewol::Shader*& object)
|
||||||
bool ewol::resource::Keep(etk::UString& filename, ewol::Shader*& object)
|
{
|
||||||
{
|
|
||||||
EWOL_VERBOSE("KEEP : Shader : file : \"" << filename << "\"");
|
EWOL_VERBOSE("KEEP : Shader : file : \"" << filename << "\"");
|
||||||
object = static_cast<ewol::Shader*>(LocalKeep(filename));
|
object = static_cast<ewol::Shader*>(LocalKeep(filename));
|
||||||
if (NULL != object) {
|
if (NULL != object) {
|
||||||
@ -272,12 +269,10 @@ bool ewol::resource::Keep(etk::UString& filename, ewol::Font*& object)
|
|||||||
}
|
}
|
||||||
LocalAdd(object);
|
LocalAdd(object);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
bool ewol::resource::Keep(etk::UString& filename, ewol::DistantFieldFont*& object)
|
||||||
bool ewol::resource::Keep(etk::UString& filename, ewol::DistantFieldFont*& object)
|
{
|
||||||
{
|
|
||||||
EWOL_VERBOSE("KEEP : DistanceFieldFont : file : \"" << filename << "\"");
|
EWOL_VERBOSE("KEEP : DistanceFieldFont : file : \"" << filename << "\"");
|
||||||
object = static_cast<ewol::DistantFieldFont*>(LocalKeep(filename));
|
object = static_cast<ewol::DistantFieldFont*>(LocalKeep(filename));
|
||||||
if (NULL != object) {
|
if (NULL != object) {
|
||||||
@ -291,8 +286,7 @@ bool ewol::resource::Keep(etk::UString& filename, ewol::Font*& object)
|
|||||||
}
|
}
|
||||||
LocalAdd(object);
|
LocalAdd(object);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool ewol::resource::Keep(ewol::Texture*& object)
|
bool ewol::resource::Keep(ewol::Texture*& object)
|
||||||
{
|
{
|
||||||
@ -439,30 +433,24 @@ void ewol::resource::Release(ewol::Font*& object)
|
|||||||
Release(object2);
|
Release(object2);
|
||||||
object = NULL;
|
object = NULL;
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
void ewol::resource::Release(ewol::Program*& object)
|
||||||
void ewol::resource::Release(ewol::Program*& object)
|
{
|
||||||
{
|
|
||||||
ewol::Resource* object2 = static_cast<ewol::Resource*>(object);
|
ewol::Resource* object2 = static_cast<ewol::Resource*>(object);
|
||||||
Release(object2);
|
Release(object2);
|
||||||
object = NULL;
|
object = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
void ewol::resource::Release(ewol::Shader*& object)
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
{
|
||||||
void ewol::resource::Release(ewol::Shader*& object)
|
|
||||||
{
|
|
||||||
ewol::Resource* object2 = static_cast<ewol::Resource*>(object);
|
ewol::Resource* object2 = static_cast<ewol::Resource*>(object);
|
||||||
Release(object2);
|
Release(object2);
|
||||||
object = NULL;
|
object = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
void ewol::resource::Release(ewol::DistantFieldFont*& object)
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
{
|
||||||
void ewol::resource::Release(ewol::DistantFieldFont*& object)
|
|
||||||
{
|
|
||||||
ewol::Resource* object2 = static_cast<ewol::Resource*>(object);
|
ewol::Resource* object2 = static_cast<ewol::Resource*>(object);
|
||||||
Release(object2);
|
Release(object2);
|
||||||
object = NULL;
|
object = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
void ewol::resource::Release(ewol::Texture*& object)
|
void ewol::resource::Release(ewol::Texture*& object)
|
||||||
{
|
{
|
||||||
ewol::Resource* object2 = static_cast<ewol::Resource*>(object);
|
ewol::Resource* object2 = static_cast<ewol::Resource*>(object);
|
||||||
|
@ -57,11 +57,9 @@ namespace ewol
|
|||||||
// return the type of the resource ...
|
// return the type of the resource ...
|
||||||
bool Keep(etk::UString& filename, ewol::TexturedFont*& object);
|
bool Keep(etk::UString& filename, ewol::TexturedFont*& object);
|
||||||
bool Keep(etk::UString& filename, ewol::Font*& object);
|
bool Keep(etk::UString& filename, ewol::Font*& object);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
bool Keep(etk::UString& filename, ewol::Program*& object);
|
bool Keep(etk::UString& filename, ewol::Program*& object);
|
||||||
bool Keep(etk::UString& filename, ewol::Shader*& object);
|
bool Keep(etk::UString& filename, ewol::Shader*& object);
|
||||||
bool Keep(etk::UString& filename, ewol::DistantFieldFont*& object);
|
bool Keep(etk::UString& filename, ewol::DistantFieldFont*& object);
|
||||||
#endif
|
|
||||||
bool Keep(ewol::Texture*& object); // no name needed here ...
|
bool Keep(ewol::Texture*& object); // no name needed here ...
|
||||||
bool Keep(etk::UString& filename, ewol::TextureFile*& object, etk::Vector2D<int32_t> size);
|
bool Keep(etk::UString& filename, ewol::TextureFile*& object, etk::Vector2D<int32_t> size);
|
||||||
bool Keep(etk::UString& accesMode, ewol::VirtualBufferObject*& object);
|
bool Keep(etk::UString& accesMode, ewol::VirtualBufferObject*& object);
|
||||||
@ -71,11 +69,9 @@ namespace ewol
|
|||||||
void Release(ewol::Resource*& object);
|
void Release(ewol::Resource*& object);
|
||||||
void Release(ewol::TexturedFont*& object);
|
void Release(ewol::TexturedFont*& object);
|
||||||
void Release(ewol::Font*& object);
|
void Release(ewol::Font*& object);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
void Release(ewol::Program*& object);
|
void Release(ewol::Program*& object);
|
||||||
void Release(ewol::Shader*& object);
|
void Release(ewol::Shader*& object);
|
||||||
void Release(ewol::DistantFieldFont*& object);
|
void Release(ewol::DistantFieldFont*& object);
|
||||||
#endif
|
|
||||||
void Release(ewol::Texture*& object);
|
void Release(ewol::Texture*& object);
|
||||||
void Release(ewol::TextureFile*& object);
|
void Release(ewol::TextureFile*& object);
|
||||||
void Release(ewol::VirtualBufferObject*& object);
|
void Release(ewol::VirtualBufferObject*& object);
|
||||||
|
@ -35,7 +35,6 @@ ewol::OObject2DColored::OObject2DColored(void)
|
|||||||
{
|
{
|
||||||
m_triElement = 0;
|
m_triElement = 0;
|
||||||
SetColor(1.0, 1.0, 1.0, 1.0);
|
SetColor(1.0, 1.0, 1.0, 1.0);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::UString tmpString("DATA:color.prog");
|
etk::UString tmpString("DATA:color.prog");
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
@ -44,7 +43,6 @@ ewol::OObject2DColored::OObject2DColored(void)
|
|||||||
m_GLColor = m_GLprogram->GetAttribute("EW_color");
|
m_GLColor = m_GLprogram->GetAttribute("EW_color");
|
||||||
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -52,9 +50,7 @@ ewol::OObject2DColored::~OObject2DColored(void)
|
|||||||
{
|
{
|
||||||
m_coord.Clear();
|
m_coord.Clear();
|
||||||
m_coordColor.Clear();
|
m_coordColor.Clear();
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::resource::Release(m_GLprogram);
|
ewol::resource::Release(m_GLprogram);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -63,7 +59,6 @@ void ewol::OObject2DColored::Draw(void)
|
|||||||
if (m_coord.Size()<=0) {
|
if (m_coord.Size()<=0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
if (m_GLprogram==NULL) {
|
if (m_GLprogram==NULL) {
|
||||||
EWOL_ERROR("No shader ...");
|
EWOL_ERROR("No shader ...");
|
||||||
return;
|
return;
|
||||||
@ -80,27 +75,6 @@ void ewol::OObject2DColored::Draw(void)
|
|||||||
// Request the draw of the elements :
|
// Request the draw of the elements :
|
||||||
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
||||||
m_GLprogram->UnUse();
|
m_GLprogram->UnUse();
|
||||||
#else
|
|
||||||
glPushMatrix();
|
|
||||||
// Enable Pointers
|
|
||||||
glEnableClientState( GL_VERTEX_ARRAY );
|
|
||||||
glEnableClientState( GL_COLOR_ARRAY );
|
|
||||||
|
|
||||||
glScalef(m_scaling.x, m_scaling.y, 1.0);
|
|
||||||
|
|
||||||
// Set the vertex pointer to our vertex data
|
|
||||||
glVertexPointer(2, GL_FLOAT, 0, &m_coord[0] );
|
|
||||||
glColorPointer(4, GL_UNSIGNED_BYTE, 0, &m_coordColor[0] );
|
|
||||||
// Render : draw all of the triangles at once
|
|
||||||
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
|
|
||||||
//glDrawElements( GL_TRIANGLES, 0, m_coord.Size());
|
|
||||||
//EWOL_DEBUG("Draw ..." << m_coord.Size()/3 << " triangle(s)");
|
|
||||||
// Disable Pointers
|
|
||||||
glDisableClientState( GL_COLOR_ARRAY );
|
|
||||||
glDisableClientState( GL_VERTEX_ARRAY );
|
|
||||||
glPopMatrix();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::OObject2DColored::Clear(void)
|
void ewol::OObject2DColored::Clear(void)
|
||||||
|
@ -37,20 +37,13 @@ namespace ewol {
|
|||||||
public:
|
public:
|
||||||
virtual void Draw(void);
|
virtual void Draw(void);
|
||||||
protected:
|
protected:
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::Program* m_GLprogram;
|
ewol::Program* m_GLprogram;
|
||||||
int32_t m_GLPosition;
|
int32_t m_GLPosition;
|
||||||
int32_t m_GLMatrix;
|
int32_t m_GLMatrix;
|
||||||
int32_t m_GLColor;
|
int32_t m_GLColor;
|
||||||
#endif
|
|
||||||
etk::Vector<etk::Vector2D<float> > m_coord; //!< internal coord of the object
|
etk::Vector<etk::Vector2D<float> > m_coord; //!< internal coord of the object
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
||||||
draw::Colorf m_color[3];
|
draw::Colorf m_color[3];
|
||||||
#else
|
|
||||||
etk::Vector<draw::Color> m_coordColor; //!< internal color of the different point
|
|
||||||
draw::Color m_color[3];
|
|
||||||
#endif
|
|
||||||
int32_t m_triElement;
|
int32_t m_triElement;
|
||||||
etk::Vector2D<float> m_triangle[3];
|
etk::Vector2D<float> m_triangle[3];
|
||||||
void GenerateTriangle(void);
|
void GenerateTriangle(void);
|
||||||
|
@ -72,7 +72,6 @@ ewol::OObject2DTextColored::OObject2DTextColored(etk::UString fontName, int32_t
|
|||||||
{
|
{
|
||||||
m_color = draw::color::black;
|
m_color = draw::color::black;
|
||||||
SetFontProperty(fontName, size);
|
SetFontProperty(fontName, size);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::UString tmpString("DATA:textured.prog");
|
etk::UString tmpString("DATA:textured.prog");
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
@ -83,7 +82,6 @@ ewol::OObject2DTextColored::OObject2DTextColored(etk::UString fontName, int32_t
|
|||||||
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
||||||
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -94,7 +92,6 @@ ewol::OObject2DTextColored::OObject2DTextColored(void) :
|
|||||||
m_color = draw::color::black;
|
m_color = draw::color::black;
|
||||||
SetFontProperty(ewol::font::GetDefaultFont(), ewol::font::GetDefaultSize());
|
SetFontProperty(ewol::font::GetDefaultFont(), ewol::font::GetDefaultSize());
|
||||||
etk::UString tmpString("DATA:textured.prog");
|
etk::UString tmpString("DATA:textured.prog");
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
if (true == ewol::resource::Keep(tmpString, m_GLprogram) ) {
|
if (true == ewol::resource::Keep(tmpString, m_GLprogram) ) {
|
||||||
@ -104,7 +101,6 @@ ewol::OObject2DTextColored::OObject2DTextColored(void) :
|
|||||||
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
||||||
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -114,9 +110,7 @@ ewol::OObject2DTextColored::~OObject2DTextColored(void)
|
|||||||
ewol::resource::Release(m_font);
|
ewol::resource::Release(m_font);
|
||||||
m_font = NULL;
|
m_font = NULL;
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::resource::Release(m_GLprogram);
|
ewol::resource::Release(m_GLprogram);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::OObject2DTextColored::Draw(void)
|
void ewol::OObject2DTextColored::Draw(void)
|
||||||
@ -130,7 +124,6 @@ void ewol::OObject2DTextColored::Draw(void)
|
|||||||
EWOL_WARNING("no font...");
|
EWOL_WARNING("no font...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
if (m_GLprogram==NULL) {
|
if (m_GLprogram==NULL) {
|
||||||
EWOL_ERROR("No shader ...");
|
EWOL_ERROR("No shader ...");
|
||||||
return;
|
return;
|
||||||
@ -150,22 +143,6 @@ void ewol::OObject2DTextColored::Draw(void)
|
|||||||
// Request the draw od the elements :
|
// Request the draw od the elements :
|
||||||
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
||||||
m_GLprogram->UnUse();
|
m_GLprogram->UnUse();
|
||||||
#else
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
|
||||||
glBindTexture(GL_TEXTURE_2D, m_font->GetId());
|
|
||||||
glEnableClientState( GL_VERTEX_ARRAY ); // Enable Vertex Arrays
|
|
||||||
glEnableClientState( GL_TEXTURE_COORD_ARRAY ); // Enable Texture Coord Arrays
|
|
||||||
glEnableClientState( GL_COLOR_ARRAY ); // Enable Color Arrays
|
|
||||||
glVertexPointer( 2, GL_FLOAT, 0, &m_coord[0] );
|
|
||||||
glTexCoordPointer( 2, GL_FLOAT, 0, &m_coordTex[0] );
|
|
||||||
glColorPointer( 4, GL_UNSIGNED_BYTE, 0, &m_coordColor[0] );
|
|
||||||
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
|
|
||||||
//EWOL_DEBUG("request draw of " << m_coord.Size() << " elements");
|
|
||||||
glDisableClientState( GL_COLOR_ARRAY ); // Disable Color Arrays
|
|
||||||
glDisableClientState( GL_VERTEX_ARRAY ); // Disable Vertex Arrays
|
|
||||||
glDisableClientState( GL_TEXTURE_COORD_ARRAY ); // Disable Texture Coord Arrays
|
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::OObject2DTextColored::Clear(void)
|
void ewol::OObject2DTextColored::Clear(void)
|
||||||
|
@ -45,23 +45,17 @@ namespace ewol {
|
|||||||
int32_t Text(etk::Vector2D<float> textPos, const etk::UString& unicodeString);
|
int32_t Text(etk::Vector2D<float> textPos, const etk::UString& unicodeString);
|
||||||
int32_t Text(etk::Vector2D<float> textPos, const uniChar_t unicodeChar);
|
int32_t Text(etk::Vector2D<float> textPos, const uniChar_t unicodeChar);
|
||||||
protected:
|
protected:
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::Program* m_GLprogram;
|
ewol::Program* m_GLprogram;
|
||||||
int32_t m_GLPosition;
|
int32_t m_GLPosition;
|
||||||
int32_t m_GLMatrix;
|
int32_t m_GLMatrix;
|
||||||
int32_t m_GLColor;
|
int32_t m_GLColor;
|
||||||
int32_t m_GLtexture;
|
int32_t m_GLtexture;
|
||||||
int32_t m_GLtexID;
|
int32_t m_GLtexID;
|
||||||
#endif
|
|
||||||
ewol::TexturedFont* m_font; //!< ewol font system
|
ewol::TexturedFont* m_font; //!< ewol font system
|
||||||
draw::Color m_color; //!< tmp text color ...
|
draw::Color m_color; //!< tmp text color ...
|
||||||
etk::Vector<etk::Vector2D<float> > m_coord; //!< internal coord of the object
|
etk::Vector<etk::Vector2D<float> > m_coord; //!< internal coord of the object
|
||||||
etk::Vector<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
etk::Vector<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
||||||
#else
|
|
||||||
etk::Vector<draw::Color> m_coordColor; //!< internal color of the different point
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
void SetFont(etk::UString fontName);
|
void SetFont(etk::UString fontName);
|
||||||
void SetSize(int32_t fontSize);
|
void SetSize(int32_t fontSize);
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
*
|
*
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
|
|
||||||
#include <ewol/oObject/2DTextShader.h>
|
#include <ewol/oObject/2DTextShader.h>
|
||||||
#include <ewol/openGL/openGL.h>
|
#include <ewol/openGL/openGL.h>
|
||||||
@ -238,4 +237,3 @@ etk::Vector2D<float> ewol::OObject2DTextShader::GetSize(const etk::UString& unic
|
|||||||
return m_font->GetSize(unicodeString);
|
return m_font->GetSize(unicodeString);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
#ifndef __EWOL_O_OBJECT_2D_TEXT_SHADER_H__
|
#ifndef __EWOL_O_OBJECT_2D_TEXT_SHADER_H__
|
||||||
#define __EWOL_O_OBJECT_2D_TEXT_SHADER_H__
|
#define __EWOL_O_OBJECT_2D_TEXT_SHADER_H__
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
|
|
||||||
#include <ewol/oObject/OObject.h>
|
#include <ewol/oObject/OObject.h>
|
||||||
#include <ewol/font/DistantFieldFont.h>
|
#include <ewol/font/DistantFieldFont.h>
|
||||||
#include <ewol/ResourceManager.h>
|
#include <ewol/ResourceManager.h>
|
||||||
@ -76,5 +74,3 @@ namespace ewol {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -38,7 +38,6 @@ ewol::OObject2DTextured::OObject2DTextured(etk::UString textureName, float sizeX
|
|||||||
EWOL_CRITICAL("can not get a resource Texture");
|
EWOL_CRITICAL("can not get a resource Texture");
|
||||||
}
|
}
|
||||||
m_resource = resourceFile;
|
m_resource = resourceFile;
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::UString tmpString("DATA:textured.prog");
|
etk::UString tmpString("DATA:textured.prog");
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
@ -49,7 +48,6 @@ ewol::OObject2DTextured::OObject2DTextured(etk::UString textureName, float sizeX
|
|||||||
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
||||||
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::OObject2DTextured::OObject2DTextured( float sizeX, float sizeY)
|
ewol::OObject2DTextured::OObject2DTextured( float sizeX, float sizeY)
|
||||||
@ -64,7 +62,6 @@ ewol::OObject2DTextured::OObject2DTextured( float sizeX, float sizeY)
|
|||||||
tmpImage.Clear();
|
tmpImage.Clear();
|
||||||
m_resource->Flush();
|
m_resource->Flush();
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::UString tmpString("DATA:textured.prog");
|
etk::UString tmpString("DATA:textured.prog");
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
@ -75,7 +72,6 @@ ewol::OObject2DTextured::OObject2DTextured( float sizeX, float sizeY)
|
|||||||
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
||||||
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -84,9 +80,7 @@ ewol::OObject2DTextured::~OObject2DTextured(void)
|
|||||||
if (NULL != m_resource) {
|
if (NULL != m_resource) {
|
||||||
ewol::resource::Release(m_resource);
|
ewol::resource::Release(m_resource);
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::resource::Release(m_GLprogram);
|
ewol::resource::Release(m_GLprogram);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::OObject2DTextured::Draw(void)
|
void ewol::OObject2DTextured::Draw(void)
|
||||||
@ -98,7 +92,6 @@ void ewol::OObject2DTextured::Draw(void)
|
|||||||
EWOL_WARNING("Texture does not exist ...");
|
EWOL_WARNING("Texture does not exist ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
if (m_GLprogram==NULL) {
|
if (m_GLprogram==NULL) {
|
||||||
EWOL_ERROR("No shader ...");
|
EWOL_ERROR("No shader ...");
|
||||||
return;
|
return;
|
||||||
@ -118,24 +111,6 @@ void ewol::OObject2DTextured::Draw(void)
|
|||||||
// Request the draw od the elements :
|
// Request the draw od the elements :
|
||||||
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
||||||
m_GLprogram->UnUse();
|
m_GLprogram->UnUse();
|
||||||
#else
|
|
||||||
glColor4f(1.0, 1.0, 1.0, 1.0);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
|
||||||
//EWOL_WARNING("Draw with texture : " << m_textureId << " ==> ogl=" << ewol::texture::GetGLID(m_textureId));
|
|
||||||
glBindTexture(GL_TEXTURE_2D, m_resource->GetId() );
|
|
||||||
glEnableClientState( GL_VERTEX_ARRAY ); // Enable Vertex Arrays
|
|
||||||
glEnableClientState( GL_TEXTURE_COORD_ARRAY ); // Enable Texture Coord Arrays
|
|
||||||
glEnableClientState( GL_COLOR_ARRAY ); // Enable Color Arrays
|
|
||||||
glVertexPointer( 2, GL_FLOAT, 0, &m_coord[0] );
|
|
||||||
glTexCoordPointer( 2, GL_FLOAT, 0, &m_coordTex[0] );
|
|
||||||
glColorPointer( 4, GL_UNSIGNED_BYTE, 0, &m_coordColor[0] );
|
|
||||||
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
|
|
||||||
//EWOL_DEBUG("request draw of " << m_coord.Size() << " elements");
|
|
||||||
glDisableClientState( GL_COLOR_ARRAY ); // Disable Color Arrays
|
|
||||||
glDisableClientState( GL_VERTEX_ARRAY ); // Disable Vertex Arrays
|
|
||||||
glDisableClientState( GL_TEXTURE_COORD_ARRAY ); // Disable Texture Coord Arrays
|
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::OObject2DTextured::Clear(void)
|
void ewol::OObject2DTextured::Clear(void)
|
||||||
|
@ -41,22 +41,16 @@ namespace ewol {
|
|||||||
void Rectangle(float x, float y, float w, float h, float texX=0.0, float texY=0.0, float texSX=1.0, float texSY=1.0, draw::Color tmpColor=draw::color::white);
|
void Rectangle(float x, float y, float w, float h, float texX=0.0, float texY=0.0, float texSX=1.0, float texSY=1.0, draw::Color tmpColor=draw::color::white);
|
||||||
void Rectangle(float x, float y, float w, float h, draw::Color tmpColor);
|
void Rectangle(float x, float y, float w, float h, draw::Color tmpColor);
|
||||||
protected:
|
protected:
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::Program* m_GLprogram;
|
ewol::Program* m_GLprogram;
|
||||||
int32_t m_GLPosition;
|
int32_t m_GLPosition;
|
||||||
int32_t m_GLMatrix;
|
int32_t m_GLMatrix;
|
||||||
int32_t m_GLColor;
|
int32_t m_GLColor;
|
||||||
int32_t m_GLtexture;
|
int32_t m_GLtexture;
|
||||||
int32_t m_GLtexID;
|
int32_t m_GLtexID;
|
||||||
#endif
|
|
||||||
ewol::Texture* m_resource; //!< texture resources
|
ewol::Texture* m_resource; //!< texture resources
|
||||||
etk::Vector<etk::Vector2D<float> > m_coord; //!< internal coord of the object
|
etk::Vector<etk::Vector2D<float> > m_coord; //!< internal coord of the object
|
||||||
etk::Vector<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
etk::Vector<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
||||||
#else
|
|
||||||
etk::Vector<draw::Color> m_coordColor; //!< internal color of the different point
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
draw::Image* GetImage(void)
|
draw::Image* GetImage(void)
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,6 @@ ewol::OObject3DTextured::OObject3DTextured(etk::UString textureName, float sizeX
|
|||||||
if (false == ewol::resource::Keep(textureName, m_resource, etk::Vector2D<int32_t>(sizeX,sizeY)) ) {
|
if (false == ewol::resource::Keep(textureName, m_resource, etk::Vector2D<int32_t>(sizeX,sizeY)) ) {
|
||||||
EWOL_CRITICAL("can not get a resource Texture");
|
EWOL_CRITICAL("can not get a resource Texture");
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::UString tmpString("textured3D.prog");
|
etk::UString tmpString("textured3D.prog");
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
@ -47,7 +46,6 @@ ewol::OObject3DTextured::OObject3DTextured(etk::UString textureName, float sizeX
|
|||||||
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
m_GLMatrix = m_GLprogram->GetUniform("EW_MatrixTransformation");
|
||||||
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
m_GLtexID = m_GLprogram->GetUniform("EW_texID");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -56,9 +54,7 @@ ewol::OObject3DTextured::~OObject3DTextured(void)
|
|||||||
if (NULL != m_resource) {
|
if (NULL != m_resource) {
|
||||||
ewol::resource::Release(m_resource);
|
ewol::resource::Release(m_resource);
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::resource::Release(m_GLprogram);
|
ewol::resource::Release(m_GLprogram);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::OObject3DTextured::Draw(void)
|
void ewol::OObject3DTextured::Draw(void)
|
||||||
@ -70,7 +66,6 @@ void ewol::OObject3DTextured::Draw(void)
|
|||||||
EWOL_WARNING("Texture does not exist ...");
|
EWOL_WARNING("Texture does not exist ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
if (m_GLprogram==NULL) {
|
if (m_GLprogram==NULL) {
|
||||||
EWOL_ERROR("No shader ...");
|
EWOL_ERROR("No shader ...");
|
||||||
return;
|
return;
|
||||||
@ -91,24 +86,6 @@ void ewol::OObject3DTextured::Draw(void)
|
|||||||
// Request the draw od the elements :
|
// Request the draw od the elements :
|
||||||
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
||||||
m_GLprogram->UnUse();
|
m_GLprogram->UnUse();
|
||||||
#else
|
|
||||||
glColor4f(1.0, 1.0, 1.0, 1.0);
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
|
||||||
//EWOL_WARNING("Draw with texture : " << m_textureId << " ==> ogl=" << ewol::texture::GetGLID(m_textureId));
|
|
||||||
glBindTexture(GL_TEXTURE_2D, m_resource->GetId() );
|
|
||||||
glEnableClientState( GL_VERTEX_ARRAY ); // Enable Vertex Arrays
|
|
||||||
glEnableClientState( GL_TEXTURE_COORD_ARRAY ); // Enable Texture Coord Arrays
|
|
||||||
glEnableClientState( GL_COLOR_ARRAY ); // Enable Color Arrays
|
|
||||||
glVertexPointer( 3, GL_FLOAT, 0, &m_coord[0] );
|
|
||||||
glTexCoordPointer( 2, GL_FLOAT, 0, &m_coordTex[0] );
|
|
||||||
glColorPointer( 4, GL_UNSIGNED_BYTE, 0, &m_coordColor[0] );
|
|
||||||
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
|
|
||||||
//EWOL_DEBUG("request draw of " << m_coord.Size() << " elements");
|
|
||||||
glDisableClientState( GL_COLOR_ARRAY ); // Disable Color Arrays
|
|
||||||
glDisableClientState( GL_VERTEX_ARRAY ); // Disable Vertex Arrays
|
|
||||||
glDisableClientState( GL_TEXTURE_COORD_ARRAY ); // Disable Texture Coord Arrays
|
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::OObject3DTextured::Clear(void)
|
void ewol::OObject3DTextured::Clear(void)
|
||||||
|
@ -40,22 +40,16 @@ namespace ewol {
|
|||||||
void Rectangle(float x, float y, float w, float h, float texX=0.0, float texY=0.0, float texSX=1.0, float texSY=1.0, draw::Color tmpColor=draw::color::white);
|
void Rectangle(float x, float y, float w, float h, float texX=0.0, float texY=0.0, float texSX=1.0, float texSY=1.0, draw::Color tmpColor=draw::color::white);
|
||||||
void Rectangle(float x, float y, float w, float h, draw::Color tmpColor);
|
void Rectangle(float x, float y, float w, float h, draw::Color tmpColor);
|
||||||
protected:
|
protected:
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::Program* m_GLprogram;
|
ewol::Program* m_GLprogram;
|
||||||
int32_t m_GLPosition;
|
int32_t m_GLPosition;
|
||||||
int32_t m_GLMatrix;
|
int32_t m_GLMatrix;
|
||||||
int32_t m_GLColor;
|
int32_t m_GLColor;
|
||||||
int32_t m_GLtexture;
|
int32_t m_GLtexture;
|
||||||
int32_t m_GLtexID;
|
int32_t m_GLtexID;
|
||||||
#endif
|
|
||||||
ewol::TextureFile* m_resource; //!< texture resources
|
ewol::TextureFile* m_resource; //!< texture resources
|
||||||
etk::Vector<etk::Vector3D<float> > m_coord; //!< internal coord of the object
|
etk::Vector<etk::Vector3D<float> > m_coord; //!< internal coord of the object
|
||||||
etk::Vector<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
etk::Vector<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
etk::Vector<draw::Colorf> m_coordColor; //!< internal color of the different point
|
||||||
#else
|
|
||||||
etk::Vector<draw::Color> m_coordColor; //!< internal color of the different point
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,7 +73,4 @@ namespace ewol {
|
|||||||
#include <ewol/oObject/2DTextured.h>
|
#include <ewol/oObject/2DTextured.h>
|
||||||
#include <ewol/oObject/2DColored.h>
|
#include <ewol/oObject/2DColored.h>
|
||||||
#include <ewol/oObject/2DTextColored.h>
|
#include <ewol/oObject/2DTextColored.h>
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
#include <ewol/oObject/2DTextShader.h>
|
#include <ewol/oObject/2DTextShader.h>
|
||||||
#endif
|
|
||||||
|
@ -83,11 +83,7 @@ void ewol::Sprite::Element(etk::Vector3D<float> pos, float size, float angle, dr
|
|||||||
texD.u = 1.0;
|
texD.u = 1.0;
|
||||||
texD.v = 0.0;
|
texD.v = 0.0;
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
draw::Colorf localColor = tmpColor;
|
draw::Colorf localColor = tmpColor;
|
||||||
#else
|
|
||||||
draw::Color localColor = tmpColor;
|
|
||||||
#endif
|
|
||||||
etk::Vector3D<float> point = pos;
|
etk::Vector3D<float> point = pos;
|
||||||
float yyySin = sin(angle) * size;
|
float yyySin = sin(angle) * size;
|
||||||
float xxxCos = cos(angle) * size;
|
float xxxCos = cos(angle) * size;
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/Types.h>
|
||||||
#include <ewol/Debug.h>
|
#include <ewol/Debug.h>
|
||||||
@ -645,4 +644,3 @@ void ewol::Program::UnUse(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -24,15 +24,14 @@
|
|||||||
|
|
||||||
#ifndef __OPEN_GL__PROGRAM_H__
|
#ifndef __OPEN_GL__PROGRAM_H__
|
||||||
#define __OPEN_GL__PROGRAM_H__
|
#define __OPEN_GL__PROGRAM_H__
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
#include <etk/Types.h>
|
||||||
#include <etk/Types.h>
|
#include <ewol/Debug.h>
|
||||||
#include <ewol/Debug.h>
|
#include <ewol/Resource.h>
|
||||||
#include <ewol/Resource.h>
|
#include <ewol/openGL/openGL.h>
|
||||||
#include <ewol/openGL/openGL.h>
|
#include <ewol/openGL/Shader.h>
|
||||||
#include <ewol/openGL/Shader.h>
|
|
||||||
|
|
||||||
namespace ewol
|
namespace ewol
|
||||||
{
|
{
|
||||||
class progAttributeElement
|
class progAttributeElement
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
@ -88,7 +87,7 @@
|
|||||||
void RemoveContextToLate(void);
|
void RemoveContextToLate(void);
|
||||||
void Reload(void);
|
void Reload(void);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/Types.h>
|
||||||
#include <etk/os/FSNode.h>
|
#include <etk/os/FSNode.h>
|
||||||
@ -168,5 +167,4 @@ void ewol::Shader::Reload(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -24,14 +24,13 @@
|
|||||||
|
|
||||||
#ifndef __OPEN_GL__SHADER_H__
|
#ifndef __OPEN_GL__SHADER_H__
|
||||||
#define __OPEN_GL__SHADER_H__
|
#define __OPEN_GL__SHADER_H__
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
#include <etk/Types.h>
|
||||||
#include <etk/Types.h>
|
#include <ewol/Debug.h>
|
||||||
#include <ewol/Debug.h>
|
#include <ewol/Resource.h>
|
||||||
#include <ewol/Resource.h>
|
#include <ewol/openGL/openGL.h>
|
||||||
#include <ewol/openGL/openGL.h>
|
|
||||||
|
|
||||||
namespace ewol
|
namespace ewol
|
||||||
{
|
{
|
||||||
class Shader : public ewol::Resource
|
class Shader : public ewol::Resource
|
||||||
{
|
{
|
||||||
private :
|
private :
|
||||||
@ -50,7 +49,7 @@
|
|||||||
void RemoveContextToLate(void);
|
void RemoveContextToLate(void);
|
||||||
void Reload(void);
|
void Reload(void);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -26,48 +26,6 @@
|
|||||||
#include <ewol/openGL/openGL.h>
|
#include <ewol/openGL/openGL.h>
|
||||||
#include <etk/Vector.h>
|
#include <etk/Vector.h>
|
||||||
|
|
||||||
#ifndef __VIDEO__OPENGL_ES_2
|
|
||||||
void glOrthoMatrix(GLfloat left,
|
|
||||||
GLfloat right,
|
|
||||||
GLfloat bottom,
|
|
||||||
GLfloat top,
|
|
||||||
GLfloat nearVal,
|
|
||||||
GLfloat farVal,
|
|
||||||
GLfloat* myMatrix)
|
|
||||||
{
|
|
||||||
int iii;
|
|
||||||
for(iii=0; iii<4*4 ; iii++) {
|
|
||||||
myMatrix[iii] = 0;
|
|
||||||
}
|
|
||||||
myMatrix[0] = 2.0 / (right - left);
|
|
||||||
myMatrix[5] = 2.0 / (top - bottom);
|
|
||||||
myMatrix[10] = -2.0 / (farVal - nearVal);
|
|
||||||
#if 1
|
|
||||||
myMatrix[3] = -1*(right + left) / (right - left);
|
|
||||||
myMatrix[7] = -1*(top + bottom) / (top - bottom);
|
|
||||||
myMatrix[11] = -1*(farVal + nearVal) / (farVal - nearVal);
|
|
||||||
#else
|
|
||||||
// test if matrix is not corectly instanciate ...
|
|
||||||
myMatrix[12] = -1*(right + left) / (right - left);
|
|
||||||
myMatrix[13] = -1*(top + bottom) / (top - bottom);
|
|
||||||
myMatrix[14] = -1*(farVal + nearVal) / (farVal - nearVal);
|
|
||||||
#endif
|
|
||||||
myMatrix[15] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void glOrthoEwol(GLfloat left,
|
|
||||||
GLfloat right,
|
|
||||||
GLfloat bottom,
|
|
||||||
GLfloat top,
|
|
||||||
GLfloat nearVal,
|
|
||||||
GLfloat farVal)
|
|
||||||
{
|
|
||||||
GLfloat myMatrix[4*4];
|
|
||||||
glOrthoMatrix(left, right, bottom, top, nearVal, farVal, myMatrix);
|
|
||||||
glLoadMatrixf(myMatrix);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
etk::Vector<etk::Matrix4> l_matrixList;
|
etk::Vector<etk::Matrix4> l_matrixList;
|
||||||
|
|
||||||
void ewol::openGL::Init(void)
|
void ewol::openGL::Init(void)
|
||||||
|
@ -32,12 +32,10 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__TARGET_OS__Linux)
|
#if defined(__TARGET_OS__Linux)
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
// TO ENABLE THE SHADER api ...
|
// TO ENABLE THE SHADER api ...
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#define GL_GLEXT_PROTOTYPES
|
||||||
#endif
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
// TODO : Check it it work
|
||||||
// This is to prevent the use of these element that is not allowed in the OpenGL ES
|
// This is to prevent the use of these element that is not allowed in the OpenGL ES
|
||||||
#undef glVertexPointer
|
#undef glVertexPointer
|
||||||
#undef glTexCoordPointer
|
#undef glTexCoordPointer
|
||||||
@ -47,27 +45,15 @@ extern "C" {
|
|||||||
#undef glMatrixMode
|
#undef glMatrixMode
|
||||||
#undef glLoadIdentity
|
#undef glLoadIdentity
|
||||||
#undef glTranslatef
|
#undef glTranslatef
|
||||||
#endif
|
|
||||||
#elif defined(__TARGET_OS__Android)
|
#elif defined(__TARGET_OS__Android)
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
// Include openGL ES 2
|
// Include openGL ES 2
|
||||||
#include <GLES2/gl2.h>
|
#include <GLES2/gl2.h>
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
#else
|
|
||||||
// Include openGL ES 1
|
|
||||||
#include <GLES/gl.h>
|
|
||||||
#endif
|
|
||||||
#elif defined(__TARGET_OS__Windows)
|
#elif defined(__TARGET_OS__Windows)
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
// TO ENABLE THE SHADER api ...
|
// TO ENABLE THE SHADER api ...
|
||||||
//#define GL_GLEXT_PROTOTYPES
|
//#define GL_GLEXT_PROTOTYPES
|
||||||
#define GLEW_STATIC
|
#define GLEW_STATIC
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#else
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <GL/glu.h>
|
|
||||||
#include <GL/glext.h>
|
|
||||||
#endif
|
|
||||||
#elif defined(__TARGET_OS__MacOs)
|
#elif defined(__TARGET_OS__MacOs)
|
||||||
|
|
||||||
#elif defined(__TARGET_OS__IOs)
|
#elif defined(__TARGET_OS__IOs)
|
||||||
@ -76,10 +62,6 @@ extern "C" {
|
|||||||
#error you need to specify a __TAGET_OS__ ...
|
#error you need to specify a __TAGET_OS__ ...
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __VIDEO__OPENGL_ES_2
|
|
||||||
// TODO : Remove : deprecated ....
|
|
||||||
void glOrthoEwol(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearVal, GLfloat farVal);
|
|
||||||
#endif
|
|
||||||
namespace ewol {
|
namespace ewol {
|
||||||
namespace openGL {
|
namespace openGL {
|
||||||
void Init(void);
|
void Init(void);
|
||||||
|
@ -216,13 +216,11 @@ int Windows_Run(void);
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
glewInit();
|
glewInit();
|
||||||
if (!glewIsSupported("GL_VERSION_2_0")) {
|
if (!glewIsSupported("GL_VERSION_2_0")) {
|
||||||
fprintf(stderr, "OpenGL 2.0 not available\n");
|
fprintf(stderr, "OpenGL 2.0 not available\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
ewol::CmdLine::Clean();
|
ewol::CmdLine::Clean();
|
||||||
for( int32_t i=1 ; i<argc; i++) {
|
for( int32_t i=1 ; i<argc; i++) {
|
||||||
|
@ -78,7 +78,6 @@ void ewol::Button::Init(void)
|
|||||||
m_textColorFg = draw::color::black;
|
m_textColorFg = draw::color::black;
|
||||||
|
|
||||||
SetCanHaveFocus(true);
|
SetCanHaveFocus(true);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::UString tmpString("THEME:GUI:widgetButton.conf");
|
etk::UString tmpString("THEME:GUI:widgetButton.conf");
|
||||||
if (true == ewol::resource::Keep(tmpString, m_config) ) {
|
if (true == ewol::resource::Keep(tmpString, m_config) ) {
|
||||||
m_confIdPaddingX = m_config->Request("PaddingX");
|
m_confIdPaddingX = m_config->Request("PaddingX");
|
||||||
@ -100,7 +99,6 @@ void ewol::Button::Init(void)
|
|||||||
m_GLstatus.m_stateNew = m_GLprogram->GetUniform("EW_status.stateNew");
|
m_GLstatus.m_stateNew = m_GLprogram->GetUniform("EW_status.stateNew");
|
||||||
m_GLstatus.m_transition = m_GLprogram->GetUniform("EW_status.transition");
|
m_GLstatus.m_transition = m_GLprogram->GetUniform("EW_status.transition");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Button::Button(void)
|
ewol::Button::Button(void)
|
||||||
@ -175,16 +173,15 @@ bool ewol::Button::GetValue(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
|
|
||||||
void ewol::Button::SetPoint(float x, float y)
|
void ewol::Button::SetPoint(float x, float y)
|
||||||
{
|
{
|
||||||
etk::Vector2D<float> triangle(x, y);
|
etk::Vector2D<float> triangle(x, y);
|
||||||
m_coord.PushBack(triangle);
|
m_coord.PushBack(triangle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Button::Rectangle(float x, float y, float w, float h)
|
void ewol::Button::Rectangle(float x, float y, float w, float h)
|
||||||
{
|
{
|
||||||
m_coord.Clear();
|
m_coord.Clear();
|
||||||
/* Bitmap position
|
/* Bitmap position
|
||||||
* xA xB
|
* xA xB
|
||||||
@ -204,8 +201,7 @@ bool ewol::Button::GetValue(void)
|
|||||||
SetPoint(dxB, dyC);
|
SetPoint(dxB, dyC);
|
||||||
SetPoint(dxB, dyD);
|
SetPoint(dxB, dyD);
|
||||||
SetPoint(dxA, dyD);
|
SetPoint(dxA, dyD);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void ewol::Button::OnDraw(DrawProperty& displayProp)
|
void ewol::Button::OnDraw(DrawProperty& displayProp)
|
||||||
|
@ -80,7 +80,6 @@ namespace ewol {
|
|||||||
class Button : public ewol::Widget
|
class Button : public ewol::Widget
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
// External theme config:
|
// External theme config:
|
||||||
ewol::SimpleConfigFile* m_config;
|
ewol::SimpleConfigFile* m_config;
|
||||||
int32_t m_confIdPaddingX;
|
int32_t m_confIdPaddingX;
|
||||||
@ -100,7 +99,6 @@ namespace ewol {
|
|||||||
etk::Vector<etk::Vector2D<float> > m_coord; //!< internal coord of the object
|
etk::Vector<etk::Vector2D<float> > m_coord; //!< internal coord of the object
|
||||||
void SetPoint(float x, float y);
|
void SetPoint(float x, float y);
|
||||||
void Rectangle(float x, float y, float w, float h);
|
void Rectangle(float x, float y, float w, float h);
|
||||||
#endif
|
|
||||||
private:
|
private:
|
||||||
ewol::OObject2DTextColored m_oObjectText;
|
ewol::OObject2DTextColored m_oObjectText;
|
||||||
ewol::OObject2DTextured* m_oObjectImage;
|
ewol::OObject2DTextured* m_oObjectImage;
|
||||||
|
@ -68,7 +68,6 @@ void ewol::Entry::Init(void)
|
|||||||
ShortCutAdd("ctrl+v", ewolEventEntryPaste);
|
ShortCutAdd("ctrl+v", ewolEventEntryPaste);
|
||||||
ShortCutAdd("ctrl+a", ewolEventEntrySelect, "ALL");
|
ShortCutAdd("ctrl+a", ewolEventEntrySelect, "ALL");
|
||||||
ShortCutAdd("ctrl+shift+a", ewolEventEntrySelect, "NONE");
|
ShortCutAdd("ctrl+shift+a", ewolEventEntrySelect, "NONE");
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::UString tmpString("THEME:GUI:widgetEntry.prog");
|
etk::UString tmpString("THEME:GUI:widgetEntry.prog");
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
@ -81,7 +80,6 @@ void ewol::Entry::Init(void)
|
|||||||
m_GLposText = m_GLprogram->GetUniform("EW_posText");
|
m_GLposText = m_GLprogram->GetUniform("EW_posText");
|
||||||
m_GLstate = m_GLprogram->GetUniform("EW_state");
|
m_GLstate = m_GLprogram->GetUniform("EW_state");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Entry::Entry(void)
|
ewol::Entry::Entry(void)
|
||||||
@ -134,16 +132,14 @@ etk::UString ewol::Entry::GetValue(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
void ewol::Entry::SetPoint(float x, float y)
|
||||||
|
{
|
||||||
void ewol::Entry::SetPoint(float x, float y)
|
|
||||||
{
|
|
||||||
etk::Vector2D<float> triangle(x, y);
|
etk::Vector2D<float> triangle(x, y);
|
||||||
m_coord.PushBack(triangle);
|
m_coord.PushBack(triangle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Entry::Rectangle(float x, float y, float w, float h)
|
void ewol::Entry::Rectangle(float x, float y, float w, float h)
|
||||||
{
|
{
|
||||||
m_coord.Clear();
|
m_coord.Clear();
|
||||||
/* Bitmap position
|
/* Bitmap position
|
||||||
* xA xB
|
* xA xB
|
||||||
@ -163,8 +159,7 @@ etk::UString ewol::Entry::GetValue(void)
|
|||||||
SetPoint(dxB, dyC);
|
SetPoint(dxB, dyC);
|
||||||
SetPoint(dxB, dyD);
|
SetPoint(dxB, dyD);
|
||||||
SetPoint(dxA, dyD);
|
SetPoint(dxA, dyD);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Common widget drawing function (called by the drawing thread [Android, X11, ...])
|
* @brief Common widget drawing function (called by the drawing thread [Android, X11, ...])
|
||||||
@ -173,7 +168,6 @@ etk::UString ewol::Entry::GetValue(void)
|
|||||||
*/
|
*/
|
||||||
void ewol::Entry::OnDraw(DrawProperty& displayProp)
|
void ewol::Entry::OnDraw(DrawProperty& displayProp)
|
||||||
{
|
{
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
if (m_GLprogram==NULL) {
|
if (m_GLprogram==NULL) {
|
||||||
EWOL_ERROR("No shader ...");
|
EWOL_ERROR("No shader ...");
|
||||||
return;
|
return;
|
||||||
@ -194,7 +188,6 @@ void ewol::Entry::OnDraw(DrawProperty& displayProp)
|
|||||||
// Request the draw of the elements :
|
// Request the draw of the elements :
|
||||||
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
glDrawArrays(GL_TRIANGLES, 0, m_coord.Size());
|
||||||
m_GLprogram->UnUse();
|
m_GLprogram->UnUse();
|
||||||
#endif
|
|
||||||
m_oObjectDecoration.Draw();
|
m_oObjectDecoration.Draw();
|
||||||
m_oObjectText.Draw();
|
m_oObjectText.Draw();
|
||||||
}
|
}
|
||||||
@ -246,19 +239,11 @@ void ewol::Entry::OnRegenerateDisplay(void)
|
|||||||
m_oObjectText.Text(textPos, m_data);
|
m_oObjectText.Text(textPos, m_data);
|
||||||
m_oObjectText.clippingDisable();
|
m_oObjectText.clippingDisable();
|
||||||
|
|
||||||
#ifndef __VIDEO__OPENGL_ES_2
|
|
||||||
m_oObjectDecoration.SetColor(m_textColorBg);
|
|
||||||
m_oObjectDecoration.Rectangle( tmpOriginX, tmpOriginY, tmpSizeX, tmpSizeY);
|
|
||||||
m_oObjectDecoration.SetColor(m_textColorFg);
|
|
||||||
m_oObjectDecoration.RectangleBorder( tmpOriginX, tmpOriginY, tmpSizeX, tmpSizeY, m_borderSize);
|
|
||||||
#else
|
|
||||||
m_pos[0] = m_borderSize+2*drawClipping.x;
|
m_pos[0] = m_borderSize+2*drawClipping.x;
|
||||||
m_pos[1] = m_borderSize+2*drawClipping.y;
|
m_pos[1] = m_borderSize+2*drawClipping.y;
|
||||||
m_pos[2] = m_size.x - 2*(m_borderSize+2*drawClipping.x);
|
m_pos[2] = m_size.x - 2*(m_borderSize+2*drawClipping.x);
|
||||||
m_pos[3] = m_size.y - 2*(m_borderSize+2*drawClipping.y);
|
m_pos[3] = m_size.y - 2*(m_borderSize+2*drawClipping.y);
|
||||||
|
|
||||||
Rectangle(0, 0, m_size.x, m_size.y);
|
Rectangle(0, 0, m_size.x, m_size.y);
|
||||||
#endif
|
|
||||||
int32_t pos1 = m_displayCursorPosSelection;
|
int32_t pos1 = m_displayCursorPosSelection;
|
||||||
int32_t pos2 = m_displayCursorPos;
|
int32_t pos2 = m_displayCursorPos;
|
||||||
if(m_displayCursorPosSelection>m_displayCursorPos) {
|
if(m_displayCursorPosSelection>m_displayCursorPos) {
|
||||||
|
@ -48,7 +48,6 @@ namespace ewol {
|
|||||||
class Entry : public ewol::Widget
|
class Entry : public ewol::Widget
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::Program* m_GLprogram;
|
ewol::Program* m_GLprogram;
|
||||||
int32_t m_GLPosition;
|
int32_t m_GLPosition;
|
||||||
int32_t m_GLMatrix;
|
int32_t m_GLMatrix;
|
||||||
@ -62,7 +61,6 @@ namespace ewol {
|
|||||||
draw::Colorf m_color[3];
|
draw::Colorf m_color[3];
|
||||||
void SetPoint(float x, float y);
|
void SetPoint(float x, float y);
|
||||||
void Rectangle(float x, float y, float w, float h);
|
void Rectangle(float x, float y, float w, float h);
|
||||||
#endif
|
|
||||||
private:
|
private:
|
||||||
ewol::OObject2DTextColored m_oObjectText; //!< text display
|
ewol::OObject2DTextColored m_oObjectText; //!< text display
|
||||||
ewol::OObject2DColored m_oObjectDecoration; //!< background display
|
ewol::OObject2DColored m_oObjectDecoration; //!< background display
|
||||||
|
@ -156,11 +156,7 @@ void ewol::Scene::PeriodicCall(int64_t localTime)
|
|||||||
void ewol::Scene::GenDraw(DrawProperty displayProp)
|
void ewol::Scene::GenDraw(DrawProperty displayProp)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::openGL::Push();
|
ewol::openGL::Push();
|
||||||
#else
|
|
||||||
glPushMatrix();
|
|
||||||
#endif
|
|
||||||
// here we invert the reference of the standard OpenGl view because the reference in the common display is Top left and not buttom left
|
// here we invert the reference of the standard OpenGl view because the reference in the common display is Top left and not buttom left
|
||||||
glViewport( m_origin.x,
|
glViewport( m_origin.x,
|
||||||
m_origin.y,
|
m_origin.y,
|
||||||
@ -169,7 +165,6 @@ void ewol::Scene::GenDraw(DrawProperty displayProp)
|
|||||||
float ratio = m_size.x / m_size.y;
|
float ratio = m_size.x / m_size.y;
|
||||||
m_zoom = 1.0/1000.0;
|
m_zoom = 1.0/1000.0;
|
||||||
//EWOL_INFO("ratio : " << ratio);
|
//EWOL_INFO("ratio : " << ratio);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Matrix4 tmpProjection;
|
etk::Matrix4 tmpProjection;
|
||||||
|
|
||||||
if (ratio >= 1.0) {
|
if (ratio >= 1.0) {
|
||||||
@ -182,31 +177,13 @@ void ewol::Scene::GenDraw(DrawProperty displayProp)
|
|||||||
etk::Matrix4 tmpMat = tmpProjection * tmpScale;
|
etk::Matrix4 tmpMat = tmpProjection * tmpScale;
|
||||||
// set internal matrix system :
|
// set internal matrix system :
|
||||||
ewol::openGL::SetMatrix(tmpMat);
|
ewol::openGL::SetMatrix(tmpMat);
|
||||||
#else
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
if (ratio >= 1.0) {
|
|
||||||
glOrthoEwol(-ratio, ratio, -1, 1, -1, 1);
|
|
||||||
} else {
|
|
||||||
ratio = 1.0/ratio;
|
|
||||||
glOrthoEwol(-1, 1, -ratio, ratio, -1, 1);
|
|
||||||
}
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
glScalef(m_zoom, m_zoom, m_zoom);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// Clear the screen with transparency ...
|
// Clear the screen with transparency ...
|
||||||
glClearColor(0.0, 0.0, 0.0, 1.0);
|
glClearColor(0.0, 0.0, 0.0, 1.0);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
// Call the widget drawing methode
|
// Call the widget drawing methode
|
||||||
OnDraw(displayProp);
|
OnDraw(displayProp);
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::openGL::Pop();
|
ewol::openGL::Pop();
|
||||||
#else
|
|
||||||
glPopMatrix();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -230,11 +230,7 @@ void ewol::Widget::GenDraw(DrawProperty displayProp)
|
|||||||
// widget is hidden ...
|
// widget is hidden ...
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::openGL::Push();
|
ewol::openGL::Push();
|
||||||
#else
|
|
||||||
glPushMatrix();
|
|
||||||
#endif
|
|
||||||
if( (displayProp.m_origin.x > m_origin.x)
|
if( (displayProp.m_origin.x > m_origin.x)
|
||||||
|| (displayProp.m_origin.x + displayProp.m_size.x < m_size.x + m_origin.x) ) {
|
|| (displayProp.m_origin.x + displayProp.m_size.x < m_size.x + m_origin.x) ) {
|
||||||
// here we invert the reference of the standard OpenGl view because the reference in the common display is Top left and not buttom left
|
// here we invert the reference of the standard OpenGl view because the reference in the common display is Top left and not buttom left
|
||||||
@ -252,23 +248,12 @@ void ewol::Widget::GenDraw(DrawProperty displayProp)
|
|||||||
tmpOriginY,
|
tmpOriginY,
|
||||||
tmpclipX,
|
tmpclipX,
|
||||||
m_size.y);
|
m_size.y);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Matrix4 tmpTranslate = etk::matrix::Translate(-tmpclipX/2 - (tmpOriginX-m_origin.x), -m_size.y/2, -1.0);
|
etk::Matrix4 tmpTranslate = etk::matrix::Translate(-tmpclipX/2 - (tmpOriginX-m_origin.x), -m_size.y/2, -1.0);
|
||||||
etk::Matrix4 tmpScale = etk::matrix::Scale(m_zoom, m_zoom, 1.0);
|
etk::Matrix4 tmpScale = etk::matrix::Scale(m_zoom, m_zoom, 1.0);
|
||||||
etk::Matrix4 tmpProjection = etk::matrix::Perspective(-tmpclipX/2, tmpclipX/2, -m_size.y/2, m_size.y/2, -1, 1);
|
etk::Matrix4 tmpProjection = etk::matrix::Perspective(-tmpclipX/2, tmpclipX/2, -m_size.y/2, m_size.y/2, -1, 1);
|
||||||
etk::Matrix4 tmpMat = tmpProjection * tmpScale * tmpTranslate;
|
etk::Matrix4 tmpMat = tmpProjection * tmpScale * tmpTranslate;
|
||||||
// set internal matrix system :
|
// set internal matrix system :
|
||||||
ewol::openGL::SetMatrix(tmpMat);
|
ewol::openGL::SetMatrix(tmpMat);
|
||||||
#else
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrthoEwol(-tmpclipX/2, tmpclipX/2, -m_size.y/2, m_size.y/2, -1, 1);
|
|
||||||
//glOrthoEwol(0., m_size.x, 0., -m_size.y, 1., 20.);
|
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
glTranslatef(-tmpclipX/2 - (tmpOriginX-m_origin.x), -m_size.y/2, -1.0);
|
|
||||||
#endif
|
|
||||||
// Call the widget drawing methode
|
// Call the widget drawing methode
|
||||||
displayProp.m_origin.x = tmpOriginX;
|
displayProp.m_origin.x = tmpOriginX;
|
||||||
displayProp.m_origin.y = tmpOriginY;
|
displayProp.m_origin.y = tmpOriginY;
|
||||||
@ -280,7 +265,6 @@ void ewol::Widget::GenDraw(DrawProperty displayProp)
|
|||||||
m_origin.y,
|
m_origin.y,
|
||||||
m_size.x,
|
m_size.x,
|
||||||
m_size.y);
|
m_size.y);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
#if 1
|
#if 1
|
||||||
etk::Matrix4 tmpTranslate = etk::matrix::Translate(-m_size.x/2, -m_size.y/2, -1.0);
|
etk::Matrix4 tmpTranslate = etk::matrix::Translate(-m_size.x/2, -m_size.y/2, -1.0);
|
||||||
etk::Matrix4 tmpScale = etk::matrix::Scale(m_zoom, m_zoom, 1.0);
|
etk::Matrix4 tmpScale = etk::matrix::Scale(m_zoom, m_zoom, 1.0);
|
||||||
@ -291,25 +275,12 @@ void ewol::Widget::GenDraw(DrawProperty displayProp)
|
|||||||
#endif
|
#endif
|
||||||
// set internal matrix system :
|
// set internal matrix system :
|
||||||
ewol::openGL::SetMatrix(tmpMat);
|
ewol::openGL::SetMatrix(tmpMat);
|
||||||
#else
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrthoEwol(-m_size.x/2, m_size.x/2, -m_size.y/2, m_size.y/2, -1, 1);
|
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
glTranslatef(-m_size.x/2, -m_size.y/2, -1.0);
|
|
||||||
#endif
|
|
||||||
// Call the widget drawing methode
|
// Call the widget drawing methode
|
||||||
displayProp.m_origin = m_origin;
|
displayProp.m_origin = m_origin;
|
||||||
displayProp.m_size = m_size;
|
displayProp.m_size = m_size;
|
||||||
OnDraw(displayProp);
|
OnDraw(displayProp);
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::openGL::Pop();
|
ewol::openGL::Pop();
|
||||||
#else
|
|
||||||
glPopMatrix();
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,33 +364,19 @@ void ewol::WidgetScrooled::OnDraw(DrawProperty& displayProp)
|
|||||||
*/
|
*/
|
||||||
void ewol::WidgetScrooled::GenDraw(DrawProperty displayProp)
|
void ewol::WidgetScrooled::GenDraw(DrawProperty displayProp)
|
||||||
{
|
{
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::openGL::Push();
|
ewol::openGL::Push();
|
||||||
#else
|
|
||||||
glPushMatrix();
|
|
||||||
#endif
|
|
||||||
if (SCROLL_MODE_CENTER == m_scroollingMode) {
|
if (SCROLL_MODE_CENTER == m_scroollingMode) {
|
||||||
// here we invert the reference of the standard OpenGl view because the reference in the common display is Top left and not buttom left
|
// here we invert the reference of the standard OpenGl view because the reference in the common display is Top left and not buttom left
|
||||||
glViewport( m_origin.x,
|
glViewport( m_origin.x,
|
||||||
m_origin.y,
|
m_origin.y,
|
||||||
m_size.x,
|
m_size.x,
|
||||||
m_size.y);
|
m_size.y);
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Matrix4 tmpProjection = etk::matrix::Perspective(-m_size.x/2, m_size.x/2, -m_size.y/2, m_size.y/2, -1, 1);
|
etk::Matrix4 tmpProjection = etk::matrix::Perspective(-m_size.x/2, m_size.x/2, -m_size.y/2, m_size.y/2, -1, 1);
|
||||||
etk::Matrix4 tmpScale = etk::matrix::Scale(m_zoom, m_zoom, 1.0);
|
etk::Matrix4 tmpScale = etk::matrix::Scale(m_zoom, m_zoom, 1.0);
|
||||||
etk::Matrix4 tmpTranslate = etk::matrix::Translate(-m_maxSize.x/2, -m_maxSize.y/2, -1.0);
|
etk::Matrix4 tmpTranslate = etk::matrix::Translate(-m_maxSize.x/2, -m_maxSize.y/2, -1.0);
|
||||||
etk::Matrix4 tmpMat = tmpProjection * tmpScale * tmpTranslate;
|
etk::Matrix4 tmpMat = tmpProjection * tmpScale * tmpTranslate;
|
||||||
// set internal matrix system :
|
// set internal matrix system :
|
||||||
ewol::openGL::SetMatrix(tmpMat);
|
ewol::openGL::SetMatrix(tmpMat);
|
||||||
#else
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrthoEwol(-m_size.x/2, m_size.x/2, -m_size.y/2, m_size.y/2, -1, 1);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
glScalef(m_zoom, m_zoom, 1.0);
|
|
||||||
glTranslatef(-m_maxSize.x/2, -m_maxSize.y/2, -1.0);
|
|
||||||
#endif
|
|
||||||
// Call the widget drawing methode
|
// Call the widget drawing methode
|
||||||
OnDraw(displayProp);
|
OnDraw(displayProp);
|
||||||
} if (SCROLL_MODE_GAME == m_scroollingMode) {
|
} if (SCROLL_MODE_GAME == m_scroollingMode) {
|
||||||
@ -400,31 +386,17 @@ void ewol::WidgetScrooled::GenDraw(DrawProperty displayProp)
|
|||||||
m_size.x,
|
m_size.x,
|
||||||
m_size.y);
|
m_size.y);
|
||||||
|
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
etk::Matrix4 tmpProjection = etk::matrix::Perspective(-m_size.x/2, m_size.x/2, -m_size.y/2, m_size.y/2, -1, 1);
|
etk::Matrix4 tmpProjection = etk::matrix::Perspective(-m_size.x/2, m_size.x/2, -m_size.y/2, m_size.y/2, -1, 1);
|
||||||
etk::Matrix4 tmpTranslate = etk::matrix::Translate(-m_maxSize.x/2, -m_maxSize.y/2, -1.0);
|
etk::Matrix4 tmpTranslate = etk::matrix::Translate(-m_maxSize.x/2, -m_maxSize.y/2, -1.0);
|
||||||
etk::Matrix4 tmpMat = tmpProjection * tmpTranslate;
|
etk::Matrix4 tmpMat = tmpProjection * tmpTranslate;
|
||||||
// set internal matrix system :
|
// set internal matrix system :
|
||||||
ewol::openGL::SetMatrix(tmpMat);
|
ewol::openGL::SetMatrix(tmpMat);
|
||||||
#else
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrthoEwol(-m_size.x/2, m_size.x/2, -m_size.y/2, m_size.y/2, -1, 1);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
//glScalef(m_zoom, m_zoom, 1.0);
|
|
||||||
glTranslatef(-m_maxSize.x/2, -m_maxSize.y/2, -1.0);
|
|
||||||
#endif
|
|
||||||
// Call the widget drawing methode
|
// Call the widget drawing methode
|
||||||
OnDraw(displayProp);
|
OnDraw(displayProp);
|
||||||
} else {
|
} else {
|
||||||
ewol::Widget::GenDraw(displayProp);
|
ewol::Widget::GenDraw(displayProp);
|
||||||
}
|
}
|
||||||
#ifdef __VIDEO__OPENGL_ES_2
|
|
||||||
ewol::openGL::Pop();
|
ewol::openGL::Pop();
|
||||||
#else
|
|
||||||
glPopMatrix();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
1
Sources/libewol/tag
Normal file
1
Sources/libewol/tag
Normal file
@ -0,0 +1 @@
|
|||||||
|
0.4.2
|
@ -6,15 +6,8 @@ LOCAL_MODULE := glew
|
|||||||
|
|
||||||
#http://glew.sourceforge.net/index.html
|
#http://glew.sourceforge.net/index.html
|
||||||
|
|
||||||
#ifneq ("$(CONFIG__VIDEO__OPENGL_ES_2)","")
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/glew/include/
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/glew/include/
|
LOCAL_EXPORT_LDLIBS := $(LOCAL_PATH)/glew/lib/glew32s.lib -lopengl32 -lgdi32
|
||||||
LOCAL_EXPORT_LDLIBS := $(LOCAL_PATH)/glew/lib/glew32s.lib -lopengl32 -lgdi32
|
|
||||||
# to enable open gl 2 mode
|
|
||||||
LOCAL_CFLAGS += -D__VIDEO__OPENGL_ES_2
|
|
||||||
LOCAL_EXPORT_CFLAGS := -D__VIDEO__OPENGL_ES_2
|
|
||||||
#else
|
|
||||||
# LOCAL_EXPORT_LDLIBS := -lopengl32 -lgdi32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit edfe4d2aa6e50b496ff3c10203984e5b090c516d
|
Subproject commit fcd7a0542ea39a8164ca97b832965adc6fda08ee
|
Loading…
x
Reference in New Issue
Block a user