Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actuallucky6969b

Posted 21 July 2013 - 05:52 AM

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


#1lucky6969b

Posted 21 July 2013 - 05:32 AM

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 Direct3D 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


PARTNERS