This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Nuklear - 1.32.0 - public domain | |
* no warrenty implied; use at your own risk. | |
* authored from 2015-2016 by Micha Mettke | |
*/ | |
/* | |
* ============================================================== | |
* | |
* API | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <OpenGL/gl3.h> | |
#include <SDL2/SDL.h> | |
#define SOKOL_IMPL | |
#define SOKOL_GLCORE33 | |
#include <sokol_gfx.h> | |
#define STB_IMAGE_IMPLEMENTATION | |
#include <stb_image.h> | |
#define CODE(...) #__VA_ARGS__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
typedef struct Color{ | |
int r, g, b, a | |
} Color; | |
typedef struct Vertex{ | |
float x, y, z; | |
Color color; | |
} Vertex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL2/SDL.h> | |
#ifdef __APPLE__ | |
#include <OpenGL/gl3.h> | |
#include <OpenGL/gl3ext.h> | |
#else | |
#include <GL/gl.h> | |
#endif | |
#include <stdbool.h> | |
#define CODE(...) #__VA_ARGS__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "animal.h" | |
void Animal::inc(int i){ | |
this->counter += i; | |
} | |
void Animal::say(){ | |
std::cout << this->counter << std::endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SherjilOzair:build sherjilozair$ examples/05_triangle | |
Initialized SDL: '' | |
[2018-05-04 20:20:01.819393][Error] Error in OpenGL call: | |
Location: /Users/sherjilozair/gf/library/Window.cc:111 | |
Expression: glEnable(GL_BLEND) | |
Error: GL_INVALID_ENUM | |
Description: An unacceptable value is specified for an enumerated argument. | |
Gamedev Framework (gf) example #05: Triangle | |
This example prints the hello world triangle of OpenGL. | |
You can click on the screen to see the screen coordinates and world coordinates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[n.global] | |
output = sfml | |
[n.include] | |
/usr/local/include/SFML/ | |
[Window/VideoMode.h] | |
preprocess = true | |
defines = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
class SpecNorm(object): | |
def build(self, input_shape): | |
self.indim = input_shape[-1] * np.array(self.kernel_size).prod() | |
self.outdim = self.filters | |
self.u = self.add_variable(name='u', shape=(1, self.indim), trainable=False) | |
self.v = self.add_variable(name='v', shape=(self.outdim, 1), trainable=False) | |
super().build(input_shape) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sherjilozair-2:~ sherjil$ nimble install c2nim --verbose | |
Reading official package list | |
Downloading https://github.com/nim-lang/c2nim using git | |
Setting Nim stdlib prefix to | |
Setting Nim stdlib path to /Users/sherjil/.choosenim/toolchains/nim-#devel/lib | |
Warning: Package 'c2nim' has an incorrect structure. The top level of the package source directory should contain at most one module, named 'c2nim.nim', but a file named 'rules.nim' was found. This will be an error in the future. | |
Hint: If this is the primary source file in the package, rename it to 'c2nim.nim'. If it's a source file required by the main module, or if it is one of several modules exposed by 'c2nim', then move it into a 'c2nimpkg/' subdirectory. If it's a test file or otherwise not required to build the the package 'c2nim.nim', prevent its installation by adding `skipFiles = @["rules.nim"]` to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info. | |
Setting Nim stdlib prefix to | |
Setting Nim stdli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions | |
// are met: | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the | |
// documentation and/or other materials provided with the distribution. |