Git Product home page Git Product logo

kinc's Introduction

Kinc

Kinc (short for Kore in C) is a low level toolkit for cross-platform game engine development and similar endeavors. It is comparable to SDL but bigger in scope as it also takes care of cross-platform GPU programming with multiple portable APIs to choose from and its own shader language Kongruent.

Kinc projects are built using kmake, a meta-build-tool that resides in a git-submodule of Kinc. In your project's directory call path/to/Kinc/make, this will create a project file for your IDE in a subdirectory called build. kmake by default creates a project for the system you are currently using, but you can also put one of windows, linux, android, windowsapp, osx, ios and freebsd in the arguments list to create something else. Depending on the capabilities of the target system you can also choose your graphics api (-g direct3d9/direct3d11/direct3d12/opengl/vulkan/metal). Console support is implemented via separate plugins because the code can not be provided publicly - contact Robert for details if you are interested in it.

kinc's People

Contributors

5mixer avatar andreirudenko avatar aoe-maniac avatar apprentice-alchemist avatar catcuddler avatar codescapade avatar disar avatar doczi-dominik avatar jefvel avatar juakob avatar koenigvonamburu avatar luboslenco avatar lukasbanana avatar marianthull avatar mundusnine avatar patternspandemic avatar poke1024 avatar rafaeloliveira avatar ratalaika avatar rblsb avatar robdangerous avatar samhocevar avatar sanva avatar sh-dave avatar shaydenz avatar spookyfm avatar sundaw avatar tcdude avatar vivichrist avatar zshoals avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kinc's Issues

Windows Direct3D 9 context loss

On my machine when I run project, lock machine and unlock it back, game keeps updating, but rendering do not work. This is for Direct3D 9 and simple kha project on Windows 10. Also tested with Direct3D 11 and OpenGL and there was no such problem.

OpenGL errors in VertexBufferImpl::setVertexAttributes

Using OpenGL@Windows:
glDisableVertexAttribArray(offset + index); (line 167) in VertexBufferImpl::setVertexAttributes results in opengl errors. After removing the line everything works fine, but I'm not sure if this is the right "fix". ;-)

Direct3D 12 Crash

Direct3D 9 works without any issues, but d3d12 crashes with that crazy exception

ex3crash

Sound stuttering on Android

When starting an application on android there's a chance for all sounds to seemingly play at half speed, sounding very stuttery. It usually stops after the application has been restarted.

Test it with this repository: https://github.com/jefvel/kha-tests/tree/audio-test

Build, run, and touch the screen for sounds. It should make a single click noise. Close it completely and start up again. From time to time it will sound like two clicks, or straight up crash on startup.

[macos] Video playback doesn't loop / eventually crashes

Videos played back with video.play(true) on macos result in this error repeatedly:

AVD error: Perf capability check failed: 0xe00002be

Which eventually compounds and crashes out the execution. It happens at the very moment the video reaches the end and doesn't loop properly.

Error in android-native

C:\Dev\Projetos\Kha\Invasion\build\android-native-build\Invasion\app\src\main\jni\SDKs\Kha\Kore\Backends\OpenGL2\Sources\Kore\RenderTargetImpl.cpp

Error:(78, 31) error: 'GL_DEPTH24_STENCIL8' was not declared in this scope
Error:(89, 31) error: 'GL_DEPTH32F_STENCIL8' was not declared in this scope
Error:(102, 45) error: 'GL_DEPTH_STENCIL_ATTACHMENT' was not declared in this scope

Android native build failed (Graphics::*)

Getting error while compiling android native app in android studio
/app/src/main/jni/Kha/Kore/Sources/Kore/Application.cpp
Error:(28, 17) error: too few arguments to function 'void Kore::Graphics::init(int, int, int)'
Information:(3) (Unknown) In file included
Error:(32, 20) error: too few arguments to function 'void Kore::Graphics::destroy(int)'
Graphics::destroy();

Error in Android-native with gradle

In android-studio:

Gradle '<project name>' project refresh failed
Error:Cause: org.gradle.api.internal.ExtensibleDynamicObject

< project name > being the name of the project.

Build error on clean android project

I get these errors when building an empty Kha project for Android native:

