annotate src/Modules/Output/Graphics/Devices/GraphicsOutputDevice.cc @ 227:73c6d61440ad
- First add of a lot of graphics code from the old version. Not working yet, not even compiling yet.
author |
tomwalters |
date |
Fri, 15 Oct 2010 05:40:53 +0000 |
parents |
a9cb396529c2 |
children |
82e0dc3dfd16 |
rev |
line source |
tomwalters@116
|
1 // Copyright 2006, Willem van Engen
|
tomwalters@116
|
2 //
|
tomwalters@116
|
3 // AIM-C: A C++ implementation of the Auditory Image Model
|
tomwalters@116
|
4 // http://www.acousticscale.org/AIMC
|
tomwalters@116
|
5 //
|
tomwalters@116
|
6 // Licensed under the Apache License, Version 2.0 (the "License");
|
tomwalters@116
|
7 // you may not use this file except in compliance with the License.
|
tomwalters@116
|
8 // You may obtain a copy of the License at
|
tomwalters@116
|
9 //
|
tomwalters@116
|
10 // http://www.apache.org/licenses/LICENSE-2.0
|
tomwalters@116
|
11 //
|
tomwalters@116
|
12 // Unless required by applicable law or agreed to in writing, software
|
tomwalters@116
|
13 // distributed under the License is distributed on an "AS IS" BASIS,
|
tomwalters@116
|
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
tomwalters@116
|
15 // See the License for the specific language governing permissions and
|
tomwalters@116
|
16 // limitations under the License.
|
tomwalters@116
|
17
|
tomwalters@116
|
18 #include "Support/Common.h"
|
tomwalters@116
|
19 #include "Modules/Output/Graphics/Devices/GraphicsOutputDevice.h"
|
tomwalters@116
|
20
|
tomwalters@227
|
21 GraphicsOutputDevice::GraphicsOutputDevice(Parameters *pParam) {
|
tomwalters@227
|
22 m_pParam = pParam;
|
tomwalters@116
|
23 }
|
tomwalters@116
|
24
|
tomwalters@116
|
25 void GraphicsOutputDevice::gVertex3f(float x,
|
tomwalters@116
|
26 float y,
|
tomwalters@116
|
27 float z,
|
tomwalters@116
|
28 float r,
|
tomwalters@116
|
29 float g,
|
tomwalters@116
|
30 float b) {
|
tomwalters@227
|
31 gColor3f(r, g, b);
|
tomwalters@227
|
32 gVertex3f(x, y, z);
|
tomwalters@116
|
33 }
|
tomwalters@116
|
34
|
tomwalters@116
|
35 void GraphicsOutputDevice::gVertex2f(float x,
|
tomwalters@116
|
36 float y,
|
tomwalters@116
|
37 float r,
|
tomwalters@116
|
38 float g,
|
tomwalters@116
|
39 float b) {
|
tomwalters@227
|
40 gColor3f(r, g, b);
|
tomwalters@227
|
41 gVertex3f(x, y, 0);
|
tomwalters@116
|
42 }
|
tomwalters@116
|
43
|
tomwalters@116
|
44 void GraphicsOutputDevice::gVertex2f(float x, float y) {
|
tomwalters@227
|
45 gVertex3f(x, y, 0);
|
tomwalters@116
|
46 }
|
tomwalters@116
|
47
|
tomwalters@116
|
48 void GraphicsOutputDevice::gText2f(float x,
|
tomwalters@116
|
49 float y,
|
tomwalters@227
|
50 const char *sStr,
|
tomwalters@227
|
51 bool bRotated) {
|
tomwalters@227
|
52 gText3f(x, y, 0, sStr, bRotated);
|
tomwalters@116
|
53 }
|