Feb 15, 2017 at 9:37pm UTC
Hi,
I'm having problems creating a template for the following code in VS
#define _CRT_SECURE_NO_WARNINGS
#define GLEW_STATIC
#include < GL/glew.h >
#define GLFW_DLL
#include < GLFW/glfw3.h >
#include < stdio.h>
#include < time.h >
#include < stdarg.h >
#include < assert.h >
int main(int argc, char argv[])
{
GLFWwindow* window;
/* Initialize the library */
if (!glfwInit())
return -1;
/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
/* Make the window's context current */
glfwMakeContextCurrent(window);
/* Loop until the user closes the window */
while (!glfwWindowShouldClose(window))
{
/* Render here */
/* Swap front and back buffers */
glfwSwapBuffers(window);
/* Poll for and process events */
glfwPollEvents();
}
glfwTerminate();
return 0;
}
When I try to export the file to a template I get a message box saying
Template export failed for the following reason: Access to the path
followed by my own path
is denied.
Can anyone help me out ?
FC.
Feb 17, 2017 at 3:46pm UTC
Where do you want to save it?
Default location is:
C:\Users\USERNAME\Documents\Visual Studio 2015\My Exported Templates\NAME.zip
Feb 21, 2017 at 5:57pm UTC
Maybe this is a bit off-topic, though I don't see why would make a template out of that snippet rather than encapsulating a GLFW app inside a class. I think it would prove to be more productive.