![]() |
|
#1
|
|||
|
|||
Texture mapping (C and OpenGL)Hiya
Im writing a program in C using openGL (GLUT) and im having a little trouble with the function to process textures (RAW files). It compiles ok but when i bind the texture in my display function and apply it to a quad it does not display it at runtime (just has a simple RGB default colour i had assigned with glColor3f). It has to be because its not allocating the memory correctly with the malloc i think? but i cant think of a way to just get it working, can anyone please maybe help me.. Pretty please? Im getting really frustrated lol. Below is the texture processing function: CPP / C++ / C Code:
Im using it like this (just showing the parts that matter): CPP / C++ / C Code:
I really need to get this working Thanks. Last edited by cable_guy_67 : 02-Jun-2006 at 09:12.
Reason: Please enclose c code in [c] ... [/c] tags
|
Recent GIDBlog
NARMY by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OpenGL in Normal FLTK Windows | automatedreason | FLTK Forum | 2 | 25-Apr-2008 05:44 |
| What is OpenGL? | Shrikharan | OpenGL Programming | 6 | 21-Dec-2005 17:47 |
| C++ game programming OpenGL | oozsakarya | OpenGL Programming | 2 | 13-Nov-2005 13:50 |
| nVidia & OpenGL Problems in windows XP | marjasin | Computer Hardware Forum | 21 | 30-Aug-2004 00:57 |
| OpenGL always reports error | mvt | OpenGL Programming | 2 | 04-Jun-2004 06:42 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The