[DEV] try a basic windows on cocoa
This commit is contained in:
parent
ca352c94d9
commit
c4d156d462
2
build
2
build
@ -1 +1 @@
|
||||
Subproject commit 7674fedbe9379979ed6ac2de0f035690b3071fe8
|
||||
Subproject commit 0a3b7ca530db3ff61b399b55f7e94bdf3928dcd6
|
@ -29,12 +29,7 @@ endif
|
||||
LOCAL_C_INCLUDES :=
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||
LOCAL_EXPORT_LDLIBS := -framework OpenGL
|
||||
|
||||
|
||||
#http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Introduction
|
||||
# needed package on linux : libgl1-mesa-dev libglew1.5-dev
|
||||
|
||||
LOCAL_EXPORT_LDLIBS := -I /usr/include/GNUstep/ -fconstant-string-class=NSConstantString -framework Cocoa -framework QuartzCore -framework OpenGL -framework AppKit
|
||||
|
||||
LOCAL_CFLAGS := -Wno-write-strings \
|
||||
-DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG)-$(BUILD_DIRECTORY_MODE)\"" \
|
||||
|
@ -129,25 +129,25 @@ typedef struct {
|
||||
|
||||
static correspondenceTable_ts basicFlag[] = {
|
||||
{(uint32_t)ewol::openGL::FLAG_BLEND, GL_BLEND},
|
||||
#ifndef __TARGET_OS__Android
|
||||
#if !(defined(__TARGET_OS__Android) || defined(__TARGET_OS__MacOs))
|
||||
{(uint32_t)ewol::openGL::FLAG_CLIP_DISTANCE_I, GL_CLIP_DISTANCE0},
|
||||
{(uint32_t)ewol::openGL::FLAG_COLOR_LOGIC_OP, GL_COLOR_LOGIC_OP},
|
||||
#endif
|
||||
{(uint32_t)ewol::openGL::FLAG_CULL_FACE, GL_CULL_FACE},
|
||||
#ifndef __TARGET_OS__Android
|
||||
#if !(defined(__TARGET_OS__Android) || defined(__TARGET_OS__MacOs))
|
||||
{(uint32_t)ewol::openGL::FLAG_DEBUG_OUTPUT, GL_DEBUG_OUTPUT},
|
||||
{(uint32_t)ewol::openGL::FLAG_DEBUG_OUTPUT_SYNCHRONOUS, GL_DEBUG_OUTPUT_SYNCHRONOUS},
|
||||
{(uint32_t)ewol::openGL::FLAG_DEPTH_CLAMP, GL_DEPTH_CLAMP},
|
||||
#endif
|
||||
{(uint32_t)ewol::openGL::FLAG_DEPTH_TEST, GL_DEPTH_TEST},
|
||||
{(uint32_t)ewol::openGL::FLAG_DITHER, GL_DITHER},
|
||||
#ifndef __TARGET_OS__Android
|
||||
#if !(defined(__TARGET_OS__Android) || defined(__TARGET_OS__MacOs))
|
||||
{(uint32_t)ewol::openGL::FLAG_FRAMEBUFFER_SRGB, GL_FRAMEBUFFER_SRGB},
|
||||
{(uint32_t)ewol::openGL::FLAG_LINE_SMOOTH, GL_LINE_SMOOTH},
|
||||
{(uint32_t)ewol::openGL::FLAG_MULTISAMPLE, GL_MULTISAMPLE},
|
||||
#endif
|
||||
{(uint32_t)ewol::openGL::FLAG_POLYGON_OFFSET_FILL, GL_POLYGON_OFFSET_FILL},
|
||||
#ifndef __TARGET_OS__Android
|
||||
#if !(defined(__TARGET_OS__Android) || defined(__TARGET_OS__MacOs))
|
||||
{(uint32_t)ewol::openGL::FLAG_POLYGON_OFFSET_LINE, GL_POLYGON_OFFSET_LINE},
|
||||
{(uint32_t)ewol::openGL::FLAG_POLYGON_OFFSET_POINT, GL_POLYGON_OFFSET_POINT},
|
||||
{(uint32_t)ewol::openGL::FLAG_POLYGON_SMOOTH, GL_POLYGON_SMOOTH},
|
||||
@ -155,21 +155,21 @@ static correspondenceTable_ts basicFlag[] = {
|
||||
{(uint32_t)ewol::openGL::FLAG_PRIMITIVE_RESTART_FIXED_INDEX, GL_PRIMITIVE_RESTART_FIXED_INDEX},
|
||||
#endif
|
||||
{(uint32_t)ewol::openGL::FLAG_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_ALPHA_TO_COVERAGE},
|
||||
#ifndef __TARGET_OS__Android
|
||||
#if !(defined(__TARGET_OS__Android) || defined(__TARGET_OS__MacOs))
|
||||
{(uint32_t)ewol::openGL::FLAG_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_ALPHA_TO_ONE},
|
||||
#endif
|
||||
{(uint32_t)ewol::openGL::FLAG_SAMPLE_COVERAGE, GL_SAMPLE_COVERAGE},
|
||||
#ifndef __TARGET_OS__Android
|
||||
#if !(defined(__TARGET_OS__Android) || defined(__TARGET_OS__MacOs))
|
||||
{(uint32_t)ewol::openGL::FLAG_SAMPLE_SHADING, GL_SAMPLE_SHADING},
|
||||
{(uint32_t)ewol::openGL::FLAG_SAMPLE_MASK, GL_SAMPLE_MASK},
|
||||
#endif
|
||||
{(uint32_t)ewol::openGL::FLAG_SCISSOR_TEST, GL_SCISSOR_TEST},
|
||||
{(uint32_t)ewol::openGL::FLAG_STENCIL_TEST, GL_STENCIL_TEST},
|
||||
#ifndef __TARGET_OS__Android
|
||||
#if !(defined(__TARGET_OS__Android) || defined(__TARGET_OS__MacOs))
|
||||
{(uint32_t)ewol::openGL::FLAG_PROGRAM_POINT_SIZE, GL_PROGRAM_POINT_SIZE},
|
||||
#endif
|
||||
{(uint32_t)ewol::openGL::FLAG_TEXTURE_2D, GL_TEXTURE_2D},
|
||||
#ifndef __TARGET_OS__Android
|
||||
#if !(defined(__TARGET_OS__Android) || defined(__TARGET_OS__MacOs))
|
||||
{(uint32_t)ewol::openGL::FLAG_ALPHA_TEST, GL_ALPHA_TEST},
|
||||
{(uint32_t)ewol::openGL::FLAG_FOG, GL_FOG}
|
||||
#endif
|
||||
|
@ -1,10 +1,8 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface MacOsAppDelegate : NSObject <UIApplicationDelegate> {
|
||||
@interface MacOsAppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIWindow *window;
|
||||
@property (assign) IBOutlet NSWindow *window;
|
||||
|
||||
@end
|
||||
|
@ -3,6 +3,20 @@
|
||||
#import <ewol/renderer/os/gui.MacOs.AppDelegate.h>
|
||||
#import <ewol/renderer/os/gui.MacOs.OpenglView.h>
|
||||
|
||||
|
||||
@implementation MacOsAppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
{
|
||||
// Insert code here to initialize your application
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
@implementation MacOsAppDelegate
|
||||
|
||||
|
||||
@ -63,3 +77,4 @@
|
||||
}
|
||||
|
||||
@end
|
||||
#endif
|
||||
|
@ -2,8 +2,7 @@
|
||||
#ifndef __MM_INTERFACE_H__
|
||||
#define __MM_INTERFACE_H__
|
||||
|
||||
|
||||
int mm_main(int argc, char *argv[]);
|
||||
int mm_main(int argc, const char *argv[]);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -2,13 +2,11 @@
|
||||
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <ewol/renderer/os/gui.MacOs.AppDelegate.h>
|
||||
|
||||
int mm_main(int argc, char *argv[])
|
||||
int mm_main(int argc, const char *argv[])
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
int retVal = UIApplicationMain(argc, argv, nil, nil);
|
||||
[pool release];
|
||||
return retVal;
|
||||
return NSApplicationMain(argc, (const char **)argv);
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#if 0
|
||||
#import <OpenGLES/ES2/gl.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@interface OpenglView : UIView {
|
||||
|
||||
EAGLContext *mimContext;
|
||||
@ -14,3 +14,4 @@
|
||||
}
|
||||
- (void)drawView;
|
||||
@end
|
||||
#endif
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#import <ewol/renderer/os/gui.MacOs.OpenglView.h>
|
||||
|
||||
#if 0
|
||||
|
||||
@implementation OpenglView
|
||||
|
||||
@ -65,3 +66,5 @@
|
||||
}
|
||||
|
||||
@end
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user