ini
This commit is contained in:
commit
e4c8917154
16 changed files with 319 additions and 0 deletions
38
.vscode/glut_template.code-snippets
vendored
Normal file
38
.vscode/glut_template.code-snippets
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"Template Base GLUT": {
|
||||
"prefix": "glut-base",
|
||||
"body": [
|
||||
"#include <GL/glut.h>",
|
||||
"",
|
||||
"void display() {",
|
||||
"\tglClear(GL_COLOR_BUFFER_BIT);",
|
||||
"\t$4 // O teu desenho fica aqui",
|
||||
"\tglFlush();",
|
||||
"}",
|
||||
"",
|
||||
"void init() {",
|
||||
"\t// Define a cor de fundo (R, G, B, Alpha) - Preto por omissao",
|
||||
"\tglClearColor(0.0f, 0.0f, 0.0f, 1.0f);",
|
||||
"}",
|
||||
"",
|
||||
"int main(int argc, char** argv) {",
|
||||
"\tglutInit(&argc, argv);",
|
||||
"\t",
|
||||
"\t// Configuracoes basicas da janela",
|
||||
"\tglutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);",
|
||||
"\tglutInitWindowSize(${1:800}, ${2:600});",
|
||||
"\tglutInitWindowPosition(100, 100);",
|
||||
"\t",
|
||||
"\t// Cria a janela com o prefixo obrigatorio",
|
||||
"\tglutCreateWindow(\"GLUT: ${3:Titulo da Janela}\");",
|
||||
"\t",
|
||||
"\tinit();",
|
||||
"\tglutDisplayFunc(display);",
|
||||
"\tglutMainLoop();",
|
||||
"\t",
|
||||
"\treturn 0;",
|
||||
"}"
|
||||
],
|
||||
"description": "Template GLUT com configuracoes basicas (tamanho, cor) e prefixo obrigatorio"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue