iCub-main
Functions | Variables
rendering.cpp File Reference

This file deals with setting up the OpenGL and the rendering of objects in the environment. More...

#include "SDL.h"
#include "SDL_opengl.h"
#include "rendering.h"
#include "VideoTexture.h"
#include <cstring>
#include <yarp/os/LogStream.h>
+ Include dependency graph for rendering.cpp:

Go to the source code of this file.

Functions

static GLuint FindTextureRAW (const char *str, bool flag)
 
bool setup_opengl (ResourceFinder &finder)
 
void DrawGround (bool wireframe)
 
void drawSkyDome (float x, float y, float z, float width, float height, float length)
 
void DrawBox (float width, float height, float length, bool wireframe, bool texture, int whichtexture)
 
void DrawSphere (float radius, bool wireframe, bool texture, int whichtexture)
 
void DrawCylinder (float radius, float length, bool wireframe, bool texture, int whichtexture)
 
void LDEsetM (const dReal *pos, const dReal *R)
 
GLuint LoadTextureRAW (const char *filename, int wrap)
 
void DrawVideo (VideoTexture *video)
 
void DrawX (dTriMeshX trim, int whichtexture)
 
void setupTexture (char *filename, int whichtexture)
 
int LoadBitmapTERMINAL (char *filename, int whichtexture)
 

Variables

const GLfloat light_ambient [] = { 0.0f, 0.0f, 0.0f, 1.0f }
 
const GLfloat light_diffuse [] = { 1.0f, 1.0f, 1.0f, 1.0f }
 
const GLfloat light_specular [] = { 1.0f, 1.0f, 1.0f, 1.0f }
 
const GLfloat light_position [] = { 0.0f, 50.0f, 5.0f, 1.0f }
 
GLenum mode
 
GLuint nicetexture
 
int num_texture1 =15
 
GLuint num_texture = 19
 
unsigned int Texture [200]
 
GLUquadricObj * sphere
 
GLUquadricObj * cylinder
 
GLUquadricObj * cap
 

Detailed Description

This file deals with setting up the OpenGL and the rendering of objects in the environment.

Author
Vadim Tikhanoff
Date
2008
Note
Released under GNU GPL v2.0

Definition in file rendering.cpp.

Function Documentation

◆ DrawBox()

void DrawBox ( float  width,
float  height,
float  length,
bool  wireframe,
bool  texture,
int  whichtexture 
)

Definition at line 226 of file rendering.cpp.

◆ DrawCylinder()

void DrawCylinder ( float  radius,
float  length,
bool  wireframe,
bool  texture,
int  whichtexture 
)

Definition at line 353 of file rendering.cpp.

◆ DrawGround()

void DrawGround ( bool  wireframe)

Definition at line 122 of file rendering.cpp.

◆ drawSkyDome()

void drawSkyDome ( float  x,
float  y,
float  z,
float  width,
float  height,
float  length 
)

Definition at line 159 of file rendering.cpp.

◆ DrawSphere()

void DrawSphere ( float  radius,
bool  wireframe,
bool  texture,
int  whichtexture 
)

Definition at line 329 of file rendering.cpp.

◆ DrawVideo()

void DrawVideo ( VideoTexture video)

Definition at line 456 of file rendering.cpp.

◆ DrawX()

void DrawX ( dTriMeshX  trim,
int  whichtexture 
)

Definition at line 461 of file rendering.cpp.

◆ FindTextureRAW()

static GLuint FindTextureRAW ( const char *  str,
bool  flag 
)
static

Definition at line 59 of file rendering.cpp.

◆ LDEsetM()

void LDEsetM ( const dReal *  pos,
const dReal *  R 
)

Definition at line 400 of file rendering.cpp.

◆ LoadBitmapTERMINAL()

int LoadBitmapTERMINAL ( char *  filename,
int  whichtexture 
)

Definition at line 509 of file rendering.cpp.

◆ LoadTextureRAW()

GLuint LoadTextureRAW ( const char *  filename,
int  wrap 
)

Definition at line 421 of file rendering.cpp.

◆ setup_opengl()

bool setup_opengl ( ResourceFinder &  finder)

Some OpenGL settings

Definition at line 64 of file rendering.cpp.

◆ setupTexture()

void setupTexture ( char *  filename,
int  whichtexture 
)

Definition at line 504 of file rendering.cpp.

Variable Documentation

◆ cap

GLUquadricObj* cap

Definition at line 57 of file rendering.cpp.

◆ cylinder

GLUquadricObj* cylinder

Definition at line 56 of file rendering.cpp.

◆ light_ambient

const GLfloat light_ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f }

Definition at line 43 of file rendering.cpp.

◆ light_diffuse

const GLfloat light_diffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f }

Definition at line 44 of file rendering.cpp.

◆ light_position

const GLfloat light_position[] = { 0.0f, 50.0f, 5.0f, 1.0f }

Definition at line 46 of file rendering.cpp.

◆ light_specular

const GLfloat light_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f }

Definition at line 45 of file rendering.cpp.

◆ mode

GLenum mode

Definition at line 48 of file rendering.cpp.

◆ nicetexture

GLuint nicetexture

Definition at line 49 of file rendering.cpp.

◆ num_texture

GLuint num_texture = 19

Definition at line 51 of file rendering.cpp.

◆ num_texture1

int num_texture1 =15

Definition at line 50 of file rendering.cpp.

◆ sphere

GLUquadricObj* sphere

Definition at line 55 of file rendering.cpp.

◆ Texture

unsigned int Texture[200]

Definition at line 53 of file rendering.cpp.