Sign in to follow this  
lucky6969b

Are there any intrinsics for Vectors, Colors and matrices etc?

Recommended Posts

Brother Bob    10344

Don't dump anything into your visual studio installation. Put all your third party libraries into a separate directory of your choice  and add include paths to the libraries in the project settings. In Visual studio 2012: Project->Properties->Configuration Properties->VC++ Directories->Include Directories.

Share this post


Link to post
Share on other sites
lucky6969b    1330

common.h

#include "glm.hpp"

#define UINT unsigned int
#define DWORD unsigned long

#define glColorRGBA glm::vec4

myOpenGLWidget.h

#pragma once
#include "openglwidget.h"
#include "common.h"
#include "glm.hpp"

class myOpenGLWidget :
    public OpenGLWidget
{
public:

#ifdef QWIDGET_H
    myOpenGLWidget( QWidget *parent = 0, Qt::WFlags flags = 0 );
#else
    myOpenGLWidget();
    
#endif

    

    virtual ~myOpenGLWidget();
    
    virtual void initCamera();
    virtual void initModels();
    
    virtual void initEffects();

    //-----------------------------------------------------------------------------
    // Name: initialize()
    // Desc: This function will only be called once during the application's
    //       initialization phase. Therefore, it can't contain any resources that
    //       need to be restored every time the OpenGL device is lost or the
    //       window is resized.
    //-----------------------------------------------------------------------------
    bool initialize();
    
    //-----------------------------------------------------------------------------
    // Name: uninitialize()
    // Desc: Releases all previously initialized objects
    //-----------------------------------------------------------------------------
    void uninitialize();
    
    virtual void update();
    

    //-----------------------------------------------------------------------------
    // Name: restoreDeviceObjects()
    // Desc: You are encouraged to develop applications with a single code path to
    //       respond to device loss. This code path is likely to be similar, if not
    //       identical, to the code path taken to initialize the device at startup.
    //-----------------------------------------------------------------------------
    bool    restoreDeviceObjects();

    //-----------------------------------------------------------------------------
    // Name: invalidateDeviceObjects()
    // Desc: If the lost device can be restored, the application prepares the
    //       device by destroying all video-memory resources and any
    //       swap chains. This is typically accomplished by using the SAFE_RELEASE
    //       macro.
    //-----------------------------------------------------------------------------
    bool invalidateDeviceObjects();
    
    //-----------------------------------------------------------------------------
    // Name: render()
    // Desc: Draws the scene
    //-----------------------------------------------------------------------------
    virtual bool    render();
    
    //-----------------------------------------------------------------------------
    // Name: clearScene()
    // Desc: Clear the render target and depth stencil
    //-----------------------------------------------------------------------------
    void    clearScene(  glColorRGBA ClearColor, float Z, DWORD Stencil );
    
    //-----------------------------------------------------------------------------
    // Name: clearRenderTarget()
    // Desc: Clear the render target
    //-----------------------------------------------------------------------------
    void    clearRenderTarget( glColorRGBA ClearColor );

glColorRGBA and DWORD are not defined.

Wondering why

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites
Brother Bob    10344

I see no reason why that would happen in the code you have posted. And when posting errors, show the exact error message. But as an aside, there's no reason to use defines to make type aliases; use typedefs for that.

Edited by Brother Bob

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this