Mercurial > hg > forks > gldragon
view dmglrender.h @ 83:69d7349dc5d3
Render a textured quad with bitmap letter 'A' in the bottom left corner as
an additional test - this does not render correctly with Zink (on Intel
Haswell at least).
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 09 Mar 2020 09:40:28 +0200 |
parents | 9ee0edff3940 |
children | 3863ad92f8d8 |
line wrap: on
line source
// // GLDragon - OpenGL PLY model viewer / simple benchmark // -- OpenGL rendering of DMSimpleScene // Programmed and designed by Matti 'ccr' Hämäläinen <ccr@tnsp.org> // (C) Copyright 2019-2020 Tecnic Software productions (TNSP) // // See file "COPYING" for license information. // #ifndef DMGLRENDER_H #define DMGLRENDER_H 1 #include "dmrender.h" #include <SDL_opengl.h> struct DMGLSimpleRenderer : DMSimpleRenderer { SDL_GLContext sdlGLContext; GLuint tex; DMGLSimpleRenderer() { sdlGLContext = NULL; } bool checkErrors(void); bool initRenderer1(const char *title, const int width, const int height, const int sdlWindowHPos, const int sdlWindowVPos, const int sdlFlags); bool initRenderer2(void); void shutdownRenderer(void); void drawModel(const DMSimpleScene &scene, const DMModel &model, const float time); void drawScene(const DMSimpleScene &scene, const float time); bool compileModelShaders(DMModel &model); bool setupLight(const int n, DMLight &light); bool setupCamera(DMCamera &camera); bool animate(DMSimpleScene &scene, const float time); }; #endif