nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modelize_property: use resolve_mtype_unchecked during build_signature
[nit.git]
/
lib
/
mnit_linux
/
linux_opengles1.nit
diff --git
a/lib/mnit_linux/linux_opengles1.nit
b/lib/mnit_linux/linux_opengles1.nit
index
89a64e1
..
106bc07
100644
(file)
--- a/
lib/mnit_linux/linux_opengles1.nit
+++ b/
lib/mnit_linux/linux_opengles1.nit
@@
-14,22
+14,12
@@
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-module linux_opengles1
+module linux_opengles1 is pkgconfig("x11")
-import mnit # for
-# import opengles1
+import mnit::opengles1
import sdl
import sdl
-in "C Header" `{
- #define LOGW(...) ((void)fprintf(stderr, "# warn: %s", __VA_ARGS__))
- #ifdef DEBUG
- #define LOGI(...) ((void)fprintf(stderr, "# info: %s", __VA_ARGS__))
- #else
- #define LOGI(...) (void)0
- #endif
-`}
-
in "C" `{
NativeWindowType mnit_window;
EGLNativeDisplayType mnit_native_display;
in "C" `{
NativeWindowType mnit_window;
EGLNativeDisplayType mnit_native_display;
@@
-86,7
+76,7
@@
redef class Opengles1Display
end
end
end
end
-redef extern Opengles1Image
+redef extern class Opengles1Image
new from_sdl_image( sdl_image: SDLImage ) is extern `{
return mnit_opengles_load_image( sdl_image->pixels, sdl_image->w, sdl_image->h, sdl_image->format->Amask );
`}
new from_sdl_image( sdl_image: SDLImage ) is extern `{
return mnit_opengles_load_image( sdl_image->pixels, sdl_image->w, sdl_image->h, sdl_image->format->Amask );
`}
@@
-98,7
+88,7
@@
redef extern Opengles1Image
sdl_image = IMG_Load( String_to_cstring( path ) );
if ( !sdl_image ) {
sdl_image = IMG_Load( String_to_cstring( path ) );
if ( !sdl_image ) {
- LOGW( "SDL failed to load image <%s>: %s\n", String_to_cstring( path ), IMG_GetError() );
+ fprintf(stderr, "SDL failed to load image <%s>: %s\n", String_to_cstring(path), IMG_GetError());
return NULL;
} else {
opengles_image = mnit_opengles_load_image( sdl_image->pixels, sdl_image->w, sdl_image->h, sdl_image->format->Amask );
return NULL;
} else {
opengles_image = mnit_opengles_load_image( sdl_image->pixels, sdl_image->w, sdl_image->h, sdl_image->format->Amask );