iCub-main
|
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>
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 |
This file deals with setting up the OpenGL and the rendering of objects in the environment.
Definition in file rendering.cpp.
void DrawBox | ( | float | width, |
float | height, | ||
float | length, | ||
bool | wireframe, | ||
bool | texture, | ||
int | whichtexture | ||
) |
Definition at line 226 of file rendering.cpp.
void DrawCylinder | ( | float | radius, |
float | length, | ||
bool | wireframe, | ||
bool | texture, | ||
int | whichtexture | ||
) |
Definition at line 353 of file rendering.cpp.
void DrawGround | ( | bool | wireframe | ) |
Definition at line 122 of file rendering.cpp.
void drawSkyDome | ( | float | x, |
float | y, | ||
float | z, | ||
float | width, | ||
float | height, | ||
float | length | ||
) |
Definition at line 159 of file rendering.cpp.
void DrawSphere | ( | float | radius, |
bool | wireframe, | ||
bool | texture, | ||
int | whichtexture | ||
) |
Definition at line 329 of file rendering.cpp.
void DrawVideo | ( | VideoTexture * | video | ) |
Definition at line 456 of file rendering.cpp.
void DrawX | ( | dTriMeshX | trim, |
int | whichtexture | ||
) |
Definition at line 461 of file rendering.cpp.
|
static |
Definition at line 59 of file rendering.cpp.
void LDEsetM | ( | const dReal * | pos, |
const dReal * | R | ||
) |
Definition at line 400 of file rendering.cpp.
int LoadBitmapTERMINAL | ( | char * | filename, |
int | whichtexture | ||
) |
Definition at line 509 of file rendering.cpp.
GLuint LoadTextureRAW | ( | const char * | filename, |
int | wrap | ||
) |
Definition at line 421 of file rendering.cpp.
bool setup_opengl | ( | ResourceFinder & | finder | ) |
Some OpenGL settings
Definition at line 64 of file rendering.cpp.
void setupTexture | ( | char * | filename, |
int | whichtexture | ||
) |
Definition at line 504 of file rendering.cpp.
GLUquadricObj* cap |
Definition at line 57 of file rendering.cpp.
GLUquadricObj* cylinder |
Definition at line 56 of file rendering.cpp.
const GLfloat light_ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f } |
Definition at line 43 of file rendering.cpp.
const GLfloat light_diffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f } |
Definition at line 44 of file rendering.cpp.
const GLfloat light_position[] = { 0.0f, 50.0f, 5.0f, 1.0f } |
Definition at line 46 of file rendering.cpp.
const GLfloat light_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f } |
Definition at line 45 of file rendering.cpp.
GLenum mode |
Definition at line 48 of file rendering.cpp.
GLuint nicetexture |
Definition at line 49 of file rendering.cpp.
GLuint num_texture = 19 |
Definition at line 51 of file rendering.cpp.
int num_texture1 =15 |
Definition at line 50 of file rendering.cpp.
GLUquadricObj* sphere |
Definition at line 55 of file rendering.cpp.
unsigned int Texture[200] |
Definition at line 53 of file rendering.cpp.