Skip to content

Instantly share code, notes, and snippets.

@onslauth
onslauth / MainWindow.xaml
Created April 5, 2023 09:18
HelixToolkit WinUI / AppSDK
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<!-- Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Window
x:Class="TestHelix.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:TestHelix"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@onslauth
onslauth / MainWindow.xaml
Created April 5, 2023 08:03
C# AppSDK HelixToolkit
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<!-- Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Window
x:Class="TestHelix.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:TestHelix"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@onslauth
onslauth / description.md
Last active September 9, 2019 12:15
OpenGL ES 2.0 Rendering

Problem:

I am trying to draw two planes that are intersected by a cylinder through the center of each plane.

When changing the alpha value of the planes, I would like them to become transparent, and show both the cylinder as well as the other plane, however this only works correctly when viewing it from behind.

Current settings:

GL_BLEND enabled
@onslauth
onslauth / test.kv
Created August 22, 2019 13:10
main.py
from kivy.app import App
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.uix.behaviors import FocusBehavior
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.carousel import Carousel
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.uix.popup import Popup
from kivy.uix.screenmanager import ScreenManager, Screen
@onslauth
onslauth / image.png
Last active August 21, 2019 14:25
Example
image.png
$ python3 -m kivy.tools.packaging.pyinstaller_hooks hook ./kivy-hooks
[INFO ] [Logger ] Record log in /Users/xxx/.kivy/logs/kivy_19-06-03_16.txt
[INFO ] [Kivy ] v1.11.0
[INFO ] [Kivy ] Installed at "/usr/local/lib/python3.6/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.6.5 (default, May 7 2018, 14:48:21)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)]
[INFO ] [Python ] Interpreter at "/usr/local/opt/python/bin/python3.6"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Logger ] Record log in /Users/xxx/.kivy/logs/kivy_19-06-03_17.txt
[INFO ] [Kivy ] v1.11.0
@onslauth
onslauth / Kivy Spinner
Last active April 30, 2019 09:04
Kivy Spinner Description
How to stop the automatic text resizing?
from kivy.config import Config
Config.set('kivy', 'log_level', 'debug')
from kivy.app import App
from kivy.lang import Builder
from kivy.factory import Factory
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.modalview import ModalView
from kivy.properties import ObjectProperty
@onslauth
onslauth / main.py
Last active January 17, 2019 13:28
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.scatter import Scatter
from kivy.uix.widget import Widget
Builder.load_string("""
<MainWidget>
Picture:
size_hint: None, None