annotate src/Modules/Output/Graphics/Devices/GraphicsOutputDevice.cc @ 229:ddf35dd82d63
- A few changes to get graphics working. In progress.
author |
tom@acousticscale.org |
date |
Sat, 16 Oct 2010 22:27:03 +0000 |
parents |
82e0dc3dfd16 |
children |
af02b6addf7a |
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
|
tom@229
|
21 namespace aimc {
|
tom@229
|
22
|
tomwalters@227
|
23 GraphicsOutputDevice::GraphicsOutputDevice(Parameters *pParam) {
|
tomwalters@228
|
24 m_pParam = pParam;
|
tomwalters@116
|
25 }
|
tomwalters@116
|
26
|
tomwalters@116
|
27 void GraphicsOutputDevice::gVertex3f(float x,
|
tomwalters@116
|
28 float y,
|
tomwalters@116
|
29 float z,
|
tomwalters@116
|
30 float r,
|
tomwalters@116
|
31 float g,
|
tomwalters@116
|
32 float b) {
|
tomwalters@228
|
33 gColor3f(r, g, b);
|
tomwalters@228
|
34 gVertex3f(x, y, z);
|
tomwalters@116
|
35 }
|
tomwalters@116
|
36
|
tomwalters@116
|
37 void GraphicsOutputDevice::gVertex2f(float x,
|
tomwalters@116
|
38 float y,
|
tomwalters@116
|
39 float r,
|
tomwalters@116
|
40 float g,
|
tomwalters@116
|
41 float b) {
|
tomwalters@228
|
42 gColor3f(r, g, b);
|
tomwalters@228
|
43 gVertex3f(x, y, 0);
|
tomwalters@116
|
44 }
|
tomwalters@116
|
45
|
tomwalters@116
|
46 void GraphicsOutputDevice::gVertex2f(float x, float y) {
|
tomwalters@228
|
47 gVertex3f(x, y, 0);
|
tomwalters@116
|
48 }
|
tomwalters@116
|
49
|
tomwalters@116
|
50 void GraphicsOutputDevice::gText2f(float x,
|
tomwalters@116
|
51 float y,
|
tomwalters@227
|
52 const char *sStr,
|
tomwalters@227
|
53 bool bRotated) {
|
tomwalters@228
|
54 gText3f(x, y, 0, sStr, bRotated);
|
tomwalters@116
|
55 }
|
tom@229
|
56 } // namespace aimc
|