D:\projects\kha-tests\Kha\Kore\Backends\OpenGL2\Sources\Kore\OpenGL.cpp
Error:(871, 2) error: use of undeclared identifier 'glGenQueries'
Error:(876, 2) error: use of undeclared identifier 'glDeleteQueries'; did you mean 'glDeleteBuffers'?
Error:(880, 15) error: use of undeclared identifier 'GL_SAMPLES_PASSED'
Error:(883, 13) error: use of undeclared identifier 'GL_SAMPLES_PASSED'
Error:(888, 38) error: use of undeclared identifier 'GL_QUERY_RESULT_AVAILABLE'
Error:(893, 38) error: use of undeclared identifier 'GL_QUERY_RESULT'

It works to build if I comment the lines out.

[android-native] error 1281 after glDisableVertextAttribArray()

I guess this is the same as #31

https://github.com/Kode/Kore/blob/8f9a3ae7e54d1dd936a1c351cbf5efab10d39458/Backends/Graphics4/OpenGL/Sources/Kore/VertexBufferImpl.cpp#L205-L208

I could fix it by using the following code, but i'm not sure where to best place the glGet call, so it's not called everytime setVertexAttributes runs as i guess once at startup somewhere would be enough?

int maxVertexAttribArrays = 0;
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribArrays);

for (int index = actualIndex; index < maxVertexAttribArrays; ++index)
...

[Android] Screen size question

When you open an app in android it shows the bottom bar

With the current implementation if you call System.windowWidth() or System.windowHeight() at the start of the app and the bar is still showing, it will substract to the resolution the bottom bar area.

I made another implementation that just returns the full screen resolution of the phone, but dont know if its more a hack than a solution.
#157
#158

OpenGL error code 1286 - Invalid Framebuffer

Tested using BlocksFromHeaven and OSX, OpenGL started to spit out error code 1286. Everything still appears to work fine, but it's problematic when debugging OpenGL code. Will have a look in coming days but if anyone is aware of this please report.

Graphics4 API awkwardness

In developing a "flexible 2D renderer" - a rendering layer for 2D games that can cope with arbitrary geometry (sprites, text, polygons), shaders with various vertex structures, doing at least some draw call batching, and taking as much boilerplate work off the caller as possible - i've run in to some things in the Graphics4 API that make it difficult.

Observations only based on limited development of the renderer.
I may just need to rethink my approach and assumptions!

  • Objects such as PipelineState, TextureUnit, Texture, ConstantLocation are hard to compare, and therefore make it hard to maintain a renderer state cache to only flush batches / update state when changes actually occur. Adding an "id" field or operator== to these, or making them structs rather than classes might help.

eg: if the user instructs the renderer to set a texture, how does the renderer know if this is actually changing anything? TextureUnit and Texture instances can't be compared easily. I think.

These are the ones I've run in to so far. There may be other state objects to consider.

  • A separate VertexBuffer is required for each different vertex structure in use. I suspect this might be unavoidable though. It's hard to compare VertexStructure objects, so it's hard for the renderer to know which buffer to use for the current state. Can VertexBuffers be reset to use a different structure?

Accessing unused texture unit

If a texture unit tex is defined but not accessed in the shader, Graphics::setTextureAddressing(tex, U, Repeat); fails.

Crash if pointed to a wrong directory

On macOS, if you start krom on an invalid directory (i.e. not something with a proper krom.js from a previous build), it will crash 100% of the time:

Process:               Krom [79402]
Path:                  /Users/USER/Downloads/*/Krom.app/Contents/MacOS/Krom
Identifier:            com.ktxsoftware.Krom
Version:               1.0 (1)
Code Type:             X86-64 (Native)
Parent Process:        bash [79374]
Responsible:           Krom [79402]
User ID:               502

Date/Time:             2018-07-28 18:30:09.346 +0200
OS Version:            Mac OS X 10.13.6 (17G65)
Report Version:        12
Bridge OS Version:     3.0 (14Y664)
Anonymous UUID:        75C7B990-F9F4-1764-0843-B6519F7CAD0C

Sleep/Wake UUID:       A2760634-A85D-4C12-A9CB-18C2924BA10E

Time Awake Since Boot: 69000 seconds
Time Since Wake:       6600 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000068
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x68:
--> 
    __TEXT                 00000001086d2000-0000000108745000 [  460K] r-x/rwx SM=COW  /Users/USER/Downloads/*/Krom.app/Contents/MacOS/Krom

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_c.dylib             	0x00007fff736ebced flockfile + 18
1   libsystem_c.dylib             	0x00007fff736ee0b6 fseek + 55
2   com.ktxsoftware.Krom          	0x0000000108723bf4 0x1086d2000 + 334836
3   com.ktxsoftware.Krom          	0x00000001086d6489 0x1086d2000 + 17545
4   com.ktxsoftware.Krom          	0x00000001086f760f 0x1086d2000 + 153103
5   com.apple.Foundation          	0x00007fff4d92a5a0 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 1123
6   com.apple.Foundation          	0x00007fff4d92a0bf -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
7   com.ktxsoftware.Krom          	0x00000001086f75b0 0x1086d2000 + 153008
8   libdyld.dylib                 	0x00007fff73661015 start + 1

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff737b228a __workq_kernreturn + 10
1   libsystem_pthread.dylib       	0x00007fff73979009 _pthread_wqthread + 1035
2   libsystem_pthread.dylib       	0x00007fff73978be9 start_wqthread + 13

