annotate dmglrender.h @ 107:2b30217a3c39 default tip

Fix verbose build echos.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 29 Feb 2024 21:48:47 +0200
parents 28dd29f3a65f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
62
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 //
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 // GLDragon - OpenGL PLY model viewer / simple benchmark
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 // -- OpenGL rendering of DMSimpleScene
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 // Programmed and designed by Matti 'ccr' Hämäläinen <ccr@tnsp.org>
76
9ee0edff3940 Bump copyright years.
Matti Hamalainen <ccr@tnsp.org>
parents: 66
diff changeset
5 // (C) Copyright 2019-2020 Tecnic Software productions (TNSP)
62
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 //
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 // See file "COPYING" for license information.
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 //
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #ifndef DMGLRENDER_H
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #define DMGLRENDER_H 1
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 #include "dmrender.h"
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 #include <SDL_opengl.h>
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 struct DMGLSimpleRenderer : DMSimpleRenderer
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 {
63
d6ffc59bb84d Move more of the SDL and GL setup code to the renderer class.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
18 SDL_GLContext sdlGLContext;
90
3863ad92f8d8 Rename a variable.
Matti Hamalainen <ccr@tnsp.org>
parents: 83
diff changeset
19 GLuint tex8;
91
4df8a7337e3e Add simple 32bit texture version.
Matti Hamalainen <ccr@tnsp.org>
parents: 90
diff changeset
20 GLuint tex32;
62
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 DMGLSimpleRenderer()
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 {
63
d6ffc59bb84d Move more of the SDL and GL setup code to the renderer class.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
24 sdlGLContext = NULL;
62
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 }
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 bool checkErrors(void);
63
d6ffc59bb84d Move more of the SDL and GL setup code to the renderer class.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
28
d6ffc59bb84d Move more of the SDL and GL setup code to the renderer class.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
29 bool initRenderer1(const char *title,
d6ffc59bb84d Move more of the SDL and GL setup code to the renderer class.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
30 const int width, const int height,
d6ffc59bb84d Move more of the SDL and GL setup code to the renderer class.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
31 const int sdlWindowHPos, const int sdlWindowVPos,
d6ffc59bb84d Move more of the SDL and GL setup code to the renderer class.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
32 const int sdlFlags);
d6ffc59bb84d Move more of the SDL and GL setup code to the renderer class.
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
33 bool initRenderer2(void);
62
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 void shutdownRenderer(void);
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 void drawModel(const DMSimpleScene &scene, const DMModel &model, const float time);
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 void drawScene(const DMSimpleScene &scene, const float time);
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 bool compileModelShaders(DMModel &model);
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 bool setupLight(const int n, DMLight &light);
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 bool setupCamera(DMCamera &camera);
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 };
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43
baccf2044289 Move the OpenGL rendering, setup etc. into a separate module/class, perhaps
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 #endif