annotate trunk/src/Modules/Output/Graphics/Devices/GraphicsOutputDevice.cc @ 706:f8e90b5d85fd tip

Delete CARFAC code from this repository. It has been moved to https://github.com/google/carfac Please email me with your github username to get access. I've also created a new mailing list to discuss CARFAC development: https://groups.google.com/forum/#!forum/carfac-dev
author ronw@google.com
date Thu, 18 Jul 2013 20:56:51 +0000
parents a908972d234e
children
rev   line source
tomwalters@397 1 // Copyright 2006, Willem van Engen
tomwalters@397 2 //
tomwalters@397 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@397 4 // http://www.acousticscale.org/AIMC
tomwalters@397 5 //
tomwalters@397 6 // Licensed under the Apache License, Version 2.0 (the "License");
tomwalters@397 7 // you may not use this file except in compliance with the License.
tomwalters@397 8 // You may obtain a copy of the License at
tomwalters@397 9 //
tomwalters@397 10 // http://www.apache.org/licenses/LICENSE-2.0
tomwalters@397 11 //
tomwalters@397 12 // Unless required by applicable law or agreed to in writing, software
tomwalters@397 13 // distributed under the License is distributed on an "AS IS" BASIS,
tomwalters@397 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tomwalters@397 15 // See the License for the specific language governing permissions and
tomwalters@397 16 // limitations under the License.
tomwalters@397 17
tomwalters@397 18 #include "Support/Common.h"
tomwalters@397 19 #include "Modules/Output/Graphics/Devices/GraphicsOutputDevice.h"
tomwalters@397 20
tom@399 21 namespace aimc {
tom@399 22
tomwalters@411 23 GraphicsOutputDevice::GraphicsOutputDevice(Parameters *parameters) {
tomwalters@411 24 parameters_ = parameters;
tomwalters@397 25 }
tomwalters@397 26
tomwalters@397 27 void GraphicsOutputDevice::gVertex3f(float x,
tomwalters@397 28 float y,
tomwalters@397 29 float z,
tomwalters@397 30 float r,
tomwalters@397 31 float g,
tomwalters@397 32 float b) {
tomwalters@398 33 gColor3f(r, g, b);
tomwalters@398 34 gVertex3f(x, y, z);
tomwalters@397 35 }
tomwalters@397 36
tomwalters@397 37 void GraphicsOutputDevice::gVertex2f(float x,
tomwalters@397 38 float y,
tomwalters@397 39 float r,
tomwalters@397 40 float g,
tomwalters@397 41 float b) {
tomwalters@398 42 gColor3f(r, g, b);
tomwalters@398 43 gVertex3f(x, y, 0);
tomwalters@397 44 }
tomwalters@397 45
tomwalters@397 46 void GraphicsOutputDevice::gVertex2f(float x, float y) {
tomwalters@398 47 gVertex3f(x, y, 0);
tomwalters@397 48 }
tomwalters@397 49
tomwalters@397 50 void GraphicsOutputDevice::gText2f(float x,
tomwalters@397 51 float y,
tomwalters@411 52 const char *text_string,
tomwalters@411 53 bool rotated) {
tomwalters@411 54 gText3f(x, y, 0, text_string, rotated);
tomwalters@397 55 }
tom@399 56 } // namespace aimc