Итак, вот ошибка:
1> c: \ users \ ben \ documents \ visual studio 2010 \ projects \ opengl_learning \ opengl_learning_without_glut \ openglcontext.cpp (18): ошибка C2533: 'OpenGLContext :: {ctor}': конструкторам не разрешен тип возврата
А вот блок кода, в котором указана ошибка, в частности, ошибка происходит из конструктора по умолчанию:
#include <Windows.h>
#include <iostream>
#include "OpenGLContext.h"
/**
Default constructor for the OpenGLContext class. At this stage it does nothing
but you can put anything you want here.
*/
OpenGLContext::OpenGLContext(void){}
OpenGLContext::OpenGLContext(HWND hwnd) {
createContext(hwnd);
}
/**
Destructor for our OpenGLContext class which will clean up our rendering context
and release the device context from the current window.
*/
OpenGLContext::~OpenGLContext(void) {
wglMakeCurrent(hdc, 0); // Remove the rendering context from our device context
wglDeleteContext(hrc); // Delete our rendering context
ReleaseDC(hwnd, hdc); // Release the device context from our window
}
Почему!? * * 1006