Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| #include<iostream> | |
| #include"display.h" | |
| #include<SDL2/SDL.h> | |
| #include<GL/glew.h> | |
| //#include "shader.h" | |
| //#include "mesh.h" | |
| using namespace ns_OCTAD::ns_display; |
| /// Forward declaration | |
| int getWebKeyFromSDLKey(SDLKey key); | |
| /// | |
| /// Inject an SDL Key Event into a given WebView | |
| /// | |
| void handleSDLKeyEvent(Awesomium::WebView* webView, const SDL_Event& event) { | |
| if (!(event.type == SDL_KEYDOWN || event.type == SDL_KEYUP)) | |
| return; |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| class Base{ | |
| public: | |
| Base(){} | |
| ~Base(){} | |
| virtual void Write(){ | |
| cout<<"Base"<<endl; |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <math.h> | |
| #include <SDL2/SDL.h> | |
| #include <SDL2/SDL_opengl.h> |
| tool | |
| extends MeshInstance | |
| export(ImageTexture) var heightmap setget set_heightmap, get_heightmap | |
| export(float, 0.1, 25, 0.1) var factor = 5 setget set_factor, get_factor | |
| export(int, 1, 500) var resolution = 32 setget set_resolution, get_resolution | |
| export(int, 1, 200) var size = 50 setget set_size, get_size | |
| var mesh_builder |
| /// write to file | |
| var txtFile = "c:/test.txt"; | |
| var file = new File(txtFile); | |
| var str = "My string of text"; | |
| file.open("w"); // open file with write access | |
| file.writeln("First line of text"); | |
| file.writeln("Second line of text " + str); | |
| file.write(str); | |
| file.close(); |