sokol: remove an absolute import
parent
d991712b3c
commit
45cc3ec664
|
@ -2864,6 +2864,7 @@ _SAPP_OBJC_RELEASE( menu_bar );
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
|
// Create a child view for native rendering
|
||||||
|
|
||||||
CGRect wRect = _sapp.macos.window.frame;
|
CGRect wRect = _sapp.macos.window.frame;
|
||||||
NSView *contentView =_sapp.macos.window.contentView;
|
NSView *contentView =_sapp.macos.window.contentView;
|
||||||
|
@ -2876,15 +2877,11 @@ NSWindow *overlayWindow = [[NSWindow alloc]initWithContentRect:rect
|
||||||
defer:NO];
|
defer:NO];
|
||||||
//overlayWindow.backgroundColor = [NSColor whiteColor];
|
//overlayWindow.backgroundColor = [NSColor whiteColor];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//overlayWindow.backgroundColor = [[NSColor whiteColor] colorWithAlphaComponent:0];
|
//overlayWindow.backgroundColor = [[NSColor whiteColor] colorWithAlphaComponent:0];
|
||||||
[overlayWindow setOpaque:YES];
|
[overlayWindow setOpaque:YES];
|
||||||
[_sapp.macos.window setIgnoresMouseEvents:NO];
|
[_sapp.macos.window setIgnoresMouseEvents:NO];
|
||||||
//[_sapp.macos.window setOpaque:NO];
|
//[_sapp.macos.window setOpaque:NO];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//overlayWindow.alphaValue =0.1f;///.1f;
|
//overlayWindow.alphaValue =0.1f;///.1f;
|
||||||
|
|
||||||
g_view = [[MyView2 alloc] init];
|
g_view = [[MyView2 alloc] init];
|
||||||
|
@ -2913,7 +2910,8 @@ g_view = [[MyView2 alloc] init];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#include "/Users/alex/code/v/thirdparty/sokol/sokol_app2.h"
|
//#include "/Users/alex/code/v/thirdparty/sokol/sokol_app2.h"
|
||||||
|
#include "sokol_app2.h"
|
||||||
|
|
||||||
@implementation _sapp_macos_window_delegate
|
@implementation _sapp_macos_window_delegate
|
||||||
- (BOOL)windowShouldClose:(id)sender {
|
- (BOOL)windowShouldClose:(id)sender {
|
||||||
|
|
|
@ -7,30 +7,23 @@ pub const (
|
||||||
#flag -I @VROOT/thirdparty/sokol
|
#flag -I @VROOT/thirdparty/sokol
|
||||||
#flag -I @VROOT/thirdparty/sokol/util
|
#flag -I @VROOT/thirdparty/sokol/util
|
||||||
#flag freebsd -I /usr/local/include
|
#flag freebsd -I /usr/local/include
|
||||||
|
|
||||||
#flag darwin -fobjc-arc
|
#flag darwin -fobjc-arc
|
||||||
#flag linux -lX11 -lGL -lXcursor -lXi
|
#flag linux -lX11 -lGL -lXcursor -lXi
|
||||||
#flag freebsd -L/usr/local/lib -lX11 -lGL -lXcursor -lXi
|
#flag freebsd -L/usr/local/lib -lX11 -lGL -lXcursor -lXi
|
||||||
|
|
||||||
#flag windows -lgdi32
|
#flag windows -lgdi32
|
||||||
|
|
||||||
// METAL
|
// METAL
|
||||||
#flag darwin -DSOKOL_METAL
|
#flag darwin -DSOKOL_METAL
|
||||||
#flag darwin -framework Metal -framework Cocoa -framework MetalKit -framework QuartzCore
|
#flag darwin -framework Metal -framework Cocoa -framework MetalKit -framework QuartzCore
|
||||||
|
|
||||||
// OPENGL
|
// OPENGL
|
||||||
#flag linux -DSOKOL_GLCORE33
|
#flag linux -DSOKOL_GLCORE33
|
||||||
#flag freebsd -DSOKOL_GLCORE33
|
#flag freebsd -DSOKOL_GLCORE33
|
||||||
//#flag darwin -framework OpenGL -framework Cocoa -framework QuartzCore
|
//#flag darwin -framework OpenGL -framework Cocoa -framework QuartzCore
|
||||||
|
|
||||||
// D3D
|
// D3D
|
||||||
#flag windows -DSOKOL_GLCORE33
|
#flag windows -DSOKOL_GLCORE33
|
||||||
//#flag windows -DSOKOL_D3D11
|
//#flag windows -DSOKOL_D3D11
|
||||||
|
|
||||||
// for simplicity, all header includes are here because import order matters and we dont have any way
|
// for simplicity, all header includes are here because import order matters and we dont have any way
|
||||||
// to ensure import order with V yet
|
// to ensure import order with V yet
|
||||||
#define SOKOL_IMPL
|
#define SOKOL_IMPL
|
||||||
|
|
||||||
// TODO should not be defined for android graphic (apk/aab using sokol) builds, but we have no ways to undefine
|
// TODO should not be defined for android graphic (apk/aab using sokol) builds, but we have no ways to undefine
|
||||||
//#define SOKOL_NO_ENTRY
|
//#define SOKOL_NO_ENTRY
|
||||||
#flag linux -DSOKOL_NO_ENTRY
|
#flag linux -DSOKOL_NO_ENTRY
|
||||||
|
@ -40,14 +33,10 @@ pub const (
|
||||||
#flag freebsd -DSOKOL_NO_ENTRY
|
#flag freebsd -DSOKOL_NO_ENTRY
|
||||||
#flag solaris -DSOKOL_NO_ENTRY
|
#flag solaris -DSOKOL_NO_ENTRY
|
||||||
// TODO end
|
// TODO end
|
||||||
|
|
||||||
#include "sokol_v.h"
|
#include "sokol_v.h"
|
||||||
|
|
||||||
#include "sokol_app.h"
|
#include "sokol_app.h"
|
||||||
|
|
||||||
#define SOKOL_IMPL
|
#define SOKOL_IMPL
|
||||||
#define SOKOL_NO_DEPRECATED
|
#define SOKOL_NO_DEPRECATED
|
||||||
#include "sokol_gfx.h"
|
#include "sokol_gfx.h"
|
||||||
|
|
||||||
#define SOKOL_GL_IMPL
|
#define SOKOL_GL_IMPL
|
||||||
#include "util/sokol_gl.h"
|
#include "util/sokol_gl.h"
|
||||||
|
|
|
@ -1964,7 +1964,7 @@ fn (mut p Parser) const_decl() ast.ConstDecl {
|
||||||
}
|
}
|
||||||
pos := p.tok.position()
|
pos := p.tok.position()
|
||||||
name := p.check_name()
|
name := p.check_name()
|
||||||
if false && util.contains_capital(name) {
|
if util.contains_capital(name) {
|
||||||
p.warn_with_pos('$p.file_name_dir const names cannot contain uppercase letters, use snake_case instead',
|
p.warn_with_pos('$p.file_name_dir const names cannot contain uppercase letters, use snake_case instead',
|
||||||
pos)
|
pos)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue