OpenGL Renderer:

- Lots of refactoring and code cleanup (important points listed below).
- Clean up #include stuff.
- Make dynamic extension linking a bit nicer.
- Remove ARB and EXT tokens and replace with 3.2 Core Profile tokens. Add backwards compatibility for pre-3.0 OpenGL headers.
- Check for GL_ARB_texture_mirrored_repeat, GL_EXT_blend_func_separate, and GL_EXT_blend_equation_separate. Older GPUs that don't support these extensions should no longer malfunction.
This commit is contained in:
rogerman 2013-01-20 01:33:12 +00:00
parent 2914677ad6
commit e751cfb9bd
2 changed files with 539 additions and 402 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,15 +20,21 @@
#ifndef OGLRENDER_H #ifndef OGLRENDER_H
#define OGLRENDER_H #define OGLRENDER_H
#include "common.h"
#include <algorithm>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "debug.h"
#include "render3D.h" #include "render3D.h"
// Define minimum required OpenGL version for GPU (Legacy Renderer)
#define OGLRENDER_LEGACY_MINIMUM_GPU_VERSION_REQUIRED_MAJOR 1
#define OGLRENDER_LEGACY_MINIMUM_GPU_VERSION_REQUIRED_MINOR 2
#define OGLRENDER_LEGACY_MINIMUM_GPU_VERSION_REQUIRED_REVISION 0
// Define minimum required OpenGL version for GPU (Modern Renderer)
#define OGLRENDER_MINIMUM_GPU_VERSION_REQUIRED_MAJOR 3
#define OGLRENDER_MINIMUM_GPU_VERSION_REQUIRED_MINOR 0
#define OGLRENDER_MINIMUM_GPU_VERSION_REQUIRED_REVISION 0
#define OGLRENDER_MAX_MULTISAMPLES 16
#define OGLRENDER_VERT_INDEX_BUFFER_SIZE 8192
extern GPU3DInterface gpu3Dgl; extern GPU3DInterface gpu3Dgl;
//This is called by OGLRender whenever it initializes. //This is called by OGLRender whenever it initializes.