void HouseBathroom::Init() { // Initialising the textures. floor_dark_diamonds_ = TextureInit("Converted_Textures/floor_dark_diamonds.png"); marble_ = TextureInit("Converted_Textures/marble.png"); wood_light_ = TextureInit("Converted_Textures/wood_light.png"); // Initialising the room. Room::Init(); }
void HouseKitchen::Init() { // Initialising the textures that the kitchen needs. floor_dark_diamonds_ = TextureInit("Converted_Textures/floor_dark_diamonds.png"); marble_ = TextureInit("Converted_Textures/marble.png"); wood_light_ = TextureInit("Converted_Textures/wood_light.png"); // Loading in the teapot model. teapot_.Load("Models/teapot.obj", "Converted_Textures/white.png"); // Initialising the textures that are used in all rooms. Room::Init(); }
void GLInit() { //glClearColor(0., 0., 0., 0.); //glClearDepth(200.); glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GEQUAL, .5); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glEnable(GL_CULL_FACE); glictGlobals.clippingMode = GLICT_SCISSORTEST; #ifdef WIN32 #ifdef USEGREMEDY glinstance = LoadLibrary("opengl32.dll"); glmodule = GetModuleHandle("opengl32.dll"); glStringMarkerGREMEDY = (PFNGLSTRINGMARKERGREMEDYPROC) GetProcAddress(glmodule, "glStringMarkerGREMEDY"); glictGlobals.debugCallback = (GLICTDEBUGCALLBACKPROC)DEBUGMARKER; #endif #endif { int x=0,y=0,z=0; sscanf((char*)glGetString( GL_VERSION ), "%d.%d.%d", &x, &y, &z); glversion.major = x; glversion.minor = y; glversion.revision = z; } TextureInit(); }
void Mesh::initializeVBOs() { glGenBuffers(1,&mesh_tri_verts_VBO); glGenBuffers(1,&mesh_plate_verts_VBO); glGenBuffers(1,&light_vert_VBO); bbox.initializeVBOs(); TextureInit(); }
pixel_city() { RandomInit (time (NULL)); RenderInit (); CameraInit (); TextureInit (); WorldInit (); resetviewport(); }
void AppInit (void) { RandomInit (time (NULL)); CameraInit (); RenderInit (); TextureInit (); WorldInit (); }
void HouseMasterBedroom::Init() { // Initialising the textures. bed_covers_ = TextureInit("Converted_Textures/bed_covers.png"); bed_sheets_ = TextureInit("Converted_Textures/bed_sheets.png"); fabric_rough_carpet_ = TextureInit("Converted_Textures/fabric_rough_carpet.png"); marble_ = TextureInit("Converted_Textures/marble.png"); matress_cover_ = TextureInit("Converted_Textures/matress_cover.png"); painting_trees_ = TextureInit("Converted_Textures/painting_trees.jpg"); pillow_ = TextureInit("Converted_Textures/pillow.png"); wood_light_ = TextureInit("Converted_Textures/wood_light.png"); wooden_board_ = TextureInit("Converted_Textures/wooden_board.png"); // Initialising the room. Room::Init(); }
void hack_init (xstuff_t * XStuff) { //Load the fonts for printing debug info to the window. #ifdef HAVE_GLC glc_ctx = glcGenContext (); glcContext (glc_ctx); for (unsigned int ii = 0; ii < FONT_COUNT; ii++) { fonts[ii].id = glcGenFontID(); if (glcNewFontFromFamily(fonts[ii].id, fonts[ii].name) != fonts[ii].id) { printf("%s\n", fonts[ii].name); glcDeleteFont(fonts[ii].id); fonts[ii].id = 0; } } glcScale (FONT_SIZE, FONT_SIZE); #endif hack_reshape (XStuff); TextureInit (); WorldInit (); }
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <CubicVR/Texture.h> #include <CubicVR/Logger.h> #include <algorithm> IMPEXP std::vector<Texture *> Texture::textures; IMPEXP std::map<std::string, cvrIndex, string_less> Texture::nameref; IMPEXP TextureInit Texture::initializer = TextureInit(); #ifdef OPENGL_ES #define TEXTURE_MAX 32 #else #ifdef ARCH_PSP #define TEXTURE_MAX 8 #else #define TEXTURE_MAX 32 #endif #endif IMPEXP int Texture::tex_use = -1; IMPEXP int Texture::tex_lock = -1;