NTrace
GPU ray tracing framework
|
#include <GLContext.hpp>
Classes | |
struct | Config |
class | Program |
Public Types | |
enum | FontStyle { FontStyle_Normal = 0, FontStyle_Bold = 1 << 0, FontStyle_Italic = 1 << 1, FontStyle_BoldItalic = FontStyle_Bold | FontStyle_Italic } |
Public Member Functions | |
GLContext (HDC hdc, const Config &config=Config()) | |
GLContext (HDC hdc, HGLRC hglrc) | |
~GLContext (void) | |
const Config & | getConfig (void) const |
void | makeCurrent (void) |
void | swapBuffers (void) |
void | setView (const Vec2i &pos, const Vec2i &size) |
const Vec2i & | getViewPos (void) const |
const Vec2i & | getViewSize (void) const |
const Vec2f & | getViewScale (void) const |
Mat4f | xformFitToView (const Vec2f &pos, const Vec2f &size) const |
Mat4f | xformMatchPixels (void) const |
Mat4f | xformMouseToUser (const Mat4f &userToClip) const |
void | setAttrib (int loc, int size, GLenum type, int stride, Buffer *buffer, const void *pointer) |
void | setAttrib (int loc, int size, GLenum type, int stride, const void *pointer) |
void | setAttrib (int loc, int size, GLenum type, int stride, Buffer &buffer, int ofs) |
void | resetAttribs (void) |
void | setUniform (int loc, S32 v) |
void | setUniform (int loc, F32 v) |
void | setUniform (int loc, F64 v) |
void | setUniform (int loc, const Vec2f &v) |
void | setUniform (int loc, const Vec3f &v) |
void | setUniform (int loc, const Vec4f &v) |
void | setUniform (int loc, const Mat2f &v) |
void | setUniform (int loc, const Mat3f &v) |
void | setUniform (int loc, const Mat4f &v) |
const Mat4f & | getVGXform (void) const |
Mat4f | setVGXform (const Mat4f &m) |
void | strokeLine (const Vec4f &p0, const Vec4f &p1, U32 abgr) |
void | strokeLine (const Vec2f &p0, const Vec2f &p1, U32 abgr) |
void | fillRect (const Vec4f &pos, const Vec2f &localSize, const Vec2f &screenSize, U32 abgr) |
void | fillRect (const Vec2f &pos, const Vec2f &localSize, U32 abgr) |
void | fillRectNS (const Vec4f &pos, const Vec2f &screenSize, U32 abgr) |
void | fillRectNS (const Vec2f &pos, const Vec2f &screenSize, U32 abgr) |
void | drawBox (const Vec3f &min, const Vec3f &max, U32 abgr) |
void | drawBuffer (Buffer &buffer, GLenum mode, int offset, U32 abgr) |
void | drawColorBuffer (Buffer &buffer, Buffer &color, GLenum mode, int offset) |
void | strokeRect (const Vec4f &pos, const Vec2f &localSize, const Vec2f &screenSize, U32 abgr) |
void | strokeRect (const Vec2f &pos, const Vec2f &localSize, U32 abgr) |
void | strokeRectNS (const Vec4f &pos, const Vec2f &screenSize, U32 abgr) |
void | strokeRectNS (const Vec2f &pos, const Vec2f &screenSize, U32 abgr) |
void | setFont (const String &name, int size, U32 style) |
void | setDefaultFont (void) |
int | getFontHeight (void) const |
Vec2i | getStringSize (const String &str) |
Vec2i | drawString (const String &str, const Vec4f &pos, const Vec2f &align, U32 abgr) |
Vec2i | drawString (const String &str, const Vec2f &pos, const Vec2f &align, U32 abgr) |
Vec2i | drawString (const String &str, const Vec2f &pos, U32 abgr) |
Vec2i | drawLabel (const String &str, const Vec4f &pos, const Vec2f &align, U32 fgABGR, U32 bgABGR) |
Vec2i | drawLabel (const String &str, const Vec4f &pos, const Vec2f &align, U32 abgr) |
Vec2i | drawLabel (const String &str, const Vec2f &pos, const Vec2f &align, U32 abgr) |
Vec2i | drawLabel (const String &str, const Vec2f &pos, U32 abgr) |
void | drawModalMessage (const String &msg) |
void | drawImage (const Image &image, const Vec4f &pos, const Vec2f &align, bool topToBottom=true) |
void | drawImage (const Image &image, const Vec2f &pos, const Vec2f &align=0.5f, bool topToBottom=true) |
Program * | getProgram (const String &id) const |
void | setProgram (const String &id, Program *prog) |
Static Public Member Functions | |
static void | staticInit (void) |
static void | staticDeinit (void) |
static GLContext & | getHeadless (void) |
static bool | isStereoAvailable (void) |
static void | checkErrors (void) |
Definition at line 47 of file GLContext.hpp.
Enumerator | |
---|---|
FontStyle_Normal | |
FontStyle_Bold | |
FontStyle_Italic | |
FontStyle_BoldItalic |
Definition at line 53 of file GLContext.hpp.
Definition at line 210 of file GLContext.cpp.
GLContext::GLContext | ( | HDC | hdc, |
HGLRC | hglrc | ||
) |
Definition at line 201 of file GLContext.cpp.
GLContext::~GLContext | ( | void | ) |
Definition at line 245 of file GLContext.cpp.
Definition at line 1003 of file GLContext.cpp.
Definition at line 383 of file GLContext.cpp.
Definition at line 479 of file GLContext.cpp.
Definition at line 558 of file GLContext.cpp.
void GLContext::drawImage | ( | const Image & | image, |
const Vec4f & | pos, | ||
const Vec2f & | align, | ||
bool | topToBottom = true |
||
) |
Definition at line 808 of file GLContext.cpp.
|
inline |
Definition at line 202 of file GLContext.hpp.
Vec2i GLContext::drawLabel | ( | const String & | str, |
const Vec4f & | pos, | ||
const Vec2f & | align, | ||
U32 | fgABGR, | ||
U32 | bgABGR | ||
) |
Definition at line 704 of file GLContext.cpp.
Definition at line 778 of file GLContext.cpp.
|
inline |
Definition at line 197 of file GLContext.hpp.
Definition at line 198 of file GLContext.hpp.
Definition at line 786 of file GLContext.cpp.
|
inline |
Definition at line 192 of file GLContext.hpp.
|
inline |
Definition at line 193 of file GLContext.hpp.
Definition at line 194 of file GLContext.hpp.
void GLContext::fillRect | ( | const Vec4f & | pos, |
const Vec2f & | localSize, | ||
const Vec2f & | screenSize, | ||
U32 | abgr | ||
) |
Definition at line 357 of file GLContext.cpp.
Definition at line 176 of file GLContext.hpp.
Definition at line 177 of file GLContext.hpp.
Definition at line 178 of file GLContext.hpp.
Definition at line 141 of file GLContext.hpp.
|
inline |
Definition at line 190 of file GLContext.hpp.
Definition at line 209 of file GLContext.hpp.
GLContext::Program * GLContext::getProgram | ( | const String & | id | ) | const |
Definition at line 867 of file GLContext.cpp.
Definition at line 674 of file GLContext.cpp.
Definition at line 170 of file GLContext.hpp.
Definition at line 147 of file GLContext.hpp.
Definition at line 149 of file GLContext.hpp.
Definition at line 148 of file GLContext.hpp.
|
inlinestatic |
Definition at line 210 of file GLContext.hpp.
Definition at line 260 of file GLContext.cpp.
Definition at line 323 of file GLContext.cpp.
void GLContext::setAttrib | ( | int | loc, |
int | size, | ||
GLenum | type, | ||
int | stride, | ||
Buffer * | buffer, | ||
const void * | pointer | ||
) |
Definition at line 310 of file GLContext.cpp.
|
inline |
Definition at line 156 of file GLContext.hpp.
|
inline |
Definition at line 157 of file GLContext.hpp.
Definition at line 188 of file GLContext.hpp.
Definition at line 645 of file GLContext.cpp.
Definition at line 875 of file GLContext.cpp.
Definition at line 160 of file GLContext.hpp.
Definition at line 161 of file GLContext.hpp.
Definition at line 162 of file GLContext.hpp.
Definition at line 163 of file GLContext.hpp.
Definition at line 164 of file GLContext.hpp.
Definition at line 165 of file GLContext.hpp.
Definition at line 166 of file GLContext.hpp.
Definition at line 167 of file GLContext.hpp.
Definition at line 168 of file GLContext.hpp.
Definition at line 171 of file GLContext.hpp.
Definition at line 287 of file GLContext.cpp.
Definition at line 962 of file GLContext.cpp.
Definition at line 894 of file GLContext.cpp.
Definition at line 333 of file GLContext.cpp.
Definition at line 174 of file GLContext.hpp.
void GLContext::strokeRect | ( | const Vec4f & | pos, |
const Vec2f & | localSize, | ||
const Vec2f & | screenSize, | ||
U32 | abgr | ||
) |
Definition at line 613 of file GLContext.cpp.
Definition at line 183 of file GLContext.hpp.
Definition at line 184 of file GLContext.hpp.
Definition at line 185 of file GLContext.hpp.
Definition at line 276 of file GLContext.cpp.
Definition at line 151 of file GLContext.hpp.
Definition at line 152 of file GLContext.hpp.
Definition at line 298 of file GLContext.cpp.