38 lines
No EOL
1.1 KiB
Text
38 lines
No EOL
1.1 KiB
Text
{
|
|
"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"
|
|
}
|
|
} |