#include <PShaderTxt.h>
Definition at line 35 of file PShaderTxt.h.
Public Types | |
enum | SUPPORTED_SHADERS { NOT_LOADED, UNKNOWN, ARB_FP, ARB_VP, SHADER_LAST } |
Public Slots | |
void | loadShader () |
load Shader | |
void | loadShader (glift::ProgShaderSP shader) |
load shader, from glift shader | |
void | loadShaderFromFile (const QString &fname) |
load Shader from file | |
void | loadShaderFromText (const QString &text) |
load Shader from text | |
void | saveShader (const QString &lastPath) |
save shader | |
void | saveShaderAs (const QString &lastPath) |
save shader as | |
void | closeShader (const QString &lastPath) |
close shader | |
Signals | |
void | initAFP (glift::FragProgARBSP fp) |
void | initAVP (glift::VertexProgARBSP vp) |
Public Member Functions | |
PShaderTxt (const QGLContext *ctx, QWidget *parent, const char *name=0, WFlags wf=0) | |
PShaderTxt (const QGLContext *ctx, glift::ProgShaderSP s, QWidget *parent, const char *name=0, WFlags wf=0) | |
virtual | ~PShaderTxt () |
int | getShaderType () const |
QString | getFileName () |
load Shader | |
Protected Member Functions | |
void | conf () |
bool | castShader () |
false for success, true for failure | |
int | getErrorPos (std::string s) |
highlight the error text | |
Protected Attributes | |
QMultiLineEdit * | _mle |
glift::ProgShaderSP | _shader |
this should always exist | |
glift::FragProgARBSP | _fpshader |
these depend on the shader loaded | |
glift::VertexProgARBSP | _vpshader |
const QGLContext * | _ctx |
ErrTxtWin * | _errw |
int | _stype |
|
Definition at line 42 of file PShaderTxt.h. |
|
Definition at line 33 of file PShaderTxt.cpp. |
|
|
|
Definition at line 53 of file PShaderTxt.cpp. |
|
false for success, true for failure fragment program ARB vertex program ARB catch all, don't know what to do?? Definition at line 456 of file PShaderTxt.cpp. References _fpshader, _shader, _stype, _vpshader, ARB_FP, ARB_VP, gutz::SmartPtr< ProgShader >::getPtr(), and gutz::SmartPtr< ProgShader >::isNull(). Referenced by loadShader(), loadShaderFromFile(), and loadShaderFromText(). |
|
close shader
Definition at line 438 of file PShaderTxt.cpp. References _mle, loadShader(), and saveShader(). Referenced by PShaderWin::closeShader(). |
|
|
|
highlight the error text arb style error position at a specific character Definition at line 489 of file PShaderTxt.cpp. References ARB_ERR_CHAR(), s, and string. Referenced by loadShader(), loadShaderFromFile(), and loadShaderFromText(). |
|
load Shader
Definition at line 61 of file PShaderTxt.cpp. References _fpshader, _shader, _stype, ARB_FP, ARB_VP, and gutz::SmartPtr< ProgShader >::isNull(). Referenced by PShaderWin::addShader(), PShaderWin::openShader(), PShaderWin::saveShader(), and PShaderWin::saveShaderAs(). |
|
Definition at line 49 of file PShaderTxt.h. References _stype. Referenced by PShaderWin::addShader(), PShaderWin::newARBFP(), PShaderWin::newARBVP(), and PShaderWin::openShader(). |
|
|
|
|
|
load shader, from glift shader set the text for editing Definition at line 149 of file PShaderTxt.cpp. References _fpshader, _mle, _shader, _stype, _vpshader, ARB_FP, ARB_VP, castShader(), gutz::SmartPtr< ProgShader >::isNull(), loadShader(), and NOT_LOADED. |
|
load Shader for capturing errors do the right thing for each type save off old error stream capture init errors load the changed shader return the default error stream handle any errors launch error, if there is one be nice and mark where it happened save off old error stream capture init errors launch error, if there is one make the gl context current for loading might be dangerous Definition at line 91 of file PShaderTxt.cpp. References _ctx, _errw, _fpshader, _mle, _stype, _vpshader, ARB_FP, ARB_VP, getErrorPos(), ErrTxtWin::markSelection(), ErrTxtWin::maybeError(), and string. Referenced by PShaderWin::addShader(), closeShader(), PShaderWin::loadShader(), loadShader(), saveShader(), and saveShaderAs(). |
|
load Shader from file check the context to see if we can do anything make the gl context current for loading capture error stream... generate shader using glift shader factory function launch error if there is one mark where it happened figure out what kind of shader it was set the text for editing Definition at line 187 of file PShaderTxt.cpp. References _ctx, _errw, _fpshader, _mle, _shader, _stype, _vpshader, ARB_FP, ARB_VP, castShader(), getErrorPos(), glift::getProgShaderFromFile(), gutz::SmartPtr< ProgShader >::isNull(), ErrTxtWin::launchError(), ErrTxtWin::markSelection(), and NOT_LOADED. Referenced by PShaderWin::openShader(). |
|
load Shader from text make the gl context current for loading capture error stream... generate shader using glift shader factory function launch error if there is one mark where it happened figure out what kind of shader it was setup the text editor Definition at line 244 of file PShaderTxt.cpp. References _ctx, _errw, _mle, _shader, _stype, castShader(), getErrorPos(), glift::getProgShaderFromText(), gutz::SmartPtr< ProgShader >::isNull(), ErrTxtWin::launchError(), ErrTxtWin::markSelection(), and NOT_LOADED. Referenced by PShaderWin::newARBFP(), and PShaderWin::newARBVP(). |
|
save shader nothing to save? do we have a name? use it's given name nothing to save? do we have a name? Definition at line 288 of file PShaderTxt.cpp. References _errw, _fpshader, _mle, _stype, _vpshader, ARB_FP, ARB_VP, gutz::SmartPtr< VertexProgARB >::isNull(), gutz::SmartPtr< FragProgARB >::isNull(), ErrTxtWin::launchError(), loadShader(), and s. Referenced by closeShader(), and PShaderWin::saveShader(). |
|
save shader as
Definition at line 391 of file PShaderTxt.cpp. References _errw, _fpshader, _mle, _stype, _vpshader, ARB_FP, ARB_VP, gutz::SmartPtr< VertexProgARB >::isNull(), gutz::SmartPtr< FragProgARB >::isNull(), ErrTxtWin::launchError(), loadShader(), and s. Referenced by PShaderWin::saveShaderAs(). |
|
Definition at line 83 of file PShaderTxt.h. Referenced by loadShader(), loadShaderFromFile(), and loadShaderFromText(). |
|
Definition at line 85 of file PShaderTxt.h. Referenced by loadShader(), loadShaderFromFile(), loadShaderFromText(), PShaderTxt(), saveShader(), and saveShaderAs(). |
|
these depend on the shader loaded
Definition at line 80 of file PShaderTxt.h. Referenced by castShader(), getFileName(), loadShader(), loadShaderFromFile(), saveShader(), and saveShaderAs(). |
|
Definition at line 75 of file PShaderTxt.h. Referenced by closeShader(), loadShader(), loadShaderFromFile(), loadShaderFromText(), PShaderTxt(), saveShader(), and saveShaderAs(). |
|
this should always exist
Definition at line 78 of file PShaderTxt.h. Referenced by castShader(), getFileName(), loadShader(), loadShaderFromFile(), and loadShaderFromText(). |
|
Definition at line 87 of file PShaderTxt.h. Referenced by castShader(), getFileName(), getShaderType(), loadShader(), loadShaderFromFile(), loadShaderFromText(), saveShader(), and saveShaderAs(). |
|
Definition at line 81 of file PShaderTxt.h. Referenced by castShader(), loadShader(), loadShaderFromFile(), saveShader(), and saveShaderAs(). |