Thread 2:
0   libsystem_pthread.dylib       	0x00007fff73978bdc start_wqthread + 0
1   com.apple.CoreFoundation      	0x00007fff4bb6d2da 0x7fff4b79b000 + 4006618

Thread 3:
0   libsystem_pthread.dylib       	0x00007fff73978bdc start_wqthread + 0
1   ???                           	0x0000700001dc3b50 0 + 123145333521232

Thread 4:
0   libsystem_pthread.dylib       	0x00007fff73978bdc start_wqthread + 0
1   ???                           	0x007865646e496d65 0 + 33888479226719589

Thread 5:
0   libsystem_pthread.dylib       	0x00007fff73978bdc start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00007fffac1753c8  rbx: 0x0000000000000000  rcx: 0x00007fffac1753c8  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x00007fff736ece66  rbp: 0x00007ffee752d620  rsp: 0x00007ffee752d610
   r8: 0x00007fffac154048   r9: 0x0000000000000040  r10: 0x00007ffee752da90  r11: 0x00007fff736ee07f
  r12: 0x0000000000000002  r13: 0x00007f7ef943d430  r14: 0x0000000000000002  r15: 0x0000000000000000
  rip: 0x00007fff736ebced  rfl: 0x0000000000010202  cr2: 0x0000000000000068
  
Logical CPU:     3
Error Code:      0x00000004
Trap Number:     14

Gamepad partially working in Windows

Using a 360-Gamepad and kha->kore->windows:
Left analog stick is switched vertically compared to kha->html5.
Left and right trigger are not working.
Maybe more, aside from that I testet only the face buttons (which are working).

android-native compilation fails

Unresolved symbols in OpenGL.cpp: glGenQueries, glBeginQuery etc.
I think this is because by default target android api is android-15 and these function are defined in OpenGL ES 3.0, which is supported only in android-18+.

max command not supported

float t = max(1,0);

results in

Severity Code Description Project File Line Suppression State
Error 2 compilation errors. No code generated. Exercise5 C:\Users\tborowski\Desktop\tmp\Exercise5\build\CUSTOMBUILD 1
Error 0:39: 'max' : no matching overloaded function found Exercise5 C:\Users\tborowski\Desktop\tmp\Exercise5\build\CUSTOMBUILD 1
Error 0:39: '' : syntax error Exercise5 C:\Users\tborowski\Desktop\tmp\Exercise5\build\CUSTOMBUILD 1

Sample shader compilation failure with D3D9

I am attempting to build the Shader-Kore and Texture-Kore samples for (old) hardware that doesn't support DX11 or OpenGL 3.3.

The samples are updated to use Kore 5c9362c (latest at time of writing) but otherwise unmodified.

I get the compilation errors shown below when building for DX9.

image

Display not found on linux

Updated to latest Kha/Kore, I get a crash at startup with the message : "No display attached?"

Program received signal SIGSEGV, Segmentation fault.
At /home/memilian/dev/lib/Kha/Kore/Backends/System/Linux/Sources/Kore/System.cpp:186

Relative path for Kore not working

Folder structured like:

- cpp
   -libs
       -Kore
   -MyProject <---- contains korefile.js

call

node ../libs/Kore/make

error:

Error: ENOENT: no such file or directory, open 'E:\Programming\CPP\MyProject \Kore\korefile.js''

Random crashes when starting on Android

