Skip to content

Instantly share code, notes, and snippets.

View tobspr's full-sized avatar
💭
I may be slow to respond.

Tobias tobspr

💭
I may be slow to respond.
View GitHub Profile
from __future__ import print_function
import math
from panda3d.core import *
from direct.interval.IntervalGlobal import Sequence
from RenderTarget import RenderTarget
from __future__ import print_function
import math
from panda3d.core import *
from direct.interval.IntervalGlobal import Sequence
from RenderTarget import RenderTarget
from __future__ import print_function
import math
from panda3d.core import *
from direct.interval.IntervalGlobal import Sequence
from RenderTarget import RenderTarget
from __future__ import print_function
import math
from panda3d.core import *
from direct.interval.IntervalGlobal import Sequence
from RenderTarget import RenderTarget
from panda3d.core import *
with open("fancy-shader.vtx.glsl", "w") as handle:
handle.write("""
#version 400
void main() {}
""")
from panda3d.core import *
with open("fancy-shader.vtx.glsl", "w") as handle:
handle.write("""
#version 400
void main() {}
""")
@tobspr
tobspr / main.cpp
Last active December 17, 2016 19:41
Valid C++17
auto [a,b,c] = []<class...T>(T...t...) -> tuple<T...> { return {t...}; }(1, 2, 3);
from panda3d.core import *
from random import random
import direct.directbase.DirectStart
vertex_glsl = """
#version 400
in vec4 p3d_Vertex;
uniform mat4 p3d_ModelViewProjectionMatrix;
@tobspr
tobspr / main.cpp
Last active November 1, 2016 14:04
template < typename T >
static inline void add_to_list(component_list& target)
{
target.push_back(T::component_id);
};
template <typename... Args >
static inline void unpack_list(component_list &target)
{
int _[] = {(add_to_list<Args>(target), 0)...};
From 47c83fce1f4a96954a5db33c6be875e17a4675cc Mon Sep 17 00:00:00 2001
From: tobspr <[email protected]>
Date: Sat, 27 Feb 2016 17:35:53 +0100
Subject: [PATCH] Support for p3d_PrevModelViewMatrix, populate previous
transform during cull stage
---
panda/src/collide/collisionVisualizer.cxx | 7 +-
panda/src/display/callbackGraphicsWindow.cxx | 3 +-
panda/src/display/graphicsEngine.cxx | 4 ++