Changeset 1992 for trunk/tutorial


Ignore:
Timestamp:
Oct 9, 2012, 1:15:56 AM (8 years ago)
Author:
sam
Message:

gpu: allow to specify the pixel format when creating a texture; the
internal format is then automatically deduced. Only a few 8-bit RGB
or RGBA formats are supported for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/11_fractal.cpp

    r1988 r1992  
    446446            /* Create a texture of half the width and twice the height
    447447             * so that we can upload four different subimages each frame. */
    448             m_texture = new Texture(ivec2(m_size.x / 2, m_size.y * 2));
     448            m_texture = new Texture(ivec2(m_size.x / 2, m_size.y * 2),
     449                                    PixelFormat::A8B8G8R8);
    449450
    450451            /* Ensure the texture data is complete at least once, otherwise
Note: See TracChangeset for help on using the changeset viewer.