A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/gltest_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/opengl/mesa/demo/gltest.cpp Source File

42 using namespace ncbi

;

66

m_Camera.SetFieldOfView(45.0f);

67

m_Camera.SetNearPlane(0.1f);

68

m_Camera.SetFarPlane(500.0f);

94  if

(fov_iter !=

entries

.end()) {

98  if

(dist_iter !=

entries

.end()) {

102  if

(xrot_iter !=

entries

.end()) {

106  if

(yrot_iter !=

entries

.end()) {

110  if

(zrot_iter !=

entries

.end()) {

126

glClearColor(1.0f, 1.0f, 1.0f, 0.0f);

127

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

129

glMatrixMode(GL_PROJECTION);

131

glOrtho(-1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f);

133

glColor3f(0.2f, 0.2f, 0.2f);

134

glVertex2f(-1.0f, 1.0f);

135

glVertex2f( 1.0f, 1.0f);

137

glColor3f(0.4f, 0.4f, 0.8f);

138

glVertex2f( 1.0f, -1.0f);

139

glVertex2f(-1.0f, -1.0f);

142

m_Camera.MakeCurrent();

144

glMatrixMode(GL_MODELVIEW);

150  static

GLfloat light_pos[] = { -20.0f, 20.0f, 5.0f, 1.0f };

151  static

GLfloat white_light[] = { 1.0f, 1.0f, 1.0f, 1.0f };

152

glEnable(GL_LIGHTING);

154

glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);

155

glLightfv(GL_LIGHT0, GL_POSITION, light_pos);

156

glLightfv(GL_LIGHT0, GL_DIFFUSE, white_light);

157

glLightfv(GL_LIGHT0, GL_SPECULAR, white_light);

162

glTranslatef(0.0f, 0.0f, -dist);

163

glRotatef(xrot, 1.0f, 0.0f, 0.0f);

164

glRotatef(yrot, 0.0f, 1.0f, 0.0f);

165

glRotatef(zrot, 0.0f, 0.0f, 1.0f);

171

glEnable(GL_DEPTH_TEST);

172

glEnable(GL_CULL_FACE);

179

glEnable(GL_COLOR_MATERIAL);

181

glColor3f(1.0f, 0.5f, 0.0f);

183

glTranslatef(5.0f, 0.0f, 0.0f);

187

glColor3f(0.0f, 1.0f, 0.0f);

189

glTranslatef(-5.0f, 0.0f, 0.0f);

190

glRotatef(90, 1.0f, 0.0f, 0.0f);

197

glDisable(GL_LIGHTING);

200

glColor3f (1.0f, 0.0f, 0.0f);

201

glVertex3f(0.0f, 0.0f, 0.0f);

202

glVertex3f(5.0f, 0.0f, 0.0f);

204

glColor3f (0.0f, 1.0f, 0.0f);

205

glVertex3f(0.0f, 0.0f, 0.0f);

206

glVertex3f(0.0f, 5.0f, 0.0f);

208

glColor3f (0.0f, 0.0f, 1.0f);

209

glVertex3f(0.0f, 0.0f, 0.0f);

210

glVertex3f(0.0f, 0.0f, 5.0f);

223 int main

(

int

argc,

const char

* argv[])

226  _TRACE

(

"back to normal diags"

);

virtual void Render(CCgiContext &ctx)

container_type::const_iterator const_iterator

int main(int argc, const char *argv[])

int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)

Main function (entry point) for the NCBI application.

const TCgiEntries & GetEntries(void) const

Get a set of entries(decoded) received from the client.

@ eDS_Default

Try standard log file (app.name + ".log") in /log/, use stderr on failure.

static void DumpState()

Dump many of the most common OpenGL states.

static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)

Convert string to double.

Magic spell ;-) needed for some weird compilers... very empiric.

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...

static wxAcceleratorEntry entries[3]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4