29 #include "../../idlib/precompiled.h"
39 static char THIS_FILE[] = __FILE__;
87 static int numQuads = cubeSides / 4;
91 for (
int i = 0;
i < numQuads;
i++) {
93 for (
int j = 0;
j < 4;
j++) {
137 return CWnd::PreCreateWindow(cs);
142 if (CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext) == -1) {
147 QEW_SetupPixelFormat(dc->m_hDC,
false);
159 QEW_SetupPixelFormat(dc->m_hDC,
false);
168 if (!qwglMakeCurrent(dc.m_hDC,
win32.
hGLRC)) {
172 qglScissor(0, 0, rect.Width(), rect.Height());
176 qglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
181 qglOrtho(0, rect.Width(), 0, rect.Height(), -256, 256);
187 qglScissor(0, 0, rect.Width(), rect.Height());
191 qglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
206 if (
button == MK_RBUTTON) {
215 extern float fDiff(
float f1,
float f2);
235 }
else if (*px < *px2) {
287 static int viewAngle = -98;
299 if (doScale || doLight) {
322 }
else if (*px < *px2) {
367 spawnArgs.
Set(
"classname",
"light");
368 spawnArgs.
Set(
"name",
"light_1");
369 spawnArgs.
Set(
"origin",
"0 0 0");
372 spawnArgs.
Set(
"_color", str);
432 memset( &worldEntity, 0,
sizeof( worldEntity ) );
450 memset( &refdef, 0,
sizeof( refdef ) );
497 scale = 128.0 / size;
549 if (
button == MK_LBUTTON) {
552 idVec3 to( -curx, -cury, 0.0
f );
559 float phi = 2.0f * asin ( len ) ;
562 axis *= sin( phi / 2.0
f );
563 idQuat rot( axis.
z, axis.
y, axis.
x, cos( phi / 2.0
f ) );
589 }
else if (*px < *px2) {
643 spawnArgs.
Set(
"classname",
"light");
644 spawnArgs.
Set(
"name",
"light_1");
645 spawnArgs.
Set(
"origin",
"-128 0 0");
648 spawnArgs.
Set(
"_color", str);
653 memset( &worldEntity, 0,
sizeof( worldEntity ) );
655 spawnArgs.
Set(
"classname",
"func_static");
657 spawnArgs.
Set(
"origin",
"0 0 0");
678 memset( &refdef, 0,
sizeof( refdef ) );
709 ClientToScreen(&point);
719 ClientToScreen(&point);
731 ClientToScreen(&point);
741 ClientToScreen(&point);
752 ClientToScreen(&point);
763 if ( zDelta > 0.0f ) {
784 ClientToScreen(&point);
794 ClientToScreen(&point);
848 memset( &ev, 0,
sizeof( ev ) );
872 memset( &ev, 0,
sizeof( ev ) );
888 memset( &ev, 0,
sizeof( ev ) );
idImage * GetEditorImage(void) const
virtual idRenderModel * DefaultModel()=0
virtual srfTriangles_t * AllocSurfaceTriangles(int numVerts, int numIndexes) const =0
virtual void EndFrame(int *frontEndMsec, int *backEndMsec)=0
virtual void setMedia(const char *name)
virtual void draw(int x, int y, int w, int h)
virtual void setMedia(const char *name)
CONST PIXELFORMATDESCRIPTOR UINT
const int GetNumStages(void) const
virtual void FinishSurfaces()=0
idMat3 ToMat3(void) const
virtual qhandle_t AddEntityDef(const renderEntity_t *re)=0
const float * ToFloatPtr(void) const
GLenum GLenum GLenum GLenum GLenum scale
virtual void draw(int x, int y, int w, int h)
void Set(const float x, const float y, const float z)
idRenderSystem * renderSystem
int Sys_Milliseconds(void)
virtual void buttonDown(int button, float x, float y)
idMiniDrawVert(float x, float y, float z, float s, float t)
const idMaterial * shader
static float ClampFloat(float min, float max, float value)
idRenderModel * worldModel
virtual void AddSurface(modelSurface_t surface)=0
const char * GetName(void) const
const idMaterial * material
virtual void buttonDown(int button, float x, float y)
virtual qhandle_t AddLightDef(const renderLight_t *rlight)=0
virtual const idMaterial * FindMaterial(const char *name, bool makeDefault=true)=0
virtual bool ScreenCoords()
void Set(const char *key, const char *value)
idVec3 Cross(const idVec3 &a) const
virtual void draw(int x, int y, int w, int h)
virtual void BeginFrame(int windowWidth, int windowHeight)=0
virtual int getRealTime()
void Set(float x, float y, float z, float w)
virtual dynamicModel_t IsDynamicModel() const =0
virtual void InitEmpty(const char *name)=0
virtual void buttonDown(int button, float x, float y)
static const float M_RAD2DEG
idUserInterface * GlobalGui(void) const
virtual idRenderWorld * AllocRenderWorld(void)=0
const char * GetString(const char *key, const char *defaultString="") const
GLubyte GLubyte GLubyte GLubyte w
const shaderStage_t * GetStage(const int index) const
virtual void mouseMove(float x, float y)
srfTriangles_t * geometry
virtual idRenderModel * FindModel(const char *modelName)=0
virtual bool ProcessEvent(const struct sysEvent_s *event, bool forceAccept)=0
virtual void draw(int x, int y, int w, int h)
idImageManager * globalImages
float shaderParms[MAX_GLOBAL_SHADER_PARMS]
virtual bool InitFromMap(const char *mapName)=0
virtual void Draw(bool forceFullScreen)=0
virtual void buttonUp(int button, float x, float y)
GLenum GLsizei GLsizei height
idDeclManager * declManager
virtual void draw(int x, int y, int w, int h)
void SetSkin(const char *skin)
idRenderModelManager * renderModelManager
void ProjectSelfOntoSphere(const float radius)
idMat3 ToMat3(void) const
virtual void mouseMove(float x, float y)
class idUserInterface * gui[MAX_RENDERENTITY_GUI]
virtual void ParseSpawnArgsToRenderLight(const idDict *args, renderLight_t *renderLight)
virtual void RenderScene(const renderView_t *renderView)=0
virtual void ParseSpawnArgsToRenderEntity(const idDict *args, renderEntity_t *renderEntity)
void GL_State(int stateBits)
virtual void mouseMove(float x, float y)
char * va(const char *fmt,...)
virtual void virtual void Warning(const char *fmt,...) id_attribute((format(printf
void Set(const float x, const float y, const float z, const float w)
float shaderParms[MAX_ENTITY_SHADER_PARMS]
int sprintf(idStr &string, const char *fmt,...)
void AddTris(srfTriangles_t *tris, const idMaterial *mat)
virtual idRenderModel * AllocModel()=0