UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
r_weather.cpp File Reference

Weather effects rendering subsystem implementation. More...

#include <stdint.h>
#include "r_local.h"
#include "../client.h"
#include "r_weather.h"

Go to the source code of this file.

Functions

static GLuint wpTexture (void)
 Gives handle to (and uploads if needed) weather particle texture; also binds it to the active texture unit. More...
 

Variables

static const uint8_t wpImage [8][8]
 

Detailed Description

Weather effects rendering subsystem implementation.

Definition in file r_weather.cpp.

Function Documentation

static GLuint wpTexture ( void  )
static

Gives handle to (and uploads if needed) weather particle texture; also binds it to the active texture unit.

Returns
OpenGL handle of texture object
Note
alas, image_t does not support anything but RGB(A) textures, so we've got to reinvent the wheel

Definition at line 49 of file r_weather.cpp.

References glBindTexture(), glGenTextures(), glTexImage2D(), glTexParameterf(), GLuint, R_EnableTexture(), texunit_diffuse, and wpImage.

Referenced by Weather::render().

Variable Documentation

const uint8_t wpImage[8][8]
static
Initial value:
= {
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,},
{0x00, 0x00, 0x20, 0x40, 0x40, 0x20, 0x00, 0x00,},
{0x00, 0x20, 0xa0, 0xc0, 0xc0, 0xa0, 0x20, 0x00,},
{0x00, 0x40, 0xc0, 0xff, 0xff, 0xc0, 0x40, 0x00,},
{0x00, 0x40, 0xc0, 0xff, 0xff, 0xc0, 0x40, 0x00,},
{0x00, 0x20, 0xa0, 0xc0, 0xc0, 0xa0, 0x20, 0x00,},
{0x00, 0x00, 0x20, 0x40, 0x40, 0x20, 0x00, 0x00,},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}
}

Definition at line 33 of file r_weather.cpp.

Referenced by wpTexture().