PDA

View Full Version : Rendering an image from file onto screen



Player42
06-21-2011, 09:23 PM
Could someone explain the correct way to load an image from file and render it to the screen using the Orange Box SDK? This is what I have so far and it is clearly not right...


int textureID = g_pSurface->CreateNewTextureID( true );
g_pSurface->DrawSetTextureFile( textureID, "C:\\image.png", 0, false);
g_pSurface->DrawTexturedRect( 0, 0, WIDTH, HEIGHT);

darkcat
06-22-2011, 02:02 AM
you need to convert the image to vtf, then add the image path to search path

darkcat
06-22-2011, 08:06 AM
you're questions has been answered on the smiley ESP post :D