I get this in logcat about every tenth start (android-native, OS 4.4.3) with this, for example: https://gist.github.com/RblSb/72b009f819575212a503ee9c976ba7f4

F/libc ( 5985): Fatal signal 11 (SIGSEGV) at 0x00000007 (code=1), thread 5999 (txsoftware.kore)
E/ActivityManager( 739): App crashed! Process: com.ktxsoftware.kore
E/InputDispatcher( 739): channel '42d07a80 com.ktxsoftware.kore.KoreActivity (s)' ~ Channel is unrecoverably broken and will be disposed!```

texture locking on direct3d and RGBA/BGRA conversion

As I can see user can not detect actual color format, Image::Format only have RGBA32 value. So when making texture.lock() it is impossible to write data with right color format.
Conversion from RGBA to BGRA is hardcoded in texture constructor. May be we should also convert colors in Texture::unlock()?

PS Also it's possible to take care of pitch. Currently user can use texture->stride() but at least Kha in image.unlock() does not do this.

Amazon FireTV Remote Input

I'm adding support for the FireTv remote (gamepad support will probably come later, don't have acess to one yet) and have a question.

The remote (and some variants of the amazon gamepad) feature 'MENU', REWIND', 'PLAY / PAUSE', 'FAST FORWARD' buttons. As my usecase is to treat them like a gamepad, should i only forward them to kha.Input.GamePad.button or create new special keys in kha.input.Key as well (kha.input.Key.REWIND, ...) while i'm on it?

[featurerequest] some graphic options and fixes

currently i look myself to implement this feautures in kore (but i don't know if i can it):

  • change vsync option at runtime (*0)
  • fix vsync for some graphic targets
    • d3d9
    • d3d12
    • Metal?
    • Vulkan?
  • change antialiasingSamples option at runtime
  • fix antialiasingSamples for some graphic targets
    • Vulkan?
    • Metal?
    • d3d12
  • fix mouse lock/hide for some system target (*1)
    • linux
    • mac
    • more ...?
  • requestBorderless (*1) (fullscreen not supported for some targets)
  • exitBorderless (*1) (fullscreen not supported for some targets)
  • requestMostTop (*1)
  • exitMostTop (*1)
  • resize/set position for the window (*1) (changeResolution needed?)
  • replace changeResolution with resize/set postion?
  • remove fullscreen or we need it? (can be replaced via mix of resize/set pos + requtestBorderless + requestMostTop)

do we need more?

(*0) nearly finished for opengl and (*1) + android/ios, als no tests for ios
(*1) nearly finished for win/linux/mac, not tested for linux/mac and i can't make a test for mac.
And i have also no idea if the code can work for the mac.

"Hidden" error when reaching MAX_THREADS

(Backends/Windows/Sources/Kore/Thread.cpp)

Calling Kore::createAndRunThread while the thread limit is already reached leads to hard to debug errors. (Different breaking points for 32/64 bit Debug/Release at at first glance unrelated places.)

The issue is that the thread index is increased without regard to MAX_THREADS. A check and error message would be nice.
Furthermore it is not clear to us how one should free a thread. The index doesn't seem to be decreased anywhere.

[macos] Video::load needs optional audio

I'm running across this:

[General] *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array

And I believe it's coming from Video::load line 89:

AVAssetTrack* audioTrack = [[asset tracksWithMediaType:AVMediaTypeAudio] objectAtIndex:0];

My video does NOT have an audio asset, as many of mine don't.

Audio: Memory leaks and eventual crash

(Just a reminder ticket for now; probably has nothing to do with my current linux sound issue as i don't unload sounds yet)

Looking through the Kore/Sources/Kore/Audio/Sound.cpp i noticed the following:

This will leak the memory for left + right for mono sounds.

Sound::Sound(const char* filename) : myVolume(1), size(0), data(0), left(0), right(0) {
...
		left = new s16[size / 2];
		right = new s16[size / 2];
		if (format.channels == 1) {
			left = (s16*)data; // DK just allocated left and right are gone now
			right = (s16*)data // DK just allocated left and right are gone now
		}
		else {
			split((s16*)data, size, left, right);
		}
...
}

This will explode b/c it tries to delete data 3x for mono sounds.

Sound::~Sound() {
	delete[] data;
	delete[] left; // DK will explode for mono sound, as left just points to (already deleted) data
	delete[] right; // DK will explode for mono sound, as right just points to (already deleted) data
	data = nullptr;
	left = nullptr;
	right = nullptr;
}

ColorVertexData attributes on Direct3D11

ColorVertexData vertex attributes do not appear to work on Direct3D11.

The effect is as if the shader receives vec4(0,0,0,0) for the attribute value (not confirmed if this is what is actually happening).

Reproduction: modify the Texture-Kore sample to add a ColorVertexData "col" attribute to pass a colour value to tint the texture. On DX11 the resulting display is black. On OpenGL on the same machine the output texture is tinted red as expected.

Shader.cpp (extract):

int kore(int argc, char** argv) {
	...
	Graphics4::VertexStructure structure;
	structure.add("pos", Graphics4::Float3VertexData);
	structure.add("tex", Graphics4::Float2VertexData);
	structure.add("col", Graphics4::ColorVertexData);
	pipeline = new Graphics4::PipelineState;
	pipeline->inputLayout[0] = &structure;
	pipeline->inputLayout[1] = nullptr;
	pipeline->vertexShader = vertexShader;
	pipeline->fragmentShader = fragmentShader;
	pipeline->compile();

	texunit = pipeline->getTextureUnit("texsampler");
	offset = pipeline->getConstantLocation("mvp");
	
	uint32_t col = 0xff0000ff;
	float colf = *((float*)&col);

	vertices = new Graphics4::VertexBuffer(3, structure);
	float* v = vertices->lock();
	*v++ = -1.0f; *v++ = -1.0f; *v++ = 0.5f; *v++ = 0.0f; *v++ = 1.0f; *v++ = colf;
	*v++ =  1.0f; *v++ = -1.0f; *v++ = 0.5f; *v++ = 1.0f; *v++ = 1.0f; *v++ = colf;
	*v++ = -1.0f; *v++ =  1.0f; *v++ = 0.5f; *v++ = 0.0f; *v++ = 0.0f; *v++ = colf;
	vertices->unlock();
	
	...
}

texture.vert.glsl

#version 450

in vec3 pos;
in vec2 tex;
in vec4 col;

out vec2 texcoord;
out vec4 colo;

uniform mat3 mvp;

void main() {
	gl_Position = vec4(mvp * vec3(pos.x, pos.y, 0.5), 1.0);
	texcoord = tex;
	colo = col / 255.0;
}

texture.frag.glsl:

#version 450

in vec2 texcoord;
in vec4 colo;

out vec4 FragColor;

uniform sampler2D texsampler;

void main() {
	vec4 color = texture(texsampler, texcoord);
	FragColor = vec4(color.r, color.g, color.b, 1.0) * colo;
}

OpenGL output:
texturetestcol_ogl

DX11 output:
texturetestcol_dx11

Add start/count parameters to VertexBuffer->unlock()

In the current implementation, buffer size (via start and count) is specified at VertexBuffer->lock() time. In certain situations these values cannot be determined in advance and the whole buffer must be "locked". This results in VertexBuffer->unlock() submitting the whole buffer to the back end.

This issue is to investigate if it is possible, for a performance optimisation, to extend unlock() to accept size and count parameters and so perform partial submits of the buffer data.

Direct3D11 empty scene

this
node Kore/make -g direct3d11 -v vs2015
results in
d3d11vs15

OpenGL works as expected
node Kore/make -g opengl -v vs2015
image

iOS: duplicate symbols from Kore::Display

Backends/System/iOS/Sources/Kore/Display.cpp
Backends/System/iOS/Sources/Kore/Display_2.cpp

These cause duplicate symbol errors when linking an iOS project. It seems to work if you comment out the stub methods in Display.cpp, but I wanted to check what the story was with these two files first to be sure.

vulkan build failed for linux

Here is the log, my pc setup is archlinux, gcc 8.1.1+20180531-1.

by the way, android seems have the same problem with clang, ndk r17.

g++ -O2 -I./ -I../Sources/include -I../../../Kha/Backends/Kore/khacpp/include -I../../../Kha/Backends/Kore/khacpp/project/thirdparty/pcre-7.8 -I../../../Kha/Backends/Kore/khacpp/project/thirdparty/zlib-1.2.3 -I../../../Kha/Backends/Kore/khacpp/project/libs/nekoapi -I../../../Kha/Backends/Kore/khacpp/project/thirdparty/mbedtls-2.2.1/include -I../../../Kha/Kore/Sources -I../../../Kha/Kore/Backends/System/Linux/Sources -I../../../Kha/Kore/Backends/System/POSIX/Sources -I../../../Kha/Kore/Backends/Graphics5/Vulkan/Sources -I../../../Kha/Kore/Backends/Graphics4/G4onG5/Sources -I../../../Kha/Kore/Backends/Audio3/A3onA2/Sources -DKORE_MULTITHREADED_AUDIO -DHX_LINUX -DHXCPP_API_LEVEL=330 -DSTATIC_LINK -DPCRE_STATIC -DHXCPP_SET_PROP -DHXCPP_VISIT_ALLOCS -DKORE -DROTATE90 -DKORE_G1 -DKORE_G2 -DKORE_G3 -DKORE_A1 -DKORE_A2 -DKORE_LINUX -DKORE_VULKAN -DVK_USE_PLATFORM_XCB_KHR -DKORE_POSIX -DKORE_G4 -DKORE_G5 -DKORE_G4ONG5 -DKORE_A3 -c ../../../Kha/Kore/Backends/Graphics4/G4onG5/Sources/Kore/G4.cpp -o g4.o -static-libgcc -static-libstdc++ -pthread -lasound -ldl -lvulkan -lxcb In file included from ../../../Kha/Kore/Backends/Graphics5/Vulkan/Sources/Kore/CommandList5Impl.h:3, from ../../../Kha/Kore/Sources/Kore/Graphics5/CommandList.h:3, from ../../../Kha/Kore/Backends/Graphics4/G4onG5/Sources/Kore/G4.cpp:10: ../../../Kha/Kore/Backends/Graphics5/Vulkan/Sources/Kore/vulkan_mini.h:3:28: error: conflicting declaration ‘typedef long long unsigned int uint64_t’ typedef unsigned long long uint64_t; ^~~~~~~~ In file included from /usr/include/stdint.h:37, from /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/include/stdint.h:9, from ../../../Kha/Kore/Backends/Graphics5/Vulkan/Sources/vulkan/vk_platform.h:84, from ../../../Kha/Kore/Backends/Graphics5/Vulkan/Sources/vulkan/vulkan.h:31, from ../../../Kha/Kore/Backends/Graphics5/Vulkan/Sources/Kore/Texture5Impl.h:4, from ../../../Kha/Kore/Sources/Kore/Graphics5/Texture.h:4, from ../../../Kha/Kore/Sources/Kore/Graphics5/Shader.h:3, from ../../../Kha/Kore/Sources/Kore/Graphics5/Graphics.h:5, from ../../../Kha/Kore/Backends/Graphics4/G4onG5/Sources/Kore/TextureImpl.h:4, from ../../../Kha/Kore/Sources/Kore/Graphics4/Texture.h:4, from ../../../Kha/Kore/Sources/Kore/Graphics4/Shader.h:3, from ../../../Kha/Kore/Sources/Kore/Graphics4/Graphics.h:3, from ../../../Kha/Kore/Backends/Graphics4/G4onG5/Sources/Kore/G4.h:3, from ../../../Kha/Kore/Backends/Graphics4/G4onG5/Sources/Kore/G4.cpp:3: /usr/include/bits/stdint-uintn.h:27:20: note: previous declaration as ‘typedef __uint64_t uint64_t’ typedef __uint64_t uint64_t; ^~~~~~~~

Title doubled on linux

If the title Test is passed to System.init in the window options, the window will have a title TestTest. The supplied title is being doubled.

screenshot_20170311_150846

To reproduce:

Main.hx:

package;

import kha.System;

class Main {
	public static function main() {
		System.init({title: "Test", width: 1024, height: 768}, function () {
			new Project();
		});
	}
}

Project.hx:

package;

import kha.Framebuffer;
import kha.Scheduler;
import kha.System;

import kha.Color;

class Project {
	public function new() {
		System.notifyOnRender(render);
		Scheduler.addTimeTask(update, 0, 1 / 60);
	}

	function update(): Void {
		
	}

	function render(framebuffer: Framebuffer): Void {
		var g = framebuffer.g2;
		g.begin(true, Color.Cyan);
		g.color = Color.Purple;
		g.fillRect(20, 20, 400, 400);
		g.end();
	}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.