Skip to content

Instantly share code, notes, and snippets.

Juan Sebastian Muñoz naruse

Block or report user

Report or block naruse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@naruse
naruse / gist:4edc15f7c389ea8f793b
Created Sep 10, 2014
LOD groups add on to work with pro draw call.
View gist:4edc15f7c389ea8f793b
[MenuItem("FixLODRendeer")]
static void LODRendeer()
{
LODGroup[] lodgroups = (LODGroup[])GameObject.FindObjectsOfType(typeof(LODGroup));
//For every LOD group: get the current groups and get the renderer names..
foreach (LODGroup lodgroup in lodgroups)
{
SerializedObject obj = new SerializedObject(lodgroup);
View gist:5d6ff992cde260cdb6ac
public List<Texture> GetTextures2D(Material mat) {
List<Texture> list = new List<Texture>();
int count = ShaderUtil.GetPropertyCount(mat.shader);
for(var i = 0; i < count; i++) {
if(ShaderUtil.GetPropertyType(mat.shader, i) == ShaderUtil.ShaderPropertyType.TexEnv) {
string propertyName = ShaderUtil.GetPropertyName(mat.shader, i);
if(propertyName != "_Cube") {
list.Add(mat.GetTexture(propertyName));
}
}
View gist:79d54c660707ed717edd
public List<Texture> GetTextures2D(Material mat) {
List<Texture> list = new List<Texture>();
int count = ShaderUtil.GetPropertyCount(mat.shader);
for(int i = 0; i < count; i++) {
if(ShaderUtil.GetPropertyType(mat.shader, i) == ShaderUtil.ShaderPropertyType.TexEnv) {
if(ShaderUtil.GetTexDim(mat.shader, i) == ShaderUtil.ShaderPropertyTexDim.TexDim2D) {
list.Add(mat.GetTexture(ShaderUtil.GetPropertyName(mat.shader, i)));
}
}
}
View gist:b0fc7b2287425c428823
naruse@MacBook-Pro ~/dev/HexLang/hex/compiler (master)$:make compiler.out
gcc -Wno-implicit parser.o lex.yy.c parser.tab.c ast.o semantics.o vtable.o ../base/hashmap.o ../base/strbuf.o ../base/hash.o compiler.c -o compiler.out
parser.y:695:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
1 warning generated.
compiler.c:63:66: error: too many arguments to function call, expected 3, have 4
hex_semantics_check_stmt_group(vtable, stmt_group, scope_type, indent_level);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~
./semantics.h:32:1: note: 'hex_semantics_check_stmt_group' declared here
View gist:53829199ff36ffbb684e
#include <iostream>
using namespace::std;
int width = -1;
int height = -1;
char** mineBoard;
int main(int argc, char* argv[]) {
while (width != 0 && height != 0) {
View gist:e03d7242bcc97a4aa81d
#include "Matrix.h"
float const Matrix::identityMatrix[] = {
1,0,0,0,
0,1,0,0,
0,0,1,0,
0,0,0,1
};
Matrix Matrix::MultiplyMatrices(const Matrix* m1, const Matrix* m2) {
View gist:7ed9445308a6f0d9eb22
-*- mode: compilation; default-directory: "~/dev/OpenGL/Test73DOpenGL/" -*-
Compilation started at Mon Jun 1 13:49:42
make -k \
g++ -I/usr/local/include main.cpp Vertex.cpp Matrix.cpp Utils.cpp -o main -L/usr/local/lib -lglfw3 -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework CoreVideo -lGLEW
Matrix.cpp:13:14: error: array type 'float [16]' is not assignable
result.m = Matrix::Identity();
~~~~~~~~ ^
1 error generated.
make: *** [all] Error 1
View gist:105325
/************ revisamos que el web player haya finalizado de cargar ************/
if(Application.GetStreamProgressForLevel(0) == 1 && !finishedLoadingApp){
Application.ExternalCall("FinishedLoadingApp");
finishedLoadingApp = true;
}
/*******************************************************************************/
View gist:134342
“Always Up” (referring to sun) = Siempre de dia
“Always Down” (referring to sun) = Siempre de noche
“Hemisphere” = Hemisferio
“Northern” (referring to northern hemisphere) = hemisferio norte
“Southern” (referring to northern hemisphere) = hemisferio sur
“City Map” = mapa de la ciudad
“No Cities” = no hay ciudades
“Tap + to add a new city” = Unda + para adicionar una nueva ciudad
“Units” = Unidades
“System Timezone” = Coordenadas horarias (not sure 100%)
View gist:134344
“Always Up” (referring to sun) = Siempre de dia
“Always Down” (referring to sun) = Siempre de noche
“Hemisphere” = Hemisferio
“Northern” (referring to northern hemisphere) = hemisferio norte
“Southern” (referring to northern hemisphere) = hemisferio sur
“City Map” = mapa de la ciudad
“No Cities” = no hay ciudades
“Tap + to add a new city” = Unda + para adicionar una nueva ciudad
“Units” = Unidades
“System Timezone” = sistema de zona horaria
You can’t perform that action at this time.