[DEV/DOC] update sample and doc
This commit is contained in:
parent
9500d70711
commit
cd09d7ff98
54
doc/mainpage.md
Normal file
54
doc/mainpage.md
Normal file
@ -0,0 +1,54 @@
|
||||
GALE library {#mainpage}
|
||||
===============
|
||||
|
||||
@tableofcontents
|
||||
|
||||
What is GALE? {#gale_mainpage_what}
|
||||
=============
|
||||
|
||||
GALE, or "Graphic Abstraction Layer for Ewol" is a simple Interface with the OS Gui interface (openGL) and basic interface.
|
||||
For example, on android we use java interface and on linux we use X11 or Wayland.
|
||||
Gale abstract all of this and provide an inetrface in C++ on all of these platform.
|
||||
Gale abstact the Keybord, mouse and touche event on all of these platform (when availlable)
|
||||
|
||||
For audio interface You can see [audio-orchastra](https://musicdsp.github.io/audio-orchestra) That is the dual of gale but for audio.
|
||||
|
||||
Where can I use it? {#gale_mainpage_where}
|
||||
-------------------
|
||||
|
||||
Everywhere! GALE is cross-platform devolopped to support bases OS:
|
||||
- Linux (X11) (mouse)
|
||||
- Windows (mouse) (build on linux...)
|
||||
- MacOs (mouse)
|
||||
- Android (mouse + touch)
|
||||
- IOs (touch)
|
||||
|
||||
What languages are supported? {#gale_mainpage_language}
|
||||
=============================
|
||||
|
||||
GALE is written in C++.
|
||||
|
||||
|
||||
Are there any licensing restrictions? {#gale_mainpage_restriction}
|
||||
=====================================
|
||||
|
||||
GALE is **FREE software** and _all sub-library are FREE and staticly linkable !!!_
|
||||
|
||||
|
||||
License (APACHE-2.0) {#gale_mainpage_license}
|
||||
====================
|
||||
|
||||
Copyright gale Edouard DUPIN
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
<http://www.apache.org/licenses/LICENSE-2.0>
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
42
doc/tutorial.md
Normal file
42
doc/tutorial.md
Normal file
@ -0,0 +1,42 @@
|
||||
Tutorial {#gale_tutorial}
|
||||
========
|
||||
|
||||
@tableofcontents
|
||||
|
||||
Base: {#gale_declare}
|
||||
=====
|
||||
|
||||
To understand some choise, I designe this software to acces on all system (that provide openGL interface).
|
||||
But on some embended interface, we have only openGL-es ==> then I limit all the design on OpenGL-ES (need to think to change this maybe)
|
||||
|
||||
All is based on the heritage of the single class: gale::Application.
|
||||
|
||||
For your fist application you just need to declare an application and create the smallest main that ever exit:
|
||||
|
||||
Application declatration: {#gale_base_main}
|
||||
-------------------------
|
||||
|
||||
We declare the application:
|
||||
```{.c}
|
||||
class MainApplication : public gale::Application {
|
||||
// nothing to do ...
|
||||
}
|
||||
```
|
||||
|
||||
We create application on the main()
|
||||
@snippet basic.cpp gale_declare_main
|
||||
|
||||
At this point I need to explain one point on Android:
|
||||
|
||||
Android have an internal state engine that can create multiple aplication, then I can call a second time the main() if needed...
|
||||
|
||||
Then never forget to not use global value and singleton. We provide other mechanism to do it. (for exemple, you can acces at you Application everywhere you are.
|
||||
|
||||
|
||||
|
||||
|
||||
Compleate Sample: {#gale_compleate_sample}
|
||||
=================
|
||||
|
||||
@snippet basic.cpp gale_sample_all
|
||||
|
18
doxy_gale.py
18
doxy_gale.py
@ -10,10 +10,26 @@ def create(target, module_name):
|
||||
my_module.set_title("Gale: Graphic Abstraction Layer for Ewol")
|
||||
my_module.set_website("http://atria-soft.github.io/" + module_name)
|
||||
my_module.set_website_sources("http://github.com/atria-soft/" + module_name)
|
||||
my_module.set_path(os.path.join(tools.get_current_path(__file__), module_name))
|
||||
my_module.add_path([
|
||||
module_name,
|
||||
"doc"
|
||||
])
|
||||
my_module.add_sample_path([
|
||||
"sample"
|
||||
])
|
||||
my_module.add_module_depend([
|
||||
'elog',
|
||||
'etk'
|
||||
])
|
||||
my_module.add_exclude_symbols([
|
||||
'*operator<<*',
|
||||
])
|
||||
my_module.add_exclude_file([
|
||||
'debug.h',
|
||||
])
|
||||
my_module.add_file_patterns([
|
||||
'*.h',
|
||||
'*.md',
|
||||
])
|
||||
|
||||
return my_module
|
@ -27,11 +27,11 @@ def get_maintainer():
|
||||
def create(target, module_name):
|
||||
my_module = module.Module(__file__, module_name, get_type())
|
||||
my_module.add_src_file([
|
||||
'basic.cpp'
|
||||
'sample/basic.cpp'
|
||||
])
|
||||
my_module.add_module_depend(['gale'])
|
||||
my_module.copy_file('basic.frag')
|
||||
my_module.copy_file('basic.vert')
|
||||
my_module.copy_file('sample/basic.frag')
|
||||
my_module.copy_file('sample/basic.vert')
|
||||
return my_module
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
//! [gale_sample_all]
|
||||
|
||||
|
||||
#include <etk/types.h>
|
||||
@ -82,6 +83,8 @@ class MainApplication : public gale::Application {
|
||||
gale::openGL::pop();
|
||||
}
|
||||
};
|
||||
|
||||
//! [gale_declare_main]
|
||||
/**
|
||||
* @brief Main of the program (This can be set in every case, but it is not used in Andoid...).
|
||||
* @param std IO
|
||||
@ -90,5 +93,8 @@ class MainApplication : public gale::Application {
|
||||
int main(int _argc, const char *_argv[]) {
|
||||
return gale::run(new MainApplication(), _argc, _argv);
|
||||
}
|
||||
//! [gale_declare_main]
|
||||
|
||||
|
||||
|
||||
//! [gale_sample_all]
|
||||
|
Loading…
x
Reference in New Issue
Block a user