How to run a wad file like doom in a openGL window

Hey I would like to know how to run a doom wad or fan made wad in my OpenGL program. my Code below… if possible please give me the code required to do this…

// oPENGL.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#include <Windows.h>
#include <GL\glew.h>
#include <GL\freeglut.h>
#include <iostream>

using namespace std;

void changeViewPort(int w, int h)
    glViewport(0, 0, w, h);

void render()

int main(int argc, char* argv[]) {

    // Initialize GLUT
    glutInit(&argc, argv);
    // Set up some memory buffers for our display
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
    // Set the window size
    glutInitWindowSize(2560, 1080);
    // Create the window with the title "Hello,GL"
    // Bind the two functions (above) to respond when necessary

    // Very important!  This initializes the entry points in the OpenGL driver so we can 
    // call all the functions in the API.
    GLenum err = glewInit();
    if (GLEW_OK != err) {
        fprintf(stderr, "GLEW error");
        return 1;

    return 0;

WAD is a quite involved format. There are probably some WAD > BSP converters out there that can be modified for general use.