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 "ecere" | |
#include <glad/glad.h> | |
#define property _property | |
#include <GL/glut.h> | |
#undef property | |
// GLAD_DEBUG is only defined if the c-debug generator was used | |
#ifdef GLAD_DEBUG | |
// logs every gl call to the console | |
void pre_gl_call(const char *name, void *funcptr, int len_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
//https://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Introduction | |
//https://gitlab.com/wikibooks-opengl/modern-tutorials/blob/master/tut01_intro/triangle.cpp | |
import "ecere" | |
#include "gl_core_3_3.h" | |
GLuint program; | |
GLint attribute_coord2d; | |
GLfloat triangle_vertices[] = { |
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
//https://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Introduction | |
/* | |
Object Oriented Version | |
By: Einlander | |
*/ | |
import "ecere" | |
#include "gl_core_3_3.h" | |
class Example1_OO : Window | |
{ |
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
//load file to mem | |
import "ecere" | |
void file_read(const String filename) | |
{ | |
// with code from http://rosettacode.org/wiki/Read_entire_file#C | |
char *buffer; | |
File FileHandler = FileOpen(filename, read); | |
if (FileHandler) | |
{ | |
buffer = malloc(FileHandler.GetSize()); |
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
def my_function1(bool1): | |
if (bool1 = my_function2( insert_some_variable_here) ) = true : | |
dosomething | |
def my_function2(bool2): | |
return bool2 |
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
extends Camera | |
# member variables here, example: | |
# var a=2 | |
# var b="textvar" | |
export var flyspeed= 0.1 | |
var view_sensitivity = 0.3 | |
var defaulCam = Matrix3() | |
var mousedifference = Vector3() | |
var yaw = 0 |
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
/* | |
Application : 3d Asset Browser | |
Author : Einlander | |
Purpose : Stores and keeps track of 3d assets | |
*/ | |
/* | |
Future goals | |
Able to connect to remote multi-user server/database |
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
extends KinematicBody | |
# class member variables go here, for example: | |
# var a = 2 | |
# var b = "textvar" | |
export(float) var walk_speed = 4 | |
export(float) var run_speed = 6 | |
export(float) var acceleration = 5 | |
export(float) var deceleration = 8 |
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
# Simple Utility Script | |
# Traps Mouse Cursor and hides it. | |
# ESCAPE to quit game | |
# F5 to reload current scene | |
# F9 to toggle collision shape dispay. Scene MUST be reloaded | |
# F10 to toggle fps Display | |
# F11 to switch from windowed to fullscreen | |
# F12 to take screenshot | |
# | |
# Works great for fps games |
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
extends Camera | |
# Takes the needed pictures to create a cube map. | |
# Read this to find where the files are saved. http://docs.godotengine.org/en/3.0/tutorials/io/data_paths.html?highlight=user%3A%2F%2F | |
# Go here to make it useable in godot. https://nadirpatch.com/cube2sphere/ | |
var _pass = 0 | |
func _ready(): | |
get_viewport().size = Vector2(1024,1024) | |
self.rotation = Vector3(0,0,0) | |
pass |
OlderNewer