Changeset 90 for trunk/src/gl/gl_device.cc
- Timestamp:
- 06/02/13 22:33:59 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_device.cc
r70 r90 11 11 #include "nv/logging.hh" 12 12 #include "nv/lib/sdl12.hh" 13 #include "nv/lib/sdl_image.hh" 13 14 14 15 using namespace nv; … … 67 68 } 68 69 70 // this is a temporary function that will be removed once we find a way to 71 // pass binary file data around 72 image_data* nv::gl_device::create_image_data( const std::string& filename ) 73 { 74 load_sdl_image_library(); 75 SDL_Surface* image = IMG_Load( filename.c_str() ); 76 image_data* data = new image_data( glm::ivec2( image->w, image->h ), image->format->BytesPerPixel, (nv::uint8*)image->pixels ); 77 return data; 78 } 79 69 80 texture2d* gl_device::create_texture2d( ivec2 size, image_format aformat, datatype adatatype, sampler asampler, void* data /*= nullptr */ ) 70 81 {
Note: See TracChangeset
for help on using the changeset viewer.