source: nanovis/branches/1.1/PointShader.cpp @ 5722

Last change on this file since 5722 was 4904, checked in by ldelgass, 5 years ago

Merge serveral changes from trunk. Does not include threading, world space
changes, etc.

  • Property svn:eol-style set to native
File size: 938 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 *
5 */
6#include "PointShader.h"
7
8using namespace nv;
9
10PointShader::PointShader() : 
11    Shader(),
12    _scale(1.0f),
13    _normal(NULL)
14{
15    loadVertexProgram("pointsvp.cg");
16}
17
18PointShader::~PointShader()
19{
20}
21
22void PointShader::bind()
23{
24    setGLStateMatrixVPParameter("modelView", MODELVIEW_MATRIX, MATRIX_IDENTITY);
25    setGLStateMatrixVPParameter("modelViewProj", MODELVIEW_PROJECTION_MATRIX, MATRIX_IDENTITY);
26
27    setVPParameter1f("atten", 1.0f);
28    setVPParameter4f("posoffset", 1.0f, 1.0f, 1.0f, 1.0f);
29    setVPParameter4f("basepos", 1.0f, 1.0f, 1.0f, 1.0f);
30    setVPParameter4f("scale", _scale, 1.0f, 1.0f, 1.0f);
31    //setVPTextureParameter("normal", _normal->getGraphicsObjectID());
32
33    Shader::bind();
34}
35
36void PointShader::unbind()
37{
38    //disableVPTextureParameter("normal");
39
40    Shader::unbind();
41}
Note: See TracBrowser for help on using the repository